Chapter 13: Q7E (page 847)
Let V be an alphabet, and let A and B be subsets of \({\bf{V*}}\) with A⊆B. Show that \({\bf{A*}}\)⊆B*.
Short Answer
V be an alphabet, and A and B be subsets of \({\bf{V*}}\) with A⊆B then \({\bf{A*}}\)⊆\({\bf{B*}}\).
Chapter 13: Q7E (page 847)
Let V be an alphabet, and let A and B be subsets of \({\bf{V*}}\) with A⊆B. Show that \({\bf{A*}}\)⊆B*.
V be an alphabet, and A and B be subsets of \({\bf{V*}}\) with A⊆B then \({\bf{A*}}\)⊆\({\bf{B*}}\).
All the tools & learning materials you need for study success - in one app.
Get started for freeConstruct phrase-structure grammars to generate each of these sets.
a) \(\left\{ {\left. {{{\bf{0}}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)
b) \(\left\{ {\left. {{{\bf{1}}^{\bf{n}}}{\bf{0}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)
c) \(\left\{ {\left. {{{\left( {{\bf{000}}} \right)}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)
Show that the set \(\left\{ {{{\bf{1}}^{{{\bf{n}}^2}}}\left| {{\bf{n = 0,1,2,}}...} \right.} \right\}\) is not regular using the pumping lemma from Exercise 22.
a)what is the language generated by a phrase-structure grammar G?
b)What is the language generated by the grammar Gwith vocabulary{S,0,1}, set of terminals T= {0,1}, starting symbol S, and productions S→000S, S→1?
c)Give a phrase-structure grammar that generates the set \({\bf{\{ 0}}{{\bf{1}}^{\bf{n}}}{\bf{|n = 0,1,2}}....{\bf{\} }}\).
Find a phrase-structure grammar for each of these languages.
a) the set of all bit strings containing an even number of 0s and no 1s
b) the set of all bit strings made up of a 1 followed by an odd number of 0s
c) the set of all bit strings containing an even number of 0s and an even number of 1s
d) the set of all strings containing 10 or more 0s and no 1s
e) the set of all strings containing more 0s than 1s
f) the set of all strings containing an equal number of 0s and 1s
g) the set of all strings containing an unequal number of 0s and 1s
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}\)
What do you think about this solution?
We value your feedback to improve our textbook solutions.