Problem #1 Problem #2

169 downloads 290 Views 62KB Size Report
Next, note that the condition X(µ)S(µ)e = µe in (*) is equivalent to the condition ... To show that VC is NP-complete, we reduce the Clique problem to it, which we ...
Homework 10 Solutions

ORIE630

Problem #1 First, note that for (y, s) satisfying AT y + s = c, we can re-write hµ (y, s) by:   ln si = (Ax(µ))T y + µ ln si hµ (y, s) = bT y + µ i

= x(µ)T (AT y)+µ



i

ln si = x(µ)T (c−s)+µ

i

 i

ln si = cT x(µ)−sT x(µ)+µ

 i

Next, note that the condition X(µ)S(µ)e = µe in (*) is equivalent to the µ = 0 for all i. condition −x(µ)i + s(µ) i Finally, note that −x + µs = ∇s hµ (y, s). Hence, the last condition is equiv−µ alent to ∇s hµ (y(µ), s(µ)) = 0. Observe that (∇2s hµ )ij = s(µ) 2 if i = j and i 0 otherwise, hence negative definite, implying that hµ is strictly concave. Therefore, the above first-order condition sufficient for (y(µ), s(µ)) to be a maximizer. The strict convexity implies uniqueness of s(µ). The uniqueness of y follows under the assumption that A has full row rank.

Problem #2 We will denote Vertex Cover by VC. Given a certificate to VC, a potential subset of vertices S, we can check in polynomial time that each edge in G is adjacent to some vertex in S. Thus, VC is in NP. To show that VC is NP-complete, we reduce the Clique problem to it, which we know is NP-complete. The Clique problem is to determine if a given graph G has a clique of size k. So given an instance of the Clique problem, with graph G = (V, E) and ¯ = (V, E) ¯ where e ∈ E ¯ ⇔ parameter k, construct the complement graph G e∈ / E. Claim/ There is a clique of size k in G iff there is a vertex cover of size n−k. Proof: (⇒) Assume that there is a clique S of size k in G. Then if S¯ = V \S, then S¯ has size n − k. However, we know that S forms a clique in G, so there ¯ Thus, every edge of G ¯ is adjacent are no edges between vertices of S in G. 1

ln si

¯ which means that it is a feasible vertex cover. So we to some vertex of S, have a vertex cover of size n − k. ¯ Let S = V \ S, ¯ (⇐) Assume that we have a vertex cover S¯ of size n − k in G. ¯ this set has size k. Since S is a feasible vertex cover, every edge is adjacent ¯ Thus, if u, v ∈ S, there can be no edge (u, v) ∈ E. ¯ But to some vertex of S. ¯ if there are no such edges in E, then (u, v) ∈ E for any such u, v ∈ S. Thus, S forms a clique in G, and we have a clique of size k. 2 Since VC is in NP, and we can reduce an NP-complete problem to it, VC must be NP-complete.

Problem #3 Denote the Dominating Set problem by DS. Given a potential dominating set S, we can check in polynomial time that every vertex is either in S, or adjacent to a vertex in S. Thus, DS is in NP. Note that we can assume there are no isolated vertices in G, because a graph G with l isolated vertices has a dominating set of size k iff the graph with those isolated vertices removed has a dominating set of size k − l, since each isolated vertex must be in every dominating set. Now, we reduce VC to DS to show that it is NP-complete. Given an instance of VC, with graph G = (V, E) and parameter k, construct a new graph G . First add all vertices and edges of G to G . Then, for each edge e = (u, v) ∈ E, add a node we to V  , and add edges (u, we ) and (v, we ) to E  . Note that we can assume the vertex cover instance has no isolated vertices since removing those vertices will exactly preserve the set of feasible solutions. Claim/ There is a vertex cover of size k in G iff there is a dominating set of size k in G . Proof: (⇒) If we have a vertex cover S of size k in G, then the claim is that S is a dominating set for G as well. Consider any node v ∈ V  . We must show that either v ∈ S or there is some adjacent node which is in S. There are two cases. Case 1: v is an original node from V . Since there are no isolated vertices in G, there is some edge (u, v) ∈ E. Since S is a feasible vertex cover, one of u and v must be in S. Thus, either v ∈ S, or an adjacent node is in S. 2

Case 2: v = we is a new node added to V  , where e ∈ E. By the previous argument, if e = (i, j), then either i ∈ S or j ∈ S. But we know that the edges (i, we ) and (j, we ) are both in E  , so we is adjacent to a node in S. Thus, we have that S is a dominating set in G of size k. (⇐) Assume we have a dominating set S in G of size k. If there are any nodes we in S, with e = (u, v), we can replace we by either u or v, and we will still have a dominating set, since removing we can only potentially “undominate” nodes u and v, and (u, v) ∈ E  . If u and v are both in S, then we can replace we by any arbitrary vertex to maintain that the set has size k. After this procedure has finished, we have a set S  which only consists of vertices in V . The claim is that this set S  is a vertex cover for G. Consider any edge e = (u, v) ∈ E. Since S  is a dominating set in G , either we ∈ S  , or some node adjacent to we is in S  . But we constructed S  from vertices in V , so it must be the case that some node adjacent to we is in S  . But the only nodes adjacent to we in G are u and v, so one of them is in S  . Thus, every edge e ∈ E is adjacent to some node in S  , so it is a feasible vertex cover. 2 Thus, since VC can be reduced to DS, and DS is in NP, DS must be NPcomplete.

Problem #4 Denote the Edge-Disjoint Path problem by EDP. Given a potential set of paths, we can verify in polynomial time that these paths share no edge, and that every source-sink pair (si , ti ) is connected by some path. Thus, EDP is in NP. Now, we reduce 3-SAT to EDP to show that it is NP-complete. Given an instance of 3-SAT with n variables and k clauses, we construct an instance of EDP. For each variable xi , we will construct a source-sink pair (si , ti ), and two paths of length k + 2 between si and ti . These paths will be known as the 0-path and the 1-path for this variable, and will correspond to setting this variable to 0 or 1. For each clause cj , we will construct a source-sink pair (scj , tcj ). This pair will have three possible paths of length 3, each corresponding to one literal 3

in the clause. For example, the if the clause cj is (¯ x3 ∨x5 ∨x6 ), then the three t paths will use the j h edge on the 1-path of variable 3, the 0-path of variable 5, and the 0-path of variable 6. An example is given below with j = 2. s3

1-path

t3

c

c

s2

t2 s5

s6

0-path

0-path

t5

t6

Claim/ The EDP instance has a solution iff the 3-SAT instance is satisfiable. Proof: (⇒) Assume the EDP instance has a solution. By construction of the EDP instance, the path for each (si , ti ) pair must use either the 0-path or the 1-path. Set the corresponding xi to 0 or 1 respectively. We must show that this assignment satisfies every clause. We also know that the EDP solution has a path for each (scj , tcj ) pair corresponding to clause cj . Assume that this path uses variable xi . If xi uses its 0-path, then the clause path must use an edge in the 1-path, meaning that the clause contains the literal x¯i , which is true since xi is set to 0. Similarly, if xi uses the 1-path, then the literal xi is in clause cj , which again is true. Thus, we have a satisfying assignment to the 3-SAT instance. (⇐) Assume we have a satisfying assignment. Then let each (si , ti ) pair use the 0-path if xi = 0, and the 1-path if xi = 1. Since this is a satisfying assignment, each clause cj must contain a true literal. If that literal has the form xi , then xi = 1, and the clause can use the edge on the 0-path of xi . Otherwise, it can use the 1-path of variable xi . Thus, we have a set of edge-disjoint paths for each source-sink pair, and the EDP instance is feasible. 2 4

So we can reduce 3-SAT to EDP, and EDP is in NP, which means that EDP is NP-complete.

5