0
2.2kviews
Consider the following grammar G = (V, T, P, S), V = {S, X, Y}, T {a, b} and productions P are Convert this grammer in Chomsky Normal Form (CNF).

Mumbai university > Comp > SEM 4 > TCS

Marks: 10M

Year: Dec 2015

1 Answer
0
47views

Let us start by adding new start symbols for the terminals.

$$S →XYX$$ $$X → aX|€$$ $$Y→bY|€$$

Let us take S->XYX for converting to CNF.

Replace

$$YX→X1$$

a→A

b→B

$$€ → E$$

So,

$$S → XX1$$ $$X → AX$$ $$X → E$$ $$Y → BY$$ $$Y → E$$ $$X1 → YX$$ $$a → A$$ $$b → B$$ $$ € → E$$

Hence, the above rule is in CNF format.

Please log in to add an answer.