Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Determine whether each of these strings is recognized by the deterministic finite-state automaton in Figure 1.

a)010b) 1101 c) 1111110d) 010101010

Short Answer

Expert verified

(a) It is recognized.

(b) It is not recognized.

(c) It is recognized.

(d) It is recognized.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

According to figure 1.

Here the given figure contains four states \({{\bf{s}}_{\bf{o}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}\).

If there is an arrow from \({{\bf{s}}_{\bf{i}}}\)to\({{\bf{s}}_{\bf{j}}}\) with label x, then we write it down\({{\bf{s}}_{\bf{j}}}\) in the row \({{\bf{s}}_{\bf{i}}}\)and column x of the following table.

State

0

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{3}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)is marked as the start state.

Since \({{\bf{s}}_{\bf{o}}}\) and \({{\bf{s}}_{\bf{3}}}\) are encircled twice, a string will be recognized by the deterministic finite state automaton if we end at state \({{\bf{s}}_{\bf{o}}}\) or state\({{\bf{s}}_{\bf{3}}}\).

02

Solving for 010

Here the given data is 010.

Let's determine the sequence of states that are visited when the input is 111.

If \({{\bf{s}}_{\bf{i}}}\) is the next state of a digit, then \({{\bf{s}}_{\bf{i}}}\) is the start state of the next digit.

Input

Start state

Next state

0

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

0

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

Since we end at the final state \({{\bf{s}}_{\bf{o}}}\), the string is recognized by the deterministic finite state automaton.

03

Result for 1101

Here the given data is 1101.

Let's determine the sequence of states that are visited when the input is 111.

If \({{\bf{s}}_{\bf{i}}}\) is the next state of a digit, then \({{\bf{s}}_{\bf{i}}}\) is the start state of the next digit.

Input

Start state

Next state

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

1

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{2}}}\)

0

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

Since we end at the final state \({{\bf{s}}_{\bf{1}}}\)and \({{\bf{s}}_{\bf{1}}}\) is not a final state, the string is not recognized by the deterministic finite state automaton.

04

Determine the result for 1111110

Here the given data is 1111110.

Let's determine the sequence of states that are visited when the input is 1111110.

If \({{\bf{s}}_{\bf{i}}}\) is the next state of a digit, then \({{\bf{s}}_{\bf{i}}}\) is the start state of the next digit.

Input

Start state

Next state

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

1

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{2}}}\)

1

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

1

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{2}}}\)

1

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{o}}}\)

0

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{o}}}\)

Since we end at the final state \({{\bf{s}}_{\bf{o}}}\), the string is recognized by the deterministic finite state automaton.

05

Find the result for 010101010

Here the given data is 010101010.

Let's determine the sequence of states that are visited when the input is 111.

If \({{\bf{s}}_{\bf{i}}}\) is the next state of a digit, then \({{\bf{s}}_{\bf{i}}}\) is the start state of the next digit.

Input

Start state

Next state

0

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

0

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

0

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

0

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

1

\({{\bf{s}}_{\bf{o}}}\)

\({{\bf{s}}_{\bf{1}}}\)

0

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{o}}}\)

Since we end at the final state \({{\bf{s}}_{\bf{o}}}\)and \({{\bf{s}}_{\bf{o}}}\) is a final state, the string is recognized by the deterministic finite state automaton.

Therefore, the results are:

(a) It is recognized.

(b) It is not recognized.

(c) It is recognized.

(d) It is recognized.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

In Exercises 43โ€“49 find the language recognized by the given nondeterministic finite-state automaton.

use bottom-up parsing to determine whether the strings in Exercise 25 belong to the language generated by the grammar in Example 12.

Find a phrase-structure grammar that generates each of these languages.

\({\bf{a)}}\)the set of bit strings of the form \({{\bf{0}}^{{\bf{2n}}}}{{\bf{1}}^{{\bf{3n}}}}\), where \({\bf{n}}\) is a nonnegative integer

\({\bf{b)}}\)the set of bit strings with twice as many \({\bf{0's}}\) as \({\bf{1's}}\)

\({\bf{c)}}\)the set of bit strings of the form \({{\bf{w}}^{\bf{2}}}\), where \({\bf{w}}\) is a bit string

Let V = {S, A, B, a, b} and T = {a, b}. Determine whether G = (V, T, S, P) is a type 0 grammar but not a type 1 grammar, a type 1 grammar but not a type 2 grammar, or a type 2 grammar but not a type 3 grammar if P, the set of productions, is

\(\begin{array}{*{20}{l}}{{\bf{a) S }} \to {\bf{ aAB, A }} \to {\bf{ Bb, B }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{b) S }} \to {\bf{ aA, A }} \to {\bf{ a, A }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{c) S }} \to {\bf{ABa, AB }} \to {\bf{ a}}{\bf{.}}}\\{{\bf{d) S }} \to {\bf{ ABA, A }} \to {\bf{ aB, B }} \to {\bf{ ab}}{\bf{.}}}\\{{\bf{e) S }} \to {\bf{ bA, A }} \to {\bf{ B, B }} \to {\bf{ a}}{\bf{.}}}\\{{\bf{f ) S }} \to {\bf{ aA, aA }} \to {\bf{ B, B }} \to {\bf{ aA, A }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{g) S }} \to {\bf{ bA, A }} \to {\bf{ b, S }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{h) S }} \to {\bf{ AB, B }} \to {\bf{ aAb, aAb }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{i) S }} \to {\bf{ aA, A }} \to {\bf{ bB, B }} \to {\bf{ b, B }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{j) S }} \to {\bf{ A, A }} \to {\bf{ B, B }} \to {\bf{ \lambda }}{\bf{.}}}\end{array}\)

Show that the hare runs the sleepy tortoise is not a valid sentence.

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free