381-H3-5-6 - there need not be any copy of the substring...

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

View Full Document Right Arrow Icon
CS381 Homework 3: Questions 5 and 6 5. Write a regular expression for all strings of 0s and 1s in which at least one copy of 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
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: there need not be any copy of the substring 01. Answer: 1 * + 0(0 + 1) * 6. Write a regular expression for all strings of 0s and 1s in which there is an even number of 0s between any two 1s. Answer: * (1 * (00) * ) * * 1...
View Full Document

Ask a homework question - tutors are online