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 following two grammars :

G1 :     S → AB | aaB

A → a | Aa

B → b

G2: S→ aSbS|bSaS|λ

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

Similar Questions: