• retagged by
4,389 views
1 1 vote
S->AaAb|Bb

A->ε

B->ε

how can this grammar be left factored grammar?

1 Answer

Best answer
2 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
Position:
Show:

Related questions

0 0 votes
1 1 answer
595
595 views
A_i_$_h asked Sep 7, 2017
595 views
E - E+T / TT - idgrammar after left recursion isa) E->T +E / T T ->idb)E ->T / E + TT ->idc) E->E' TT->+TE' / epsilond)E ->TXX- +TX / epsilonActually i...
0 0 votes
0 0 answers
579
579 views
Ashutosh_RS asked Mar 28, 2025
579 views
Eliminate left Recursion from the following Grammar: S->AB, A->BS|b, B->SA|a
1 1 vote
1 1 answer
1.5k
1.5k views
susgir2 asked Jan 2, 2019
1,460 views
Grammar. S → Aa | B A → Ac | Aad | bd | epsilon . .