0
1.9kviews
Convert following Grammar to CNF and GNF

S–ASB/a/bb

A → aSA/a.

B -- ՏbՏ/tt

1 Answer
0
77views

SOLUTION:

Given Grammar in in CNF format.

By using the substitution,

We have,

S – ASB / a / bb

A → aSA / a.

B -- ՏbՏ / ԵԵ

Put all the values of ‘A’

S -> aSASB / aSB / a / bb

A -> aSA / a

B -> SbS / tt

Put all the values of ‘B’

S -> aSASSbS / aSAStt / aSSbS / aSa / a / bb

A -> aSA / a

B -> SbS / tt

This is in G.N.F

Please log in to add an answer.