in Theory of Computation
650 views
1 vote
1 vote

 

in Theory of Computation
by
650 views

2 Comments

Ans. B. Please Explain every Point
0
0
what is ambiguous grammar?

for a string, if more than one parse tree possible, then it is ambiguous...

yes in due to NFA, there may be possible more than one parse tree for a given string.

 

Note that not every Regular grammar is un-ambiguous but there should be atleast one un-ambiguous grammar exist which is equivalent to that ambiguous grammar.
0
0

1 Answer

0 votes
0 votes
For the given question

1st statement is false because power of NFA=power of DFA and both are unambiguous therefore the ambiguity cant be occur due to NFA

2nd statement is that ambiguity of cfg is due to NPDA it could be true because the  power of NPDA is superset of DPDA therefore every cfg is a NPDA can accept the ambiguous  grammar

3rd statement is always true because anyway every regular expression is unambiguous only

it is dependent on language that whether it accepts the ambiguous grammar or not.

2 Comments

S---> aA/aB

A--->a

B---->b

 

It is regular grammar and it is ambiguous

So regular grammar can also be ambiguous.
0
0
how it is ambiguous??
0
0

Related questions