Removing Left recursion


#1

Remove left recursion from he following grammar
S-> Aa | b
A-> Ac | Sd | $

here $ denotes epsilon.

What will be the solution ?


#2

The answer is:
S->Aa | b
A-> SdA’
A’->CA’ | $
Because, for the form- A->Aà | ã , the solution is: A-> ãA’ and A’->àA’ | $
Here, à is alpha and ã is beta. $ is epsilon.