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

G1: S → AB|aaB

A → aA | ∈

B → bB | ∈

G2: S → A | B

A → a A b | ab

B → a b B | ∈

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

Similar Questions: