Homework 2 solutions
1. (10 + 5 = 15 points)
(i) Dene Rev(L) = cfw_xR | x L . Note xR is the reversal of the string x.
Thus, e.g., if L = cfw_ab, aba, babb then Rev(L) = cfw_ba, aba, bbab.
Let L1 be a regular language that is recognized by a DFA M1 = (Q1

Homework 5 CISC 303
Timo Ktzing ([email protected])
Handed out: Monday, April 6.
Deadline for Version 2 language approval: Monday, April 20.
Due Date: Wednesday, May 20.
This document describes the (optional) project. The project exists in two versions: Versi

Concept Map for Regular Languages CISC 303
Timo Ktzing ([email protected])
are
Automata
are
are
DFAs
compile to
NFAs
compile to
-NFAs
1
Concept Map for Regular Languages CISC 303
Timo Ktzing ([email protected])
are
Automata
are
are
DFAs
dene
compile to
NFAs
compi

CISC 303 Automata Theory
Spring 2009
Instructor: Timo Ktzing ([email protected])
o
Time/Classroom: MWF, 12:20PM-1:10PM, 235 Purnell Hall.
Instructors Oce Hours (Room 102 Smith Hall): Thursday, 2:30-4:30.
Additional times may be arranged with the instructor if

Homework 5 solution
3. Show L5 = cfw_ Mx #My | L(Mx ) L(M y ) is co-re but not re. (actually, it turns out that its not co-re.)
To show that L5 is not recursive:
Assume that L5 is recursive, we can generate a machine K that takes Mx #My as input
and retu

Homework 4 solutions
1. L = cfw_an bm ck | n + k = m
Accept on empty stack
Comment: This pda pops a for each b. Once all the as are popped o (i.e.
is exposed as top of stack), the bs are pushed in. Then, a b is popped for each c in the input,
with accept

Homework 3 solutions
For each of the languages below, give a context-free grammar that will generate it.
1. L1 = cfw_an bm ck | n + m = k
Must add a c for each a and b.
Production Rules
S aSc
S S1
S
S1 bS1 c
S1
2. L2 = cfw_an bm ck | n + k = m
Must add

Homework 1 solutions
1. (10 + 5 = 15 points)
a. Let M1 = (Q1 , , 1 , q0 1 , F1 ) and M2 = (Q2 , , 2 , q0 2 , F2 ) be two DFA.
Construct a DFA that accepts L(M1 ) - L(M2 ). (If A and B are two sets then
A - B = cfw_ x | x A and x B .
/
Give a precise desc

CIS-303: Homework 3: 45 points
Due Wednesday, Sept. 29, 2010
1. (10 pts.) Suppose A=cfw_a, B=cfw_b, C=cfw_1,2. Give the transition diagram for a nondeterministic finite state
machine with alphabet =cfw_a,b,1,2 that accepts the strings x that are elements

CIS-303 Homework 5: (60 points)
Due Monday, October 18, 2010
1. (5 points) Problem 12 on page 319 of Kozen
2. (5 points) For each of the following, determine whether the two regular expressions are equal; if
they are not, give an example of a string that

CIS-303
Assignment 1: 45 points
Due Friday, Sept. 10, 2010
The proofs for the following problems MUST be of the following form:
Give the statement that you are going to prove.
Specify that the statement will be proven by induction on (name the induction

CIS-303: Homework 6: (60 points)
Due Wednesday, October 27, 2010
1. Give a context-free grammar for the set BAL of balanced strings of delimeters
of three types (), [], and cfw_. For example, cfw_([()[]cfw_([]) is in BAL but [(]) is
not.
2. Give a nondete

CIS-303
Example of Mathematical Induction
1. Prove by weak mathematical induction that
!s
i=1
i=
s(s+1)
2
2. Proof will be by induction on s.
3. The base value of the induction parameter s is s = 1.
We must show that
!1
i=1 i
1(1+1)
2
!1
i=1
i=
1(1+1)
2
!

CIS-303: Homework 7: (70 points)
Due Friday, Nov. 5, 2010
NOT Accepted after the end of the grace period
1. (40 points) For each of the following, determine whether L is a context-free language. If it is a context-free
language, give a context-free gramma

Homework 2: 45 points
Due Monday, Sept. 20, 2010
1. (5 pts.) Suppose that =cfw_f, g, j, l, A=cfw_jgf, lg and B=cfw_f, gl, llf.
(a)
(b)
(c)
(d)
(e)
Is
Is
Is
Is
Is
jgflgllfgl an element of A3 B? Why or why not?
glgl an element of A B 2 ? Why or why not?
f a

CIS-303: Homework 4: 50 points
Due Wednesday, October 6, 2010
For each of the following problems, decide whether the set A is regular. If the set
is regular, give a FSM that recognizes it; if the set is not regular, prove it using the
pumping lemma.
1. A=

Multi State Machines
a.k.a.: The Powerset Construction; The Subset Construction
Timo Ktzing
o
March 3, 2009
General Idea
Given an NFA M = (A, Q , , F , q0 ), we dene the multi state
machine M for M as described below. This multi state machine
M will be a

Midterm Study Guide CISC 303
Timo Ktzing ([email protected])
The midterm will basically consist of questions similar to homework problems of the homework sets 1-4. Hence,
you should make sure to understand all homework problems. In particular, the following w

PBL on closure properties of (D)CFL CISC 303
Timo Ktzing ([email protected])
The following table gives closure properties for various collections of languages.
closure under
reg
DCFL
CFL
complement
set dierence
?
dot product
Kleene-
(HW5)
We dene the followin

Final Study Guide CISC 303
Timo Ktzing ([email protected])
The nal will basically consist of questions similar to homework problems of the homework sets 5-11. In addition
to this, there will be some general questions regarding regular languages, and regarding

Homework 1 CISC 303
Timo Ktzing ([email protected])
Wednesday, February 11.
Monday, February 16.
Handed out:
Due Date:
(8 points)
Give the DFA from Example 1.1.4 in the lecture notes in set notation.
Problem 1.
(8 points)
Give a DFA M in graphical notation on

Homework 2 CISC 303
Timo Ktzing ([email protected])
Monday, February 16.
Friday, February 27.
Handed out:
Due Date:
Note that the Problem 1 gives you a choice of two parts, you don't need to submit both (no extra credit for
submitting both parts). Further not

Homework 2 add-on CISC 303
Timo Ktzing ([email protected])
Friday, February 20.
Friday, February 27.
Handed out:
Due Date:
The following problem is an add-on to Homework 2.
This problem is an extra-credit problem.
(8 points)
Use the pumping lemma to show that

Homework 3 CISC 303
Timo Ktzing ([email protected])
Handed out: Friday, February 27.
Due Date: Friday, March 6.
Problem 1. (8 points)
Let
A = cfw_a
be our alphabet.
(i) Give an NFA
M
in graphical notation only such that
L(M) = cfw_w | |w|
is divisible by
3
or

Homework 4 CISC 303
Timo Ktzing ([email protected])
Friday, March 6.
Friday, March 13.
Handed out:
Due Date:
(8 points)
Give a regular expression for the following languages.
Problem 1.
(i) L0 = cfw_w cfw_a, b | the second to last symbol of w is a;
(ii) L1 =

Homework 4 add-on CISC 303
Timo Ktzing ([email protected])
Monday, March 16.
Friday, March 27.
Handed out:
Due Date:
Problem 1.
(8 points) Use the algorithm from class1 to minimize the following DFAs. Show all work.
(i)
a
0
1
a
(ii)
a
b
a
a
b
0
1
2
b
Problem

Homework 5 CISC 303
Timo Ktzing ([email protected])
Handed out: Monday, March 16.
Due Date: Friday, March 27.
Problem 1. (2 points)
(i) What is the singular of automata?
(ii) Describe, in your own words, rst the syntactic, then the semantic dierence of the wo

Homework 5 Mathy Version CISC 303
Timo Ktzing ([email protected])
Handed out: Monday, March 16.
Due Date: Friday, March 27.
Problem 1. (8 points)
in graphical notation only
(i) Give a PDAs
accepting
L0
as dened just below.
L0
is the set of all strings from th