Problem
1. Give a precise explanation of the meaning of ambiguity in a gram- mar, and explain why ambiguity is undesirable in computer lan- guage syntax. Illustrate your answer by drawing two parse trees for the sentence 2 + 3 x 4, and explaining their significance.
2. Give a precise explanation of the meaning of nondeterminism in a grammar, and explain why nondeterminism is undesirable in computer language syntax. Illustrate your answer by considering the language {aa,ab} and writing two grammars to generate it; one nondeterministic and the other deterministic. Your answer must make clear which grammar is nondeterministic and which is deterministic, and why.