View the step-by-step solution to:

# Let = {0, 1}. Write CFGs that generate the following languages:

Let  = {0, 1}. Write CFGs that generate the following languages:
 {W | W contains no more than three 1’s}
 {W | W starts and ends with different symbols}
 {W | W starts with a 1 and has an even length}
 {W | The length of w is even and its middle two symbols are 01}
 {W | W contains twice the number of 0’s than 1’s}
 {W | W = 000W^(R)111, where W^R is the reverse of W}

{W | W contains no more than three 1’s}
S-&gt;1A|ε
A-&gt;1B|11B|B1|B11|ε
B-&gt;0B|B0|0
{W | W starts and ends with different symbols}
S-&gt;0A|A0|1B|B1
A-&gt;1A|ε
B-&gt;0B|ε
{W | W starts...

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents