You must be logged in to read the answer. Go ahead and login, it'll take only a minute.
Login Now
Let,
S->0|0X1|01S1
X->0XX1|1S
As we get two different parse trees with one parse trees contains 0101 as input and other also contains 0101 but as a substring.
So, the given grammar is said to be ambiguous.
Find answer to specific questions by searching them here. It's the best way to discover useful content.
Download our mobile app and study on-the-go. You'll get subjects, question papers, their solution, syllabus - All in one app.