CS381hw3

# CS381hw3 - CS381 Homework Assignment number 3 Due Friday...

• Homework Help
• 501844684_ch
• 1

This preview shows page 1. Sign up to view the full content.

CS381 Homework Assignment number 3 Due Friday, September 16 Please write your name and net id on the upper right corner of each page. Do problems 1 and 2 on one sheet of paper, 3 and 4 on one sheet of paper, etc. 1. Write a regular expression for all strings of 0’s and 1’s having an even number of 0’s. Does every string denoted by your expression have an even number of 0’s? Is every string with an even number of 0’s included in your regular expression? 2. Write a regular expression for all strings of 0’s and 1’s in which all 0’s occur before any 1’s. 3. Write a regular expression for all strings of 0’s and 1’s that are of odd length. 4. Write a regular expression for all strings of 0’s and 1’s in which the total number of zeros to the right of each 1 is even. 5. Write a regular expression for all strings of 0’s and 1’s in which at least one copy of
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the substring 01 occurs before any copy of the substring 10 occurs in the string. If there is no occurrence of the substring 10 then there need not be any copy of the substring 01. 6. Write a regular expression for all strings of 0’s and 1’s in which there is an even number of 0’s between any two 1’s. 7. Write a regular expression for all strings of 0’s and 1’s such that at every point in the string the number of 1’s minus the number of 0’s is zero, one or two. 8. Write a regular expression for all strings of 0’s and 1’s with an even number of 0’s and an odd number of 1’s. 9. Problem 3.1.4 from the book. 10. Write a regular expression for all strings of 0’s and 1’s such that every odd numbered 0 is immediately followed by a 0, i.e. the 0’s occur in pairs....
View Full Document

• Fall '05
• HOPCROFT
• Formal language, Regular expression, Zero, Parity, Evenness of zero

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern