672 views
0 votes
0 votes

Consider the following two ambigious context free grammars. 


Which of the above ambigious CFG’s has an equivalent unambiguous CFG

  • I only
  • II only
  • Both I and II
  • Neither I nor II

3 Answers

1 votes
1 votes

every DCFL have unambiguous grammar .

both languages are DCFL then it must have an equivalent unambiguous grammar .

0 votes
0 votes
For 1st one we have $S\rightarrow aSb / \epsilon$.

For 2nd one we have $S\rightarrow aaSb/ aab/ aSb/ \epsilon$

Related questions

0 votes
0 votes
1 answer
2
Ayanava Dutta asked Mar 17
81 views
How many 256 X 1K bit chips are required to build 1 MB of memory?
0 votes
0 votes
0 answers
3
Ayanava Dutta asked Mar 17
75 views
Number of nodes in the DAG(Directed Acyclic Graph) representing (a+b)+c+(a+b)
0 votes
0 votes
1 answer
4
gaddalakonda_ganesh asked Apr 10, 2023
268 views
Which of the following are truea. A relational table can have atmost one foreign keyb. The main purpose of foreign key is to optimize the queries by query optimizer.