CS 531 - Theory of Computation
HW02, Spring 2016
Due Date: February 5
GRADING RULE FOR THE SPRING SESSION:
Only about 50% of problems in each assignment will be graded!
The choice of problems to be graded will be made after due date.
Solutions to all prob

Corn S 531 Theory of Computation
Spring Semester 2017
Exam 2
Monday, April 3, 2017
Time: 50 minutes
The exam is closed book. No notes allowed. Please go over all the questions in the
exam before you start working on it, Attempt the questions that seem e

Homework 1 Solutions
Don Stull
Com S 531
Problem 1. Construct the TM M 0 as follows. Create a new state qloop such that, for every a ,
(qloop , a) = (qloop , 0, R). That is, the new state simply writes a 0 on the current cell and moves
right. Since the st

Homework 3 Solutions
Don Stull and Xiang Huang
Com S 531
Problem 1. 7.1 Part a. True, e. True
7.2 Part a. False, e. False
7. 5 The formula is not satisfiable, as seen by substituting all possible values for x and y.
7.7 NP is closed under union. Let L1 ,

Homework 3
Solutions
Com S 531
Problem 1. Recall that for every TM M , L(M ) RE by definition.
Part a. Since L(M ) RE, and RE coRE = REC, B = cfw_(M ) | L(M ) RE coRE = REC.
Hence A = B.
Part b. Since every M B is always halting, L(M ) REC for every M B.

Homework 2 Solutions
Don Stull and Xiang Huang
Com S 531
Problem 1. If the range of f is finite, then Range(f ) is immediately decidable. Let N be the TM
computing f . Construct the TM M as follows. On input w cfw_0, 1 ,
1. Set i = 0. Increment i until w

CS 531 - Theory of Computation
HW03, Spring 2016
Due Date: February 26
GRADING RULE FOR THE SPRING SESSION:
Only about 50% of problems in each assignment will be graded!
The choice of problems to be graded will be made after due date.
Solutions to all pro

U.C. Berkeley CS172: Automata, Computability and Complexity
Professor Luca Trevisan
Solutions to Problem Set 9
4/27/2007
Solutions to Problem Set 9
1. (Sipser 8.25) An undirected graph is bipartite if its nodes can be divided into two sets such that
all e

Midterm 1 Solutions
Don Stull and Xiang Huang
Com S 531
Problem 2. a) True b) False c) True d) False e) False f) False g) True
Problem 3. a) False. Consider A = , B = and C = AT M .
b) Define the property L = cfw_L RE | L. Then LL = N U LLT M . Since L is

Midterm 2
Don Stull and Xiang Huang
Com S 531
Problem 1. a) Other b) True c) False d) True e) False f) Other g) Other
Problem 2. This only shows that a specific algorithm deciding 3SAT is not polynomial time. To
prove that NP 6= P, you must show that ever

Com S 531 Theory of Computation
Spring Semester 2017
Exam 1
Monday7 February 20, 2017
Time: 50 minutes
Ema it; i: V 2: :2
Name:
ID:
The exam is closed book. No notes allowed. Please go over all the questions in the
exam before you start working on it. A