Question: Convert following Grammar to CNF and GNF.
0

S–ASB/a/bb - -

A → aSA/a.

B -- ՏbՏ/ԵԵ

Mumbai university > Comp > SEM 4 > TCS

Marks: 10M

Year: May 2015

ADD COMMENTlink
modified 3.3 years ago  • written 3.3 years ago by gravatar for Pooja Joshi Pooja Joshi740
0

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

ADD COMMENTlink
written 3.3 years ago by gravatar for Pooja Joshi Pooja Joshi740
Please log in to add an answer.