Question
I) Convert the following grammar S abAB | abB A bAB | bB B Baa | Ba | A | a- Eliminate -productions b- Eliminate
I) Convert the following grammar
S abAB | abB
A bAB | bB
B Baa | Ba | A |
a- Eliminate -productions
b- Eliminate unit productions
c- Convert the resulting grammar into Chomsky Normal Form
II)
a) Write a regular expression for all strings of 0s and 1s having an even number of 0s. Does every string denoted by your expression have an even number of 0s? Is every string with an even number of 0s included in your regular expression? b) Write a regular expression for all strings of 0s and 1s in which all 0s occur before any 1s. c) Write a regular expression for all strings of 0s and 1s that are of odd length 4 .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started