Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I prove that the following grammar is ambiguous:
$$ A \to AA|B \\ B \to aBb|ab $$$$ A \to AA\mid B \\ B \to aBb\mid ab $$
I tried finding a string that can be derived in two different ways, but to no avail.
$$ A \to AA|B \\ B \to aBb|ab $$
$$ A \to AA\mid B \\ B \to aBb\mid ab $$
How can I prove ifthat the following grammar is ambiguous : A -> AA|B B - > aBb|ab
I tried finding a string that I can derivebe derived in 2two different ways, but am not winningto no avail. Please help
How can I prove if the following grammar is ambiguous : A -> AA|B B - > aBb|ab
I tried finding a string that I can derive in 2 ways but am not winning. Please help