# CS3800 09F: Homework 04

Created: Wed 07 Oct 2009

Assigned: Wed 07 Oct 2009
Due: Wed 14 Oct 2009

## General Instructions

1. Please review the grading policy outlined in the course information page.

2. On the first page of each part of your solution write-up, you must make explicit which problems are to be graded for "regular credit", which problems are to be graded for "extra credit", and which problems you did not attempt. Please use a table something like the following

Problem01020304 0506070809...
CreditRCRCRCECRC RCNARCRC...

where "RC" is "regular credit", "EC" is "extra credit", and "NA" is "not applicable" (not attempted). Failure to do so will result in an arbitrary set of problems being graded for regular credit, no problems being graded for extra credit, and a five percent penalty assessment.

3. You must also write down with whom you worked on the assignment. If this changes from problem to problem, then you should write down this information separately with each problem.

## Specific Instructions

For all proofs of non-regularity, you should use the Pumping Lemma and/or appeal to closure properties. For examples of complete and correct Pumping Lemma proofs, see Examples 1.73, 1.74, 1.75, 1.76, and 1.77 on pages 80-82 of the Sipser text. See also the following handout.

The use of closure properties may also be helpful and may, in fact, yield complete proofs without the need to resort to the Pumping Lemma (as discussed in class).

For examples of proofs for non-regularity via closure properties and the Pumping Lemma, please see the following handout.

## Problems

Required: 5 of the following 7 problems
Points: 20 pts per problem

1. Prove that the following languages are non-regular:

• the language defined in Exercise 1.46 part (a) and
• {w : every prefix of w has at least as many 0s as 1s}.

2. Prove that the following languages are non-regular:

• the language ADD defined in Exercise 1.53 and
• the language of arithmetic expressions over the alphabet {a, +, x, (, )}, as defined and discussed in the early lectures on context-free languages.
Hint: Consider matching parentheses.

3. Prove that the following languages are non-regular:

• {w : w contains twice as many 0s as 1s} and
• the language defined in Problem 1.46 part (c).
Hint: complement.

4. Problem 1.47.

5. Problem 1.49.

Hint: For part (a), consider all strings in the language B in lexicographic order; write down the first dozen or so such strings. What properties do these strings have in common? Now construct a FA or RE for this language.

6. Prove that the following languages are non-regular:

• {0m1n0m+n : m >= 1 and n >= 1} and
• {0i1j0k : j = max{i,k}}.

7. Problem 1.54.

Hint: For part (a), consider the language

F' = F intersect ab*c*

appealing to closure properties and the Pumping Lemma.

jaa@ccs.neu.edu