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 43–49 find the language recognized by the given nondeterministic finite-state automaton.

Short Answer

Expert verified

The result is\({\bf{L(M) = \{ 100,101\} *}} \cup {\bf{\{ 1\} \{ 001,011\} *}}\).

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 down in 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{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)

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

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

02

Find the final result.

The start state\({{\bf{s}}_{\bf{o}}}\)is also the final state, which implies that the empty strings \({\bf{\lambda }}\) is present in the recognized language.

\({\bf{\lambda }} \in {\bf{L(M)}}\)

To Move from \({{\bf{s}}_{\bf{o}}}\) the final state \({{\bf{s}}_{\bf{1}}}\)(directly), I require that the input is 1. Thus, the string 1 will be in recognized language.

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

To move from\({{\bf{s}}_{\bf{o}}}\)to\({{\bf{s}}_{\bf{2}}}\), the input has to be a 0. The input needs to start with 10. To then move from \({{\bf{s}}_{\bf{2}}}\)to \({{\bf{s}}_{\bf{o}}}\), the input can be anything and thus the strings need to start with 1000 or 101. Since I can execute the circuit from \({{\bf{s}}_{\bf{o}}}\)to\({{\bf{s}}_{\bf{o}}}\) as many times as possible.

\({\bf{\{ 1}}00,{\bf{1}}01{\bf{\} *}} \subseteq {\bf{L(M)}}\)

To move from\({{\bf{s}}_{\bf{1}}}\)to\({{\bf{s}}_{\bf{2}}}\), the input has to be a 10. To then move from \({{\bf{s}}_{\bf{2}}}\)to \({{\bf{s}}_{\bf{o}}}\), the input can be anything and thus the strings need to start with 1000 or 101. To move from\({{\bf{s}}_{\bf{o}}}\)to \({{\bf{s}}_{\bf{1}}}\)again, I require that the input 1 and thus the strings need to start with 1001 or 1011. Since I can execute the circuit from \({{\bf{s}}_{\bf{1}}}\)to \({{\bf{s}}_{\bf{1}}}\)as many times as possible, the recognized language contains all strings starting with a 1,followed with as many repetitions of 001 or 011 as possible.

\({\bf{\{ 1\} \{ }}00{\bf{1}},011{\bf{\} *}} \subseteq {\bf{L(M)}}\)

Therefore, the language generated by the machine is

\(\begin{array}{l}{\bf{L(M) = \{ \lambda }},1{\bf{\} }} \cup {\bf{\{ }}10{\bf{0\} \{ 1}}01{\bf{\} *}} \cup {\bf{\{ 1\} \{ 001,011\} }}\\{\bf{L(M) = \{ 100,101\} *}} \cup {\bf{\{ 1\} \{ 001,011\} *}}\end{array}\)

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

A context-free grammar is ambiguous if there is a word in \({\bf{L(G)}}\) with two derivations that produce different derivation trees, considered as ordered, rooted trees.

Show that the grammar \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) with \({\bf{V = }}\left\{ {{\bf{0, S}}} \right\}{\bf{,T = }}\left\{ {\bf{0}} \right\}\), starting state \({\bf{S}}\), and productions \({\bf{S}} \to {\bf{0S,S}} \to {\bf{S0}}\), and \({\bf{S}} \to 0\) is ambiguous by constructing two different derivation trees for \({{\bf{0}}^{\bf{3}}}\).

Show that if \({\bf{M = (S,I,f,}}{{\bf{s}}_{\bf{o}}}{\bf{,F)}}\) is a deterministic finite state automaton and f (s, x)=sfor the state s∈Sand the input string x∈I*, then \({\bf{f(s,}}{{\bf{x}}^{\bf{n}}}{\bf{)}}\)=sfor every nonnegative integer n. (Here \({{\bf{x}}_{\bf{n}}}\) is the concatenation of ncopies of the string x, defined recursively in Exercise 37in Section 5.3.)

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

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

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

c) What is the language generated by G?

Find a phrase-structure grammar for each of these languages.

a) the set consisting of the bit strings 0, 1, and 11

b) the set of bit strings containing only 1s

c) the set of bit strings that start with 0 and end with 1

d) the set of bit strings that consist of a 0 followed by an even number of 1s.

Show that the grammar given in Example 7 generates the set,

\({\bf{\{ }}{{\bf{0}}^{\bf{n}}}{{\bf{1}}^{\bf{n}}}{{\bf{2}}^{\bf{n}}}{\bf{|}}\,{\bf{n = 0,}}\,{\bf{1,}}\,{\bf{2,}}\,...{\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