cs373 fa10 hw3sol

# cs373 fa10 hw3sol - Solutions for Problem Set 3 CS 373...

This preview shows pages 1–2. Sign up to view the full content.

Solutions for Problem Set 3 CS 373: Theory of Computation Assigned: September 14, 2010 Due on: September 21, 2010 at 10am Homework Problems Problem 1 . [Category: Comprehension+Design] 1. Describe the language of the following regular expressions. A clear, crisp one-level interpretable English description is acceptable, like “This is the set of all binary strings with at least three 0s and at most hundred 1s”, or like “ { 0 n (10) m | n and m are integers } ”.A vague, recursive or multi-level-interpretable description is not, like “This is a set of binary strings that starts and ends in 1, and the rest of the string starts and ends in 0, and the remainder of the string is a smaller string of the same form!” or “This is a set of strings like 010, 00100, 0001000, and so on!”. You need not prove the correctness of your answer. (a) (0 * 1 1 * ) * [1 points] (b) (1 ± )(00 * 1) * 0 * [2 points] (c) 0 * (1 000 * ) * 0 * [2 points] 2. Give regular expressions that accurately describe the following languages. You need not prove the correctness of your answer. (a) All binary strings such that if it starts with 0 it has odd length and if it starts with 1 it has even length. [1 points] (b) All binary strings such that in every preﬁx, the number of 0s and 1s diﬀer by at most 1. [2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/04/2011 for the course CS 373 taught by Professor Viswanathan,m during the Fall '08 term at University of Illinois, Urbana Champaign.

### Page1 / 3

cs373 fa10 hw3sol - Solutions for Problem Set 3 CS 373...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online