Show that the following CFGs that use A are ambiguous: (i) S XaX X aX

Question:

Show that the following CFGs that use A are ambiguous:

(i) S → XaX
X → aX l bX I Λ

(ii) S → aSX I Λ
X → aX l a

(iii) S → aS l bS l aaS I Λ

(iv) Find unambiguous CFGs that generate these three languages.

(v) For each of these three languages, find an unambiguous grammar that generates exactly the same language except for the word Λ. Do this by not employing the symbol Λ in the CFGs at all.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: