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

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.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

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

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

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

Construct a Turing machine that recognizes the set of all bit strings that contain an even number of \({\bf{1's}}\).

Find the output generated from the input string 01110 for the finite-state machine with the state table in

a) Exercise 1(a).

b) Exercise 1(b).

c) Exercise 1(c).

Let V = {S, A, B, a, b} and T = {a, b}. Find the language generated by the grammar (V, T, S, P) when theset P of productions consists of

\(\begin{array}{*{20}{l}}{{\bf{a) S }} \to {\bf{ AB, A }} \to {\bf{ ab, B }} \to {\bf{ bb}}{\bf{.}}}\\{{\bf{b) S }} \to {\bf{ AB, S }} \to {\bf{ aA, A }} \to {\bf{ a, B }} \to {\bf{ ba}}{\bf{.}}}\\{{\bf{c) S }} \to {\bf{ AB, S }} \to {\bf{ AA, A }} \to {\bf{ aB, A }} \to {\bf{ ab, B }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{d) S }} \to {\bf{ AA, S }} \to {\bf{ B, A }} \to {\bf{ aaA, A }} \to {\bf{ aa, B }} \to {\bf{ bB, B }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{e) S }} \to {\bf{ AB, A }} \to {\bf{ aAb, B }} \to {\bf{ bBa, A }} \to {\bf{ \lambda , B }} \to {\bf{ \lambda }}{\bf{.}}}\end{array}\)

Describe the set of strings defined by each of these sets of productions in EBNF.

\(\begin{array}{c}\left( {\bf{a}} \right){\bf{string :: = L + D?L + }}\\{\bf{L :: = a }}\left| {{\bf{ b }}} \right|{\bf{ c }}\\{\bf{D :: = 0 | 1}}\\\left( {\bf{b}} \right){\bf{string :: = signD + |D + }}\\{\bf{sign :: = + | - }}\\{\bf{D :: = 0 | 1|2|3|4|5|6|7|8|9}}\\\left( {\bf{c}} \right){\bf{string :: = L*}}\left( {{\bf{D + }}} \right){\bf{?L* }}\\{\bf{L :: = x |y }}\\{\bf{D :: = 0 | 1}}\end{array}\)

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