Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Rualo, Carl Angelo V.

AL102
SBIT-4L 04/12/2022

Find the Language and derive abbaaba from the following grammar:

terminals: a, b
non-terminals: S, X
productions: 
S ------XaaX
X------aX I bX I E

CFL is (a + b)*aa(a + b)*. We can derive abbaaba as follows:

S ⇒ XaaX
⇒ aXaaX
⇒ abXaaX
⇒ abbXaaX
⇒ abbeaaX = abbaaX
⇒ abbaabX
⇒ abbaabaX
⇒ abbaabae ⇒ abbaaba

You might also like