1
2.6kviews
Design CFG for anbn where n >=1 and convert to Chomsky Normal form.
1 Answer
0
166views

CFG for anbn

S = asb | ab

Convert it to CNF

Let Az a

B b

s A SB | AB

S AA1|AB

A1SB and

A a

B b

Above grammer is in CNF.

Please log in to add an answer.