retagged by
1,721 views

2 Answers

2 votes
2 votes

In your question, it's not only have left recursion but also have loop...

in loop cases first you have break the loop, for that change any one variable of them then another variable doesn't lead to loop

1) change A

                 A-> Sca/Ada/b

                 S->Sc/Ad

it looping again and again...... therefore don't change A

2) Change S

           S->Sc/Sad/bd

          A-> Sa/b

it's does not looping but have left recursion.... now eliminate the left recursion..

E-> Eα1/ Eα2/.../Eαn12/.../βm 
is changed as
E -> β1E'/β2E'/.../βmE' 
E' -> α1E'/ α2E'/.../αnE' / ∈

According to the formula...

          S -> bdS'

         S' -> cS' / adS' /  ∈

          A-> Sa/b

Related questions

4 votes
4 votes
1 answer
2
0 votes
0 votes
0 answers
3
Na462 asked Sep 19, 2018
402 views
Remove the Left Recursion from it : A - B|a|CBDB - C|bC - A|cD - d
0 votes
0 votes
1 answer
4
Mk Utkarsh asked Jan 31, 2018
1,184 views
Remove Left Recursion from the following Context Free Grammar.$S \rightarrow Aa| Sa|c$$A \rightarrow Ab|Sd|e$