You are on page 1of 2

CIS 262 Fall 2012, Homework 1

Please do not attach all the problems together. Each problem


should be separate, with your name on it. Answers should be
rigorous, but concise.
Due: Thursday 9/27, at the beginning of class
1. Sipser 1.3
2. Let = {0, 1}. For each of the languages below, draw a DFA that
accepts the language. Explain why your machine works.
(a) The set of strings s where every third position of s is the symbol
0.
(b) The set of strings s such that the number of occurrences of the
substring 01 in s equals the number of occurrences of the substring
10 in s.
3. Let L contain finitely many strings (a finite language).
(a) Prove that L is regular.
(b) Draw a NFA for the language L = { foo, bar, baz, quux }.
4. Sipser 1.31 (closure under reversal)
5. Sipser 1.32 (binary addition)
6. (Sipser 1.41) Let A, B be two regular languages, and let the perfect
interleaving of A and B be the language
{w|w = a1 b1 . . . an bn

where a1 . . . an A and b1 . . . bn B}

Show that the perfect interleaving of A and B is regular.


1

7. (Sipser 1.67) Let L be any language, and let the swap of L be the
language
SW AP (L) = {qp|pq L}
(a) Show that for any language L, swapping the language once is the
same as swapping the language twice.
(b) Show that SW AP (L) is regular, if L is regular.

You might also like