Chapter 13: Q57E (page 877)
Show that there is no finite-state automaton that recognizesthe set of bit strings containing an equal number of 0s and 1s.
Short Answer
By the pigeonhole principle shows that there is no finite state automaton.
Chapter 13: Q57E (page 877)
Show that there is no finite-state automaton that recognizesthe set of bit strings containing an equal number of 0s and 1s.
By the pigeonhole principle shows that there is no finite state automaton.
All the tools & learning materials you need for study success - in one app.
Get started for freea) Explain what the productions are in a grammar if the Backus–Naur form for productions is as follows:
\(\begin{array}{*{20}{l}}{{\bf{ < expression > :: = }}\left( {{\bf{ < expression > }}} \right){\bf{ }}\left| {{\bf{ < expression > + < expression > }}} \right|}\\\begin{array}{c}{\bf{\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;}}\,\,\,\,{\bf{ < expression > * < expression > |}}\\\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{\bf{ < variable > }}\end{array}\\{\,\,\,\,\,\,\,\,\,{\bf{ < variable > :: = xly}}}\end{array}\)
b) Find a derivation tree for \(\left( {{\bf{x*y}}} \right){\bf{ + x}}\) in this grammar.
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.
In Exercises 16–22 find the language recognized by the given deterministic finite-state automaton
For each of these strings, determine whether it is generated by the grammar for infix expressions from Exercise 40. If it is, find the steps used to generate the string.
\(\begin{array}{*{20}{l}}{{\bf{a) x + y + z}}}\\{{\bf{b) a/b + c/d}}}\\{{\bf{c) m*}}\left( {{\bf{n + p}}} \right)}\\{{\bf{d) + m - n + p - q}}}\\{{\bf{e) }}\left( {{\bf{m + n}}} \right){\bf{*}}\left( {{\bf{p - q}}} \right)}\end{array}\)
a) Construct a phrase-structure grammar for the set of all fractions of the form a/b, where a is a signed integer in decimal notation and b is a positive integer.
b) What is the Backus–Naur form for this grammar?
c) Construct a derivation tree for +311/17 in this grammar.
What do you think about this solution?
We value your feedback to improve our textbook solutions.