Regular expresion to CFG

RGPV 2020   
Write given CFG for R.E (011 + 1)*(01)*. 

Ans. 
CFG for (011 + 1)* 
A --> CA
A -->  ε
C --> 011 | a

CFG for (01)*
B --> DB
B --> ε 
D --> 01

Final CFG for (011 + 1)*(01)*
S --> AB
A --> CA | ε
C --> 011 | 1
B --> DB | ε
D --> 01
Share:

Post a Comment

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.