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 finite-state automaton in Exercise 47.

Short Answer

Expert verified

The result is

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

Step by step solution

01

Construction of deterministic finite-state automaton.

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

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

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

At state \({{\bf{s}}_{\bf{1}}}\),there is a loop with input 0 and an arrow from\({{\bf{s}}_{\bf{1}}}\) to \({{\bf{s}}_{\bf{2}}}\)with input 0. it can remove the arrow from\({{\bf{s}}_{\bf{1}}}\)to\({{\bf{s}}_{\bf{2}}}\), since \({{\bf{s}}_{\bf{2}}}\)is not a final state and it can never leave \({{\bf{s}}_{\bf{2}}}\)again once you reached it. Thus, the loop with input 0 at \({{\bf{s}}_{\bf{1}}}\) is then sufficient.

At state\({{\bf{s}}_{\bf{3}}}\), there is a loop with input 0 and an arrow from\({{\bf{s}}_{\bf{2}}}\)to\({{\bf{s}}_{\bf{3}}}\) with input 2. It can remove the arrow from\({{\bf{s}}_{\bf{3}}}\)to\({{\bf{s}}_{\bf{2}}}\), since \({{\bf{s}}_{\bf{2}}}\)is not a final state and it can never leave \({{\bf{s}}_{\bf{2}}}\)again once you reached it. Thus, the loop with input 0 at \({{\bf{s}}_{\bf{3}}}\) is then sufficient.

Finally,there are no arrows from state\({{\bf{s}}_{\bf{2}}}\)to another state nor loops at\({{\bf{s}}_{\bf{2}}}\). It can then add loops at \({{\bf{s}}_{\bf{2}}}\)with input 0,1, since \({{\bf{s}}_{\bf{2}}}\)is not a final state.

02

Sketch of deterministic finite-state automaton.

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

03

Other way of representing in tabular form

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

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

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

Find five other valid sentences, besides those given in Exercise 1.

a) Explain what the productions are in a grammar if the Backusโ€“Naur form for productions is as follows:

\(\begin{array}{*{20}{l}}{{\bf{ < expression > :: = }}\left( {{\bf{ < expression > }}} \right){\bf{ }}\left| {{\bf{ < expression > + < expression > }}} \right|}\\\begin{array}{c}{\bf{\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;}}\,\,\,\,{\bf{ < expression > * < expression > |}}\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{\bf{ < variable > }}\end{array}\\{\,\,\,\,\,\,\,\,\,{\bf{ < variable > :: = xly}}}\end{array}\)

b) Find a derivation tree for \(\left( {{\bf{x*y}}} \right){\bf{ + x}}\) in this grammar.

Let G be the grammar with V = {a, b, c, S}; T = {a, b, c}; starting symbol S; and productions \({\bf{S }} \to {\bf{ abS, S }} \to {\bf{ bcS, S }} \to {\bf{ bbS, S }} \to {\bf{ a, and S }} \to {\bf{ cb}}{\bf{.}}\)Construct derivation trees for

\(\begin{array}{*{20}{l}}{{\bf{a) bcbba}}{\bf{.}}}\\{{\bf{b) bbbcbba}}{\bf{.}}}\\{{\bf{c) bcabbbbbcb}}{\bf{.}}}\end{array}\)

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

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