Question: Construct CFG for following :
0

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

automata theory • 206 views
 modified 7 weeks ago by RB • 100 written 5 months ago by
0

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 *