20 views

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$

edited | 20 views

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
by Active (4.1k points)

+1 vote
1