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) = \{ }}1{\bf{\} *\{ }}0{\bf{\} \{ }}0{\bf{\} *}} \ cup {\bf{\{ 1\} \{ 0\} \{ 0\} *\{ 10,11\} \{ 0,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 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 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{o}}}\)

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

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

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

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

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

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

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

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

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

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

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

02

Find the final result.

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

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

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

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

However, it is also possible to end up at state \({{\bf{s}}_{\bf{3}}}\) if we obtain 1 followed by a bit. Thus, the sets of the strings ending at state \({{\bf{s}}_{\bf{1}}}\)followed by a 1 and at least one other bit are also 0 recognized languages:

\(\begin{array}{c}{\bf{\{ 0\} \{ 0\} *\{ 1\} \{ 0,1\} \{ 0,1\} * = \{ 0\} \{ 0\} *\{ 10,11\} \{ 0,1\} *}} \in {\bf{L(M)}}\\{\bf{\{ 1\} \{ 1\} *\{ 0\} \{ 0\} *\{ 1\} \{ 0,1\} (0,1\} * = \{ 1\} \{ 1\} *\{ 0\} \{ 0\} *\{ 10,11\} \{ 0,1\} *}} \in {\bf{L(M)}}\end{array}\)

Therefore, the language generated by the machine is:

\(\begin{aligned}{\bf{L(M) = \{ 0\} \{ 0\} *}} \cup {\bf{\{ 1\} \{ 1\} *\{ 0\} \{ 0\} }}* \cup {\bf{\{ 0\} \{ 0\} *\{ 10,11\} \{ 0,1\} }}* \cup {\bf{\{ 1\} \{ 1\} *\{ 0\} \{ 0\} *\{ 10,11\} \{ 0,1\} *}}\\{\bf{ = \{ 1\} *\{ 0\} \{ 0\} *}} \cup {\bf{\{ 1\} *\{ 0\} \{ 0\} *\{ 10,11\} \{ 0,1\} *}}\end{aligned}\)

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

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.

Express each of these sets using a regular expression.

  1. The set consisting of the strings 0, 11, and 010
  2. The set of strings of three 0s followed by two or more 0s
  3. The set of strings of odd length
  4. The set of strings that contain exactly one 1
  5. The set of strings ending in 1 and not containing 000

In Exercises 43–49 find the language recognized by the given nondeterministic finite-state automaton.

Show that a set is generated by a regular grammar if and only if it is a regular set.

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

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