Computer Science, asked by srkramoji, 1 year ago

Consider the following grammar G,
S→abAA→baBB→aA∣bb,
which of the following statements are true with respect to G?

1. G is ambiguous.

2. G is unambiguous.

3. L(G) is regular.

4. L(G)=ab(ba+a)∗bb.



Answers

Answered by genius1199
4

Answer:

1) G is ambiguous..........

Answered by syed2020ashaels
0
  • A Context-free Grammar is said to be ambiguous it it has more than one deviation tree for the given input string.
  • It seems that in the question it has many derivation tree or a parse tree.
  • A Grammar which has at least 2 left derivation or parse tree it is termed as ambiguous.
  • Hence, From the above we conclude that the given grammar is ambiguous.
  • G is ambiguous
  • The option 1 is correct
  • #spj3
Similar questions