0
1.8kviews
Explain algorithm for the conversion of a Context Free Grammar(CFG) to Chomsky Normal Form(CNF) and use it to convert the following CFG to CNF:

Mumbai University > Informatica Technology > Sem 4 > Automata Theory

Marks: 10M

S => bA|aB

A => bAA|aS|a

B =>aBB|bS|b

1 Answer
0
8views

For CNF, A => BC(two nonterminals)

Or

A => a(one terminal)

Consider S => bA

S => BA which is a CNF (substituting B =>b)

Consider S => aB

S => AB which is CNF(substituting A => a)

Consider A =>aS

Let $C_1 =\gt a$

$A =\gt C_1S$ which is …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.