in Theory of Computation
692 views
0 votes
0 votes
what are non inheritably unambiguous and ambiguous grammars

and what are  inheritably unambiguous and ambiguous  grammars

please explain this..
in Theory of Computation
692 views

4 Comments

ok ,but then what is approach to find whether it is inherently ambiguous or not??
0
0

Try to convert the given ambiguous grammar to unambiguous form and if you are sure enough that there is no possible way to make it ambiguity-free then that is inherently ambiguous. 

To make ambiguous to unambiguous watch https://www.youtube.com/watch?v=9vmhcBpZDcE&t=935s

1
1
ohk so  by seeing precedence ,associativity  we can determine whether it is ambiguous or not??
0
0

1 Answer

0 votes
0 votes

IUL->If there exist unambiguos CFG for any language then it is IUL.

Ex-{ambn| m=2n or n=2m}

IAL->Every CFG equivalent to IAL 'L' must be Ambiguos CFG.(No unambiguos CFG exist for IAL)

Ex-{ambnck |m=n or n=k}

 

 

 

 

 

 

 

Set of DCFL's ⊆ Set of IUL's ⊆ Set of CFL's(IAL's)

Every CFG is ambiguos.

Every DCFL,Finite,Regular language is IUL.

4 Comments

but regular Languages can be ambiguous because of the NFA.

So not every RL unambiguous
0
0
If the grammar derives a  string in more than one way Then it is Ambiguos..

Anyway NFA can be converted to it's equivalent DFA.
0
0
ohk means regular can be ambiguous but cannot be inherently ambiguous
0
0
1
1