retagged by
988 views
2 votes
2 votes

Make this grammer into unambiguous

retagged by

1 Answer

0 votes
0 votes
$$L(G) = x^nx^+xx^n, n\geq 0$$

If we take n = 0, then the language becomes $x^+x = xxx^*$ which generates all the strings produced by G.

A simple unamibigous grammar producing the same language will be,

$$S\rightarrow Sx|xx$$
edited by

Related questions

1 votes
1 votes
1 answer
1
2 votes
2 votes
3 answers
2
Rahul Ranjan 1 asked May 28, 2018
1,445 views
If a grammar( $CFG$ ) has more than one Right most derivation, Can it be called ambiguous ?Or we say a grammar is ambiguous only when it has more than one left most deriv...
2 votes
2 votes
1 answer
3
Prakash059 asked May 3, 2016
2,009 views
If a grammer(CFG) is ambiguous then we can construct the topdown and bottomup parsing is possible directly???or we will make them into unambiguous then we will construct?...
1 votes
1 votes
1 answer
4
learner_geek asked Aug 2, 2017
561 views
If i am wrong please let me correct with giving proper explanation.