next up previous
Next: Exercise 2. Up: Quiz1 Previous: Guidelines.

Exercise 1.

Consider the following grammar G (with terminals a, b and nonterminals S, A)
S $ \longmapsto$ AS  |  b
A $ \longmapsto$ SA  |  a
Let L be the language generated by G. Consider the words w1 = baab, w2 = abab, w3 = bbaa. For i = 1, 2, 3, if wi belongs to L then give a parse tree for wi with G.

Answer 1  
\fbox{
\begin{minipage}{13 cm}
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\mbox{ } \\
\end{minipage}}


next up previous
Next: Exercise 2. Up: Quiz1 Previous: Guidelines.
Marc Moreno Maza
2004-12-02