A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Given the production rules of a grammar G1 as

S1→AB | aaB
A→a | Aa
B→b

and the production rules of a grammar G2 as

S2→aS2bS2 | bS2aS2 | λ

Which of the following is correct statement?
a. G1 is ambiguous and G2 is not ambiguous
b. G1 is ambiguous and G2 is ambiguous
c. G1 is not ambiguous and G2 is ambiguous
d. G1 is not ambiguous and G2 is not ambiguous
Answer:G1 is ambiguous and G2 is ambiguous
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: