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

In Exercises 16–22 find the language recognized by the given deterministic finite-state automaton

Short Answer

Expert verified

The result is:

\({\bf{L(M) = }}\lambda \cup {\bf{\{ 0\} \{ 1\} \{ 0\} }} \cup {\bf{\{ 10,11\} \{ 0,1\} }} \cup {\bf{\{ 0\} \{ 1\} \{ 01\} \{ 0,1\} }} \cup {\bf{\{ 0\} \{ 1\} \{ 00\} \{ 0\} \{ 1\} \{ 0,1\} }}*\)

Step by step solution

01

According to the figure.

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

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

State

0

1

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

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

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

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

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

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

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

\({{\bf{s}}_4}\)

\({{\bf{s}}_4}\)

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

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

\({{\bf{s}}_4}\)

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

\({{\bf{s}}_4}\)

\({{\bf{s}}_4}\)

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

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

\({{\bf{s}}_4}\)

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

02

Find the final result.

Because\({{\bf{s}}_{\bf{o}}}\)is the final state, the empty string is accepted. The string that drives the machine to the final state \({{\bf{s}}_{\bf{3}}}\)is precise\({\bf{\{ 0\} \{ 1\} \{ 0\} }}\).

There are three ways to get to the final state\({{\bf{s}}_{\bf{4}}}\), and once I get three, I stay there. The path thorough \({{\bf{s}}_{\bf{2}}}\)tells those strings in \({\bf{\{ 10,11\} \{ 0,1\} }}\) are accepted.

The path \({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\) tells that the strings in \({\bf{\{ 0\} \{ 1\} \{ 01\} \{ 0,1\} }}\) are accepted and the path \({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}},{{\bf{s}}_{\bf{4}}}\)tells those strings in \({\bf{\{ 0\} \{ 1\} \{ 00\} \{ 0\} \{ 1\} \{ 0,1\} *}}\)are accepted.

Therefore, the language recognized by machines is:

\({\bf{L(M) = }}\lambda \cup {\bf{\{ 0\} \{ 1\} \{ 0\} }} \cup {\bf{\{ 10,11\} \{ 0,1\} }} \cup {\bf{\{ 0\} \{ 1\} \{ 01\} \{ 0,1\} }} \cup {\bf{\{ 0\} \{ 1\} \{ 00\} \{ 0\} \{ 1\} \{ 0,1\} }}*\)

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 \({{\bf{G}}_{\bf{1}}}\) and \({{\bf{G}}_{\bf{2}}}\) be context-free grammars, generating the language\({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right)\) and \({\bf{L}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\), respectively. Show that there is a context-free grammar generating each of these sets.

a) \({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right){\bf{UL}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\)

b) \({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right){\bf{L}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\)

c) \({\bf{L}}{\left( {{{\bf{G}}_{\bf{1}}}} \right)^{\bf{*}}}\)

Let G = (V, T, S, P) be the phrase-structure grammar with V = {0, 1, A, S}, T = {0, 1}, and set of productions P consisting of S → 1S, S → 00A, A → 0A, and A → 0.

a) Show that 111000 belongs to the language generated by G.

b) Show that 11001 does not belong to the language generated by G.

c) What is the language generated by G?

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

In Exercises 16–22 find the language recognized by the given deterministic finite-state automaton

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?

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