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)111 b) 0011 c) 1010111 d) 011011011

Short Answer

Expert verified

(a) It is recognized.

(b) It is not recognized.

(c) It is recognized.

(d) It is not 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 to with label x, then we write in a row and in 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 111

Here the given data is 111.

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}}}\)

1

\({{\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.

03

Result for 0011

Here the given data is 0011.

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}}}\)

0

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

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

1

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

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

1

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

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

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

04

Determine the result for 1010111

Here the given data is 1010111.

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

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}}}\)

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}}}\)

1

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

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

1

\({{\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 011011011

Here the given data is 011011011.

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}}}\)

1

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

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

0

\({{\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}}}\)

0

\({{\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}}}\)

Since we end at the final state \({{\bf{s}}_{\bf{2}}}\) and \({{\bf{s}}_{\bf{2}}}\) is not a final state, the string is not 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 not 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.

Give production rules in extended Backusโ€“Naur form for identifiers in the C programming language (see Exercise 33).

Describe how productions for a grammar in extended Backusโ€“Naur form can be translated into a set of productions for the grammar in Backusโ€“Naur form.

This is the Backusโ€“Naur form that describes the syntax of expressions in postfix (or reverse Polish) notation.

\(\begin{array}{c}\left\langle {{\bf{expression}}} \right\rangle {\bf{ :: = }}\left\langle {{\bf{term}}} \right\rangle {\bf{|}}\left\langle {{\bf{term}}} \right\rangle \left\langle {{\bf{term}}} \right\rangle \left\langle {{\bf{addOperator}}} \right\rangle \\{\bf{ }}\left\langle {{\bf{addOperator}}} \right\rangle {\bf{:: = + | - }}\\\left\langle {{\bf{term}}} \right\rangle {\bf{:: = }}\left\langle {{\bf{factor}}} \right\rangle {\bf{|}}\left\langle {{\bf{factor}}} \right\rangle \left\langle {{\bf{factor}}} \right\rangle \left\langle {{\bf{mulOperator}}} \right\rangle {\bf{ }}\\\left\langle {{\bf{mulOperator}}} \right\rangle {\bf{:: = *|/}}\\\left\langle {{\bf{factor}}} \right\rangle {\bf{:: = }}\left\langle {{\bf{identifier}}} \right\rangle {\bf{|}}\left\langle {{\bf{expression }}} \right\rangle \\\left\langle {{\bf{identifier}}} \right\rangle {\bf{:: = a }}\left| {{\bf{ b }}} \right|...{\bf{| z}}\end{array}\)

Suppose that S, I and O are finite sets such that \(\left| S \right| = n, \left| I \right| = k\), and \(\left| O \right| = m\).

\(a)\)How many different finite-state machines (Mealy machines) \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

\({\bf{b)}}\)How many different Moore machines \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

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