retagged by
3,172 views
0 votes
0 votes
S->AaAb|Bb

A->ε

B->ε

how can this grammar be left factored grammar?
retagged by

1 Answer

Best answer
2 votes
2 votes

left factoring is use to remove non determinism....means for a given input string if we cant decide on seeing a symbol which production to use...
A non deterministic grammar is of the form A->aB/abC(example)...here on seeing 'a' we cant decide whether to use aB or abC

now coming to the question...it is already left factored....we dont have to make any decision on seeing an input symbol...

final conclusion:-NO need to do any left factoring....given grammar is already non deterministic....

edited by

Related questions

1 votes
1 votes
1 answer
3
2 votes
2 votes
2 answers
4
A_i_$_h asked Oct 20, 2017
867 views
Eliminate left recurrsion from $S\rightarrow S0S1S | 01$