in Theory of Computation edited by
1,903 views
0 votes
0 votes

Convert the following $\text{CFG}$ into an equivalent $\text{CFG}$ in Chomsky normal form,using the procedure given in $\text{Theorem 2.9.}$

  • $A\rightarrow BAB \mid B \mid \epsilon$
  • $B\rightarrow 00 \mid \epsilon$
in Theory of Computation edited by
by
1.9k views

1 Answer

1 vote
1 vote
CNF doesn't allows ε-productions

first we've to eliminate ε-productions

A->B | AB | BA | BB | ε

B->00

the language contains ε so A->ε can't be eliminated

Eliminating unit productions

A->00 | AB | BA | BB | ε

B->00

Now converting to CNF

A->CC | AB | BA | BB | ε

B->CC

C->0

Related questions