100 likes | 323 Vues
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.
E N D
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
Show the CFG with THE FOLLOWING PRODUCTION AMBIGUOUS. S -> a| Sa|bSS|SSb|SbS Consider the string baaa
Select two different production S->Sa and S->bss respectively.
For the same string we got two different derivation tree. Therefore, the CFG is ambiguous.