Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Please help me figure this out- I am stuck- Transform the following CF.docx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité

Consultez-les par la suite

1 sur 2 Publicité

Please help me figure this out- I am stuck- Transform the following CF.docx

Télécharger pour lire hors ligne

Please help me figure this out. I am stuck.
Transform the following CFG into Chomsky Normal Form: S rightarrow abTA|Rab T rightarrow aT|b R rightarrow aRb|
Solution
(1)
W e will remove the null productions
R
After removing B , the production set becomes
S abTA | Rab | ab
T aT | b
R aRb I ab
(2)
We have to change the productions.
S abTA | Rab | ab
T aT | b
R aRb | ab
Final production set becomes
S ABTA | Rab | ab
T AT | b
R ARB | ab
A a
B b
The above grammar is in Chomsky Normal Form.
.

Please help me figure this out. I am stuck.
Transform the following CFG into Chomsky Normal Form: S rightarrow abTA|Rab T rightarrow aT|b R rightarrow aRb|
Solution
(1)
W e will remove the null productions
R
After removing B , the production set becomes
S abTA | Rab | ab
T aT | b
R aRb I ab
(2)
We have to change the productions.
S abTA | Rab | ab
T aT | b
R aRb | ab
Final production set becomes
S ABTA | Rab | ab
T AT | b
R ARB | ab
A a
B b
The above grammar is in Chomsky Normal Form.
.

Publicité
Publicité

Plus De Contenu Connexe

Plus par ellenj4 (20)

Plus récents (20)

Publicité

Please help me figure this out- I am stuck- Transform the following CF.docx

  1. 1. Please help me figure this out. I am stuck. Transform the following CFG into Chomsky Normal Form: S rightarrow abTA|Rab T rightarrow aT|b R rightarrow aRb| Solution (1) W e will remove the null productions R After removing B , the production set becomes S abTA | Rab | ab T aT | b R aRb I ab (2) We have to change the productions. S abTA | Rab | ab T aT | b R aRb | ab Final production set becomes S ABTA | Rab | ab T AT | b
  2. 2. R ARB | ab A a B b The above grammar is in Chomsky Normal Form.

×