Docsity

Final Paper - Algorithms, Computability and Complexity | CS 6505, Exams of Computer Science

Toggle sidebar
bg1
CS 6505: Algorithms, Computability and
Complexity
Final Exam
Due 11:59pm on December 11, 2007
This take-home exam contains 8 problems. You are required to
solve the 5 of the 8 problems. If you solve more than 5 problems,
then the 5 highest scores of the 8 problems will be added as your
final exam score, and the scores of the remaining problems will be
counted as extra credit. You must type your solutions, and submit
your solutions in PDF electronically by the above deadline to Yan
Ding ([email protected]), Justin Cranshaw ([email protected]),
and Apurva Mudgal (apurv[email protected]). No collaboration is
allowed for the exam – you must work on the exam completely
on your own.
Good Luck!
1
pf3
pf4
pf5

Partial preview of the text

Download Final Paper - Algorithms, Computability and Complexity | CS 6505 and more Exams Computer Science in PDF only on Docsity!

CS 6505: Algorithms, Computability and

Complexity

Final Exam

Due 11:59pm on December 11, 2007

This take-home exam contains 8 problems. You are required to

solve the 5 of the 8 problems. If you solve more than 5 problems,

then the 5 highest scores of the 8 problems will be added as your

final exam score, and the scores of the remaining problems will be

counted as extra credit. You must type your solutions, and submit

your solutions in PDF electronically by the above deadline to Yan

Ding ([email protected]), Justin Cranshaw ([email protected]),

and Apurva Mudgal ([email protected]). No collaboration is

allowed for the exam – you must work on the exam completely

on your own.

Good Luck!

For each of the following two languages, answer whether or not it is decid- able, and prove your answer.

  1. L 1 = {〈M 〉 : M is a TM and M takes more than 6505 steps on some input}
  2. L 2 = {〈M 〉 : M is a TM and M takes more than 6505 steps on some input in L(M )}

Problem 2

The derivative of a polynomial f (x) =

∑n k=0 akx k (^) is

d dx

f (x) =

∑^ n

k=

kakxk−^1.

For 0 ≤ t ≤ n − 1, the t-th derivative of f (x) is defined as

f (t)(x) =

f (x) if t = 0 d dx f^

(t−1)(x) if 1 ≤ t ≤ n − 1.

Devise an algorithm that given a polynomial f (x) of degree n and a point c, evaluates all the derivatives f (0)(c), f (1)(c),... , f (n−1)(c) at point c in time O(n log n), assuming that in one step one can compute an addition or a multiplication of two complex numbers. (Hint: Reduce the problem to a single convolution of two properly chosen vectors, one involving the coefficients a 0 , a 1 ,... , an of the polynomial f , and the other involving the powers 1, c,... , cn^ of the point c.)

Let X, Y and Z be three disjoint sets. Let E ⊆ X × Y × Z, that is, E is a subset of triples of the form (x, y, z) where x ∈ X, y ∈ Y and z ∈ Z. A subset M ⊆ E of triples is said to be a 3-D matching^1 if for every two distinct triples (x, y, z), (x′, y′, z′) ∈ M , it holds that x 6 = x′, y 6 = y′^ and z 6 = z′. The Maximum 3-D Matching problem is the following optimization problem: Given disjoint sets X, Y and Z, and a subset E ⊆ X × Y × Z of triples, find a maximum 3-D matching, i.e. a 3-D matching with the largest size. Maximum 3-D Matching is a well-known NP-Hard problem.^2 In this problem, you will give a polynomial-time algorithm that 3-approximates Maximum 3-D Matching, using ideas from the approximation algorithm for Vertex-Cover.

  1. Define a subset C ⊆ X ∪ Y ∪ Z to be a 3-D cover if for every triple (x, y, z) ∈ E, it holds that x ∈ C, y ∈ C or z ∈ C. What is the relation between the size of any 3-D matching and the size of any 3-D cover?
  2. Define a 3-D matching to be maximal if it is not a proper subset of any 3-D matching. What is the relation between the size of any minimum 3-D cover and the size of any maximal 3-D matching?
  3. Based on Parts (1) and (2), give a polynomial-time algorithm that 3- approximates Maximum 3-D Matching, that is, given disjoint sets X, Y and Z, and a subset E ⊆ X × Y × Z of triples, finds a 3-D matching whose size is at least 1/3 of the maximum 3-D matching size.

(^1) Note that a 2-D matching is just a matching in a bipartite graph. (^2) This should be contrasted with the Max 2-D (i.e. Bipartite) Matching problem that can be solved efficiently.

The following is a well-known theorem in graph theory.

Theorem 1 In every bipartite graph, the size of a maximum matching equals the size of a minimum vertex cover.

  1. Using the above theorem, give a polynomial-time algorithm that de- cides Vertex-Cover for bipartite graphs, that is, a polynomial-time algo- rithm that given a bipartite graph G and an integer k, decides whether G has a vertex cover of size k.
  2. Using just Part (1), give a polynomial-time algorithm that given a bipartite graph G, finds a minimum vertex cover of G.

Alice and Bob each have a database of N distinct records, each of which is k-bits long, where k < N  2 k. Suppose that they want to test whether the two databases are identical, that is, whether they contain the same records.

  1. Prove that any deterministic protocol for solving this problem requires N (k − log 2 N ) bits of communication between Alice and Bob. You may find the following inequality useful: For any two natural numbers and m with m ≥,

(m `

≥ ( m). (Hint: How many databases with N distinct k-bit records are there?)

  1. Give a simple, communication-efficient randomized protocol for solving this problem, and analyze its efficiency and probability of error. Your protocol should require that Alice and Bob exchange only O(k) bits, and guarantee that the probability of error is at most 2−Ω(k). The computation time of Alice and Bob in your protocol should be about ∼ O (kN^ ).

Problem 8

Let f : { 0 , 1 }∗^ → { 0 , 1 } be a Boolean function. Suppose that there is a randomized polynomial-time algorithm A for computing f such that that for each x with f (x) = 1, A(x) = f (x) = 1 always; and for each x with f (x) = 0, Pr[A(x) = 0] ≥ 1 /2, where the probability is taken over the random coin tosses of A. Suppose that at the meantime, there is another randomized polynomial-time algorithm B for computing f such that for each x with f (x) = 0, B(x) = f (x) = 0 always; and for each x with f (x) = 1, Pr[B(x) = 1] ≥ 1 /2. Construct a randomized algorithm C for computing f , using algorithms A and B as subroutines, such that

  1. For each x ∈ { 0 , 1 }∗, C(x) = f (x) always.
  2. Algorithm C runs in expected polynomial time.