1 / 6

CFG Ambiguity

A CFL is ambiguous for 3 reasons. If G is a CFG, then for any x E L ( G ) these three statements are equivalent: 1. x has more than one derivation tree. 2. x has more than one LMD. 3. x has more than one RMD. CFG Ambiguity. Show the CFG with THE FOLLOWING PRODUCTION AMBIGUOUS.

cala
Download Presentation

CFG Ambiguity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A CFL is ambiguous for 3 reasons. If G is a CFG, then for any x EL(G) these three statements are equivalent: 1. x has more than one derivation tree. 2. x has more than one LMD. 3. x has more than one RMD. CFG Ambiguity

  2. Show the CFG with THE FOLLOWING PRODUCTION AMBIGUOUS. S -> a| Sa|bSS|SSb|SbS Consider the string baaa

  3. Select two different production S->Sa and S->bss respectively.

  4. For the same string we got two different derivation tree. Therefore, the CFG is ambiguous.

More Related