## COMP 494: Problem Set 2 --- Due Tuesday, July 18, 2000

1. Minimal-size DFA (postponed from problem set 1)
1. Show that there is a DFA with n+1 states that recognizes the language (1^n)*. The alphabet is Sigma={0,1}
2. Show that there does not exist a smaller DFA for this language. (smaller = fewer states).

2. Suppose that L (a language over Sigma) is DFA-acceptable. Show that the following language is DFA-acceptable, too:
MAX(L) = {x in L: there is no y in Sigma+ s.t. xy in L}.
// A+ means AA*

3. Same instruction as the last problem, for
ECHO(L) = {a_1 a_1 a_2 a_2 ... a_n a_n: a_1 a_2 ... a_n in L}.

4. Page 85 of your book, Exercise 1.12.

5. Construct a regular expression for each of the languages from Problem Set 1, problem 1:
1. The set of all strings with 010 as a substring
2. The set of all strings which do not have 010 as a substring
3. The set of all strings which have an even number of 0's or an even number of 1's
4. The complement of {1,10}*
5. The binary encodings of numbers divisible by 3: {0}* {e, 11, 110, 1001, 1100, 1111, ...}