ECS 120: Theory of Computation UC Davis Phillip Rogaway
Handout MS2 February 21, 2002
Midterm Solutions Section 2
1 Short Answer [45 points]
Let M1 be an n1 -state NFA and let M2 be an n2 -state NFA. Using the procedures given in class and in your text, h

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
ps6-soln
November 8, 2012
Problem Set 6 Solutions
Problem 1. Using the pumping lemma, prove that L = cfw_bi #bi+1 : bi is i in binary, i 1 is not context
free.
Suppose for contradiction that L were c

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
ps8-soln
November 29, 2012
Problem Set 8 Solutions
Problem 1.1 Classify each of the following languages as either recursive, or r.e. but not not
co-r.e., or co-r.e. but not r.e., or neither r.e. nor

CS373, Spring 2010. Midterm 2
INSTRUCTIONS (read carefully)
Fill in your name, netid, and discussion section time below. Also write your netid on the other
pages (in case they get separated).
NAME:
NETID:
DISC:
There are 6 problems. Make sure you have a

Problem Set 7
Fall 11
Due: Thursday, 1st December, 2011, 11:00 am before class begins
Please follow the homework format guidelines posted on the class web page:
http:/www.cs.uiuc.edu/class/fa11/cs373/
1.
[Category: Aliens, Points: 5]
Prove that the proble

Lcs373 = cfw_ M | M is a TM and L(M ) contains the string CS373.
Lnite = cfw_ M | M is a TM and L(M ) is nite.
Lreject = cfw_ M | M is a TM and M rejects all inputs.
Lcs373
AT M
Mcs37

Problem Set 6
Fall 11
Due:
Tuesday, 8th November, 2011, 11:00 am before class begins
Please follow the homework format guidelines posted on the class web page:
http:/www.cs.illinois.edu/class/fa11/cs373/
1. Reduction la Rice's Theorem
[
Category:
Proof,
S

b
q2
a, b
a
q4
a
a
a
q6
b
b
b
q1
b
q3
a
q5
cfw_q 1, q 2, q 5, cfw_q 3, q 4, q 6
b
cfw_q 1, q 2, q 5, cfw_q 3, q 4, cfw_q 6
b
cfw_q 1, q 2, cfw_q 5, cfw_q 3, q 4, cfw_q 6
a b

b
q2
a, b
a
q4
q6
a
a
q1
b
a
a
b
b
b
q3
q5
a a, R; b b, R
p2
, L
p3
a , R
a , L
p1
, R
pacc
p6
, R
b , R
a a, R, b b, R
p4
a a, L; b b, L
b , L
, L
p5
M
= cfw_a, b

ECS 120: Theory of Computation UC Davis Phillip Rogaway
Handout QS2 January 31, 2002
Quiz Solutions Section 2
1 Short Answer
(1) Draw a DFA that accepts L = cfw_x cfw_1, 2 : x has at least two 2s. Im too lazy to draw the diagram. (2) List the lexicographi

ECS 120: Theory of Computation UC Davis Phillip Rogaway
Handout QS1 January 31, 2002
Quiz Solutions Section 1
1 Short Answer
(1) Draw a DFA that accepts L = cfw_x cfw_1, 2 : x has exactly two 2s. Im too lazy to draw the diagram. (2) List the lexicographic

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
Quiz #3S
October 27, 2012
Quiz 3 Solutions
Graded out of 28 points: problem 1 out of 8 points (2 points per answer); problem 2 out of 12 points
(+1 for each correct answer; 1 for each incorrect answe

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
Quiz #2S
October 23, 2012
Quiz 2 Solutions
The quiz was graded out of 32: two points for each of the eleven ll-in-the-blank questions; 1 point for
each true/false (right answers +1, wrong or missing

ECS 120: Theory of Computation
UC Davis Phil Rogaway
Handout Quiz #2S
May 21, 2010
Quiz 2 Solutions
Instructors comments. The quiz was graded out of 75 points: 10 points for each of the rst ve problems,
and 25 points for the true/false. Those were graded

ECS 120: Theory of Computation
UC Davis | Phillip Rogaway
Handout Q2.S
February 8, 1999
Quiz 2 Solutions
0. Your NAME:
1. Carefully state the pumping lemma for regular languages.
If L is a regular language then there exits a number N such that for all s 2

ECS 120: Theory of Computation UC Davis Phil Rogaway
Handout Quiz #1S April 18, 2010
Quiz 1 Solutions
Questions 14 were graded out of 10 points; questions 513 were graded out of 25 points total; question 14 was graded out of 20 points. So the total possib

ECS 120: Introduction to the Theory of Computation
UC Davis | Phillip Rogaway
Handout N.1
October 18, 1995
The Pumping Lemma
De nition: Language L pumps if there exists a N such that for all s 2 L, jsj N , s can be
decomposed into s = xyz , jyj 1, such th

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
ps3-soln
October 18, 2012
Problem Set 3 Solutions
Problem 1. For the following problems, do not simplify your work (except you should please not
indicate unreachable states in any DFA)show everything

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
ps5-soln
November 1, 2012
Problem Set 5 Solutions
Problem 1. Formally specify both (a) a CFG and (b) a PDA for the language
L = cfw_x cfw_a, b, c : x contains an equal number of two dierent character

ECS 120: Theory of Computation
UC Davis Phillip Rogaway
ps4-soln
October 25, 2012
Problem Set 4 Solutions
Problem 1. Let be a regular expression of length n.
(a) Using procedures shown in class, if we convert into a regular expression such that L( ) = L()

6.045J/18.400J: Automata, Computability and Complexity
Prof. Nancy Lynch, Nati Srebro
Quiz 3: Solutions
April 28, 2004
Susan Hohenberger
Please write your name in the upper corner of each page.
Q3-Solutions-1
Name:
Problem 1: True, False, or Unknown (18 p