Eliminate Aproductions for the CFG S rightarrow aXbX X right

Eliminate A-productions for the CFG: S rightarrow aXbX X rightarrow aY | bY | Lambda Y rightarrow X | ZY | b Z rightarrow XY | c

Solution

S -> aXbX
X -> aY | bY |
Y -> X | ZY | b
Z -> XY | c

=>
S -> aXbX | ab
X -> aY | bY
Y -> X | ZY | b
Z -> XY | c

=>
S -> aXbX | ab
X -> aY | bY
Y -> X | ZY | b
Z -> XY | c | Y

 Eliminate A-productions for the CFG: S rightarrow aXbX X rightarrow aY | bY | Lambda Y rightarrow X | ZY | b Z rightarrow XY | cSolutionS -> aXbX X -> aY

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site