**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