829 views
2 votes
2 votes

S->ASB

A->aASA | a | ϵ

B->SbS | A | bb

Convert this grammar into Chomsky Normal Form

1 Answer

0 votes
0 votes
We can do by eliminating epsilon and unit productions in the given grammar,

First eliminate and write the grammar accordingly as CNF,

S → AU2|SB|AS

A → V1U3|a|V1S

B → SU4|V2V2|V1U5|a|V1S

U1 → SB

U2 → SB

U3 → AS

U4 → V2S

U5 → AS

V1 → a

V2 → b

Please correct me if iam wrong

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
2 answers
3
Anjan asked Jan 1, 2018
2,938 views
State true/falseIn CNF , S- espilon and Start symbol can appear on RHS side of production.
1 votes
1 votes
1 answer
4
admin asked May 4, 2019
506 views
Show that if $G$ is a $CFG$ in Chomsky normal form$,$ then for any string $w\in L(G)$ of length $n\geq 1,$ exactly $2n − 1$ steps are required for any derivation of $w....