Chapter 2: Context-Free Languages
10E
Give an informal description of a pushdown automaton that recognizes the language in Exercise 2.9.
11E
Convert the CFG given in Exercise 2.1 to an equivalent PDA, using the procedure given in Theorem 2.20
12E
Convert the CFG given in Exercise 2.3 to an equivalent PDA, using the procedure given in Theorem 2.20.
Q12E
Convert the CFG given in Exercise 2.3 to an equivalent PDA, using the procedure given in Theorem 2.20.
Q13E
Let be the following grammar. R is the set of rules:
a. Describe in English.
b. Prove thatis not regular.
Q14E
Convert the following CFG into an equivalent CFG in Chomsky normal form, using the procedure given in Theorem 2.9.
Q1E
Recall the CFG G4 that we gave in Example 2.4. For convenience, let’s rename its variables with single letters as follows.
Give parse trees and derivations for each string.
a. a
b. a+a
c. a+a+a
d. ((a))
Q23P
Let Show that is a context-free language.
Q24P
Let . Show that is context-free language.
Q27P
Let be the following grammar.
G is a natural-looking grammar for a fragment of a programming language, but G is ambiguous.
a. Show that G is ambiguous.
b. Give a new unambiguous grammar for the same language