Chapter 13: Q46E (page 877)
In Exercises 43–49 find the language recognized by the given nondeterministic finite-state automaton.
Short Answer
The result is\({\bf{L(M) = \{ 100,101\} *}} \cup {\bf{\{ 1\} \{ 001,011\} *}}\).
Chapter 13: Q46E (page 877)
In Exercises 43–49 find the language recognized by the given nondeterministic finite-state automaton.
The result is\({\bf{L(M) = \{ 100,101\} *}} \cup {\bf{\{ 1\} \{ 001,011\} *}}\).
All the tools & learning materials you need for study success - in one app.
Get started for freeA 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{\} }}\).
What do you think about this solution?
We value your feedback to improve our textbook solutions.