# CMPSCI 601: Theory of Computation

### Was given in class Monday 31 March 2003

Directions: Each question is a statement that may be true or false. Please state whether it is true or false -- you will get five points for a correct boolean answer and there is no penalty for a wrong guess. Then justify your answer -- the remaining points will depend on the quality and validity of your justification. Problems with higher point values will tend to require longer justifications, but this will not always be the case.

Crib sheet: I will state some useful definitions after the questions.

Types of variables: Unless otherwise indicated, a variable A or B denotes a language, D denotes a DFA, G denotes a context-free grammar, M denotes a Turing machine, n denotes a (non-negative)number, and w denotes a string. Remember that N is the set of all numbers, which we may also think of as the set Σ* of all strings.

• Question 1 (10): If A is an r.e. language, the decision problem for A can be solved by a Bloop program.

• Question 2 (20): If a sentence φ is provable from the axiom statement NT, then φ is true in the structure N. (In symbols, if NT "proves" φ, then N "models" φ.)

• Question 3 (10): The language {D: L(D) = Σ*} is in the class P. (Recall that the variable D denotes a DFA.)

• Question 4 (10): If A and B are both r.e.-complete languages, then A ≤ B (A is reducible to B).

• Question 5 (15): The language Z = {M: L(M) is regular} is r.e.-complete.

• Question 6 (15): The language {(G_1,G_2): L(G_1) = L(G_2)} is recursive.

• Question 7 (20): The formula

[∀ x: ∃ y: Cube(x) implies (Larger(x,y) OR LeftOf(x,y))]

iff

[∃y:&forall x;: Cube(x) implies (Larger(x,y) OR LeftOf(x,y))]

is valid for Tarski's World.

### Crib Sheet:

• L(M) is the set of numbers n such that M halts on input n with output 1.
• L(D) is the set of strings w such that D running on w finishes in an accepting state.
• L(G) is the set of strings w such that w can be generated from G's start symbol according to G's rules.
• A language is r.e. if it is equal to L(M) for some Turing machine M.
• A language is recursive if it is equal to L(M) for some Turing machine M that always halts.
• A function f is total recursive if there is a Turing machine that always halts and gives output f(n) on any input n.
• A is reducible to B if there exists a total recursive function f such that for any n, n is in A iff f(n) is in B.
• A is r.e.-complete iff A is r.e. and for any language B, if B is r.e. then B is reducible to A.
• The language K = {n: n in L(Mn} is r.e.-complete.
• The Bloop programming language is defined in terms of basic operations and bounded loops. The Floop programming language also has free loops.
• If w is any string, wR is w written backward.
• The class P is the set of all languages whose decision problem can be solved by a Turing machine that runs in a time polynomial in the input size.
• The statement NT is the AND of fourteen number-theory axioms given by Papadimitriou, which define the behavior of the number-theoretic operations.
• As a first-order structure, N is the set N of numbers together with the standard definitions of equality, order, addition, multiplication, and exponentiation of numbers.
• In Tarski's World, an object is never left of itself or larger than itself. Larger(a,b) means ``a is larger than b''.