Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stdnt id: roll no..

Similar presentations


Presentation on theme: "Stdnt id: roll no.."— Presentation transcript:

1 Stdnt id: roll no.

2 Ambiguous CFG: The CFG is Said to be Ambiguous if There exist at least one word of it’s language that it can be generated by the Different production trees.

3 Example: Consider The Following CFG S as|Sa|a The Words aan can be generated by the Following three different Trees Examples: S S S a a S a S S a S S a S a a a a

4 Thus the above CFG is ambiguous, while CFG, S aS|a is not ambiguous as Neither the word aaa nor any other word can be Derived from more then one Production Trees. The derivation tree for aaa is as follows. S S a a S a


Download ppt "Stdnt id: roll no.."

Similar presentations


Ads by Google