0
4.5kviews
Construct CFG for following :

i) Alternate sequence of 0 and 1

ii) Do not contain 3 consecutive b's

iii) ${a^n}{b^m}{c^k}$ where k = n+m

1 Answer
0
590views

A] Alternate sequence of 0 & 1

A $\rightarrow$ OB | O | E

B $\rightarrow$ | A | ‘ | E

B] Do not contain 3 consecutive b’s

A $\rightarrow$ BbB | BbbB | E

B $\rightarrow$ a | E | aa *

Please log in to add an answer.