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 • 312 views
ADD COMMENTlink
modified 4 months ago by gravatar for RB RB ♦♦ 110 written 7 months ago by gravatar for pratikj2208 pratikj22080
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 *

ADD COMMENTlink
modified 3 months ago by gravatar for Ankit Pandey Ankit Pandey70 written 4 months ago by gravatar for RB RB ♦♦ 110
Please log in to add an answer.