Design a Context free grammar that contains equal number of a's and b's over input {a,b} i.e. no(a)=no(b)
Design a Context free grammar that contains equal number of a's and b's over input {a,b} i.e. no(a)=no(b)
Answer-
The Context free grammar (G)=(V,Σ,P,S)
Where
V={S}
Σ={a,b}
P={S→aSbS|bSaS|λ}
S={S}
Comments
Post a Comment