Pushdown Automata and Context-Free Grammars
[13/46%]Consider the context-free grammar , with the rules
Construct a PDA such that .
Construct a context-free grammar such that , where is the PDA of Example 3.29.
Show that if is a regular language and is a context-free language, then is a context-free language.
Show that is a contextfree language.
Show that if is a context-free language and is a regular language, then the quotient is a context-free language.
Show that if is regular, then
is context-free.
For each of the following context-free grammars , following the procedure of Theorem 3.35 to construct a PDA that accepts the language :
.
.
The grammar of Solution 2 to Example 3.6.
The unambiguous grammar of Example 3.24(b).
For each of the following PDA's , following the procedure of Theorem 3.37 to construct a context-free grammar that generates the language :
The PDA of Example 3.30.
The PDA of Figure 3.14(a) (for language ).
Construct pushdown automata to accept the following languages:
.
.
.
.
Show that if is a regular language, then each of the following languages is context-free:
.
.
.
.
Show that is a context-free language, if is context-free and is regular.
A two-stack pushdown automaton (2-stack PDA) is a PDA with two pushdown stacks. At each move, can read, in addition to an input symbol, the top symbols of both stacks, and to write symbols to both stacks. Formally, a 2 -stack PDA is a 6 -tuple , where are the same as those of a PDA, and is a transition function
Let , and . Then, an instruction , indicates that the PDA reads the input , the top symbol of stack 1, the top symbol of stack 2, and then it moves to state , repaces by and replaces by .
Define formally the notion of configurations and successor configurations of a 2 -stack PDA.
Construct a 2-stack PDA to accept the language .
Construct a 2 -stack PDA to accept the language .
A pushdown automaton is called a linear-bounded PDA if there is a constant such that the size of the stack of , during its computation on any input , is bounded by . Show that the class of languages accepted by linear-bounded PDA's is exactly the class of context-free languages.