CSE 431/531 Homework 7 Due date: May 11, 2016 Lecturer: Shi Li

advertisement

CSE 431/531 Homework 7

Due date: May 11, 2016 Lecturer: Shi Li

Your Name: Your University ID:

Problems 1

Max. Score 12 8

2

Your Score

3

8

4

12

Total Score

40

Problem 1 (12 points).

For each of the following problems, state (1) whether the problem is provably in NP, and (2) whether the problem is provably in Co-NP. If your answer for a question is yes, you should describe the certificate and the verifier.

(a) Given a set S = { a

1

, a

2

, · · · , a n

} of n integers, whether the indices { 1 , 2 , 3 · · · , n } can be partitioned into two sets S and ¯ = { 1 , 2 , 3 , · · · , n } \ S such that P i ∈ S a i

= P i ∈ a i

.

(b) Given a graph G = ( V, E ) and an integer k ≥ 1, whether the maximum independent set of G is at most k .

(c) Given a graph G = ( V, E ) and an integer k ≥ 1, whether the maximum independent set of G is exactly k .

(d) Given two boolean formulas, whether the two boolean formulas are equivalent. For example,

( x

1

∨ x

2

) ∧ ( ¬ x

1

∨ x

3

) and ( ¬ x

1

∧ x

2

) ∨ ( x

1

∧ x

3

) are equivalent since they give the same value for every assignment of ( x

1

, x

2

, x

3

).

Problem 2 (8 points).

In class, we proved that HP (Hamiltonian Path) ≤

P

Cycle). Prove the other direction, i.e, HC ≤

P

HP.

HC (Hamiltonian

Problem 3 (8 points).

Suppose you are given a polynomial-time black-box algorithm that decides whether a given graph H contains a Hamiltonian cycle or not. Design a polynomial time algorithm that, given a graph G with a Hamiltonian cycle, outputs a Hamiltonian cycle of G . (This suggests that finding a Hamiltonian cycle is not too much harder than deciding if a graph contains a Hamiltonian cycle.)

Problem 4 (12 points).

Prove that the following Simple-Neg-Cycle problem is NP-complete: given a directed graph G = ( V, E ), a weight function w : E →

R

(weights can be negative) and a vertex s ∈ V , decide whether there is a simple negative cycle in G that contains s . (A simple cycle is a cycle that visits each vertex in V at most once.) (Hint: prove HP ≤

P

Simple-Neg-Cycle).

1

Download