CSCI 6610 Automata and Formal Languages Spring 2004 Spring 2003 final exam, first 3 questions, for midterm review -------------------------------------------------------------------------------- In general it is permissible to quote theorems and facts proved in class, in the text through Chapter 7, or for written homework, without additional justification. When you do rely on such theorems or facts, state them before going on to use them in your proof. -------------------------------------------------------------------------------- Notation Explanations (n)_2 denotes the string which is the binary representation of n. 1^n denotes the string which consists of n copies of 1. N_0(w) denotes the number of 0's in the string w. N_1(w) denotes the number of 1's in the string w. ================================================================================ 1. (20 pts.) Let C = {w in {0,1}* : N_1(w) > N_0(w)} and let E = { : M is a T.M. with input alphabet {0,1} and L(M) intersect C = empty }. (a) Prove that A_{TM} is not mapping reducible to E. (b) Prove that A_{TM} is Turing reducible to E. -------------------------------------------------------------------------------- 2. (20 pts.) Assuming that P != NP, classify each of the following languages as being (A) in P, (B) NP-complete, (C) in NP but not known to be in P or to be NP-complete, or (D) not known to be in NP. For each problem, mark (X) corresponding to its classification. There is no penalty for guessing. (a) { : G is an undirected graph containing a k-clique} (A)( ) (B)( ) (C)( ) (D)( ) (b) { : G is an undirected graph containing a k-clique but not a (k+1)-clique} (A)( ) (B)( ) (C)( ) (D)( ) (c) {(n)_2 : n is a prime number} (A)( ) (B)( ) (C)( ) (D)( ) (d) {1^n : n is a prime number} (A)( ) (B)( ) (C)( ) (D)( ) (e) { : D is a directed graph containing a directed cycle} (A)( ) (B)( ) (C)( ) (D)( ) (f) { : D is a directed graph containing a directed Hamilton cycle} (A)( ) (B)( ) (C)( ) (D)( ) (g) { : S is a sequence of positive integers (represented in binary) and some subsequence of S adds up exactly to t} (A)( ) (B)( ) (C)( ) (D)( ) (h) { : S is a sequence of positive integers (represented in binary) and some subsequence of S adds up exactly to t} (A)( ) (B)( ) (C)( ) (D)( ) (i) {<1^n, 1^m> : there is an exact divisor d of n such that 1 < d < m} (A)( ) (B)( ) (C)( ) (D)( ) (j) {<(n)_2, (m)_2> : there is an exact divisor d of n such that 1 < d < m} (A)( ) (B)( ) (C)( ) (D)( ) -------------------------------------------------------------------------------- 3. (10 pts.) Prove that if 3SAT is in the class P, then P = NP.