adplus-dvertising
frame-decoration

Question

Give a production grammar for the language L = {x/x ∈ (a,b)*, the number of a’s in x is multiple of 3}.

a.

{S->bS, S->b,S->aA, S->bA, A->aB, B->bB, B->aS, S->a}

b.

{S->aS,S->bA,A->bB,B->bBa,B->bB}

c.

{S->aaS,S->bbA,A->bB,B->ba}

d.

None of the above

Answer: (a).{S->bS, S->b,S->aA, S->bA, A->aB, B->bB, B->aS, S->a}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Give a production grammar for the language L = {x/x ∈ (a,b)*, the number of a’s in x is multiple of 3}.