The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
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$
in Theory of Computation by Boss (45.8k points)
edited by | 20 views

1 Answer

0 votes
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)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,823 questions
54,822 answers
189,572 comments
81,059 users