Convert the following CFGs to CNF: (i) S SS I a (ii) S aSa I

Question:

Convert the following CFGs to CNF:

(i)

S → SS I a

(ii)

S → aSa I SSa I a

(iii)

S → aXX
X → aS l bS l a

(iv)

E → E + E
E → E*E
E → (E)
E → 7
The terminals here are + *  ( )  7.

(v)

S→ ABABAB

A → a I Λ
B → b I Λ
(vi)

S → SaS I SaSbS I SbSaS I Λ

(vii)

S → AS I SB
A → BS I SA
B → SS

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: