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

Find a deterministic finite-state automaton that recognizes the same language as the nondeterministic finitestate automaton in Exercise 45.

Short Answer

Expert verified

The result is

State01
\({{\bf{s}}_{\bf{0}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{4}}}\)

Step by step solution

01

Construction of deterministic finite-state automaton.

From the exercise (45) I determine the language recognized by the machine is

\({\bf{L(M) = \{ 0\} \{ 1\} *}} \cup {\bf{\{ 0\} \{ 0\} *\{ 1\} \{ 1\} *}}\).

Let us consider five states \({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{{\bf{1,}}}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\).

Let start with the state be \({{\bf{s}}_{\bf{0}}}\).Since the empty string in the set S, is not a final state.

If the input starts with a 1, then it remains at state\({{\bf{s}}_{\bf{1}}}\). If the next input is followed by a 0, then it moves on to another non-final state\({{\bf{s}}_{\bf{2}}}\), and if the input contains another 1,then itmoves on to the final state\({{\bf{s}}_{\bf{3}}}\)elseit remains at the non-final state\({{\bf{s}}_{\bf{2}}}\).

If the input starts with a 1, then remains at the state\({{\bf{s}}_{\bf{3}}}\)else it moves on to the non-final state\({{\bf{s}}_{\bf{4}}}\).

If the input starts with a 1, then it moves on to a non-finalstate\({{\bf{s}}_{\bf{4}}}\)and then I never leave at the state \({{\bf{s}}_{\bf{4}}}\)again.

02

Sketch of deterministic finite-state automaton.

The sketch of deterministic finite-state automation can be drawn by fivestates \({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{{\bf{1,}}}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\). The sketch is

03

Other way of representing in tabular form.

State01
\({{\bf{s}}_{\bf{0}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{4}}}\)

Therefore, this is the require construction.

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

Let V be an alphabet, and let A and B be subsets of \({\bf{V*}}\) with AโІB. Show that \({\bf{A*}}\)โІB*.

A palindrome is a string that reads the same backward as it does forward, that is, a string w, where \({\bf{w = }}{{\bf{w}}^{\bf{R}}}\), where \({{\bf{w}}^{\bf{R}}}\) is the reversal of the string w. Find a context-free grammar that generates the set of all palindromes over the alphabet {0, 1}.

Construct phrase-structure grammars to generate each of these sets.

a) \(\left\{ {\left. {{{\bf{0}}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

b) \(\left\{ {\left. {{{\bf{1}}^{\bf{n}}}{\bf{0}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

c) \(\left\{ {\left. {{{\left( {{\bf{000}}} \right)}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

Give production rules in extended Backusโ€“Naur form that generate all decimal numerals consisting of an optional sign, a nonnegative integer, and a decimal fraction that is either the empty string or a decimal point followed by an optional positive integer optionally preceded by some number of zeros.

Let \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) be the context-free grammar with \({\bf{V = }}\left\{ {\left( {\bf{,}} \right){\bf{S,A,B}}} \right\}{\bf{, T = }}\left\{ {\left( {\bf{,}} \right)} \right\}\) starting symbol \({\bf{S}}\), and productions \({\bf{S}} \to {\bf{A,A}} \to {\bf{AB,A}} \to {\bf{B,B}} \to {\bf{A,}}\)and \({\bf{B}} \to {\bf{(),S}} \to {\bf{\lambda }}\)

Construct the derivation trees of these strings.

\({\bf{a)}}\)\({\bf{(())}}\)

\({\bf{b)}}\)\({\bf{()(())}}\)

\({\bf{c)}}\)\({\bf{((()()))}}\)

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