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) = \{ 0\} *\{ 1\} \{ 1\} *}}\).

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 the figure.

Here the given figure contains three states \({{\bf{s}}_{\bf{o}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}\).

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

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

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

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

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

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

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

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

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

Since \({{\bf{s}}_{\bf{1}}}\) encircled twice, a string will be recognized by the deterministic finite state automaton if we end at state \({{\bf{s}}_{\bf{1}}}\).

02

Find the final result.

If the string starts with a 1, then we move from state \({{\bf{s}}_{\bf{o}}}\) to \({{\bf{s}}_{\bf{1}}}\), while we always remain at the state \({{\bf{s}}_{\bf{1}}}\) and if the remaining string contains only 1’s from state \({{\bf{s}}_{\bf{1}}}\) to \({{\bf{s}}_{\bf{2}}}\) if come across zero and always remain at state \({{\bf{s}}_{\bf{2}}}\), and thus all strings consisting of only 1’s and at least one 1 are in recognized language.

\({\bf{\{ }}1{\bf{\} \{ 1\} *}} \ in {\bf{L(M)}}\)

If the string starts with a 0, then we remain at the state \({{\bf{s}}_{\bf{o}}}\) and obtained the first 1. We then remain at state \({{\bf{s}}_{\bf{1}}}\) if the remaining string contains only 1’ and thus all strings containing of only 1’s and at least one 1 a 1 are in the recognized language.

\({\bf{\{ 0\} \{ 0\} *\{ 1\} \{ 1\} *}} \subseteq {\bf{L(M)}}\)

Hence, the language generated by the machine is:

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

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

Suppose that A is a subset of\({{\bf{V}}^{\bf{*}}}\)where V is an alphabet.Prove or disprove each of these statements.

\(\begin{array}{l}{\bf{a)}}\,\,{\bf{A}} \subseteq {{\bf{A}}^{\bf{2}}}\\{\bf{b)}}\,\,{\bf{if}}\,{\bf{A = }}{{\bf{A}}^{\bf{2}}}{\bf{,then}}\,{\bf{\lambda }} \in {\bf{A}}\\{\bf{c)}}\,\,{\bf{A\{ \lambda \} = A}}\\{\bf{d)}}\,\,{{\bf{(}}{{\bf{A}}^{\bf{*}}}{\bf{)}}^{\bf{*}}}{\bf{ = }}{{\bf{A}}^{\bf{*}}}\\{\bf{e)}}\,\,{{\bf{A}}^{\bf{*}}}{\bf{A = }}{{\bf{A}}^{\bf{*}}}\\{\bf{f)}}\,\,\left| {{{\bf{A}}^{\bf{n}}}} \right|{\bf{ = }}{\left| {\bf{A}} \right|^{\bf{n}}}\end{array}\)

Determine whether the string 11101 is in each of these sets.

a){0,1}* b){1}*{0}*{1}*

c){11} {0}*{01 d){11}*{01}*

e){111}*{0}*{1} f){11,0} {00,101}

a) Show that the grammar \({{\bf{G}}_{\bf{1}}}\) given in Example 6 generates the set\({\bf{\{ }}{{\bf{0}}^{\bf{m}}}{{\bf{1}}^{\bf{n}}}{\bf{|}}\,{\bf{m,}}\,{\bf{n = 0,}}\,{\bf{1,}}\,{\bf{2,}}\,...{\bf{\} }}\).

b) Show that the grammar \({{\bf{G}}_{\bf{2}}}\) in Example 6 generates the same set.

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

Let V be an alphabet, and let A and B be subsets of \({\bf{V*}}\) Show that \({\bf{|AB}}\left| {{\rm{ }} \le {\rm{ }}} \right|{\bf{A||B|}}\).

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