Docsity

Assignment 3 Unsolved Problems | CS 6505, Assignments of Computer Science

Toggle sidebar
bg1
CS 6505: Algorithms, Computability and
Complexity
Problem Set 3
Due November 8, 2007
Problem 1
Aperfect matching of a graph is a matching in which every vertex is matched.
Let G= (X∪Y, E ) be a bipartite graph with |X|=|Y|. Prove, using the
max-flow min-cut theorem, that Ghas a perfect matching if and only if
|A| ≤ |N(A)|for every subset A⊆X, where N(A) denotes the set of all
vertices adjacent to vertices in A.
Problem 2
Prove that 2-SAT ∈P.
Note: While 2-SAT ∈P, its optimization version MAX-2-SAT is NP-Hard,
as shown in Problem 5.
Problem 3
Let ϕbe a CNF formula. A not-all-equal (NAE) assignment to the variables
of ϕis an assignment where each clause of ϕcontains two literals with
unequal values. Thus an NAE-assignment satisfies ϕwithout yielding three
true literals in any clause. NAE-SAT is the following decision problem: Given
a3-SAT instance ϕ, decide whether ϕhas an NAE-assignment.
1. Show that the negation of an NAE-assignment is also an NAE-assignment.
2. By reduction from 3-SAT, prove that NAE-SAT is NP-Complete.
Problem 4
A cut of an undirected graph G= (V, E ) is a partition of the vertices
V=A∪B(with A∩B=∅). The size of a cut is defined as the number
of edges crossing the cut. MAX-CUT is the following optimization problem:
1
pf3

Partial preview of the text

Download Assignment 3 Unsolved Problems | CS 6505 and more Assignments Computer Science in PDF only on Docsity!

CS 6505: Algorithms, Computability and

Complexity

Problem Set 3

Due November 8, 2007

Problem 1

A perfect matching of a graph is a matching in which every vertex is matched. Let G = (X ∪ Y, E) be a bipartite graph with |X| = |Y |. Prove, using the max-flow min-cut theorem, that G has a perfect matching if and only if |A| ≤ |N (A)| for every subset A ⊆ X, where N (A) denotes the set of all vertices adjacent to vertices in A.

Problem 2

Prove that 2 - SAT ∈ P.

Note: While 2 - SAT ∈ P, its optimization version MAX- 2 - SAT is NP-Hard, as shown in Problem 5.

Problem 3

Let ϕ be a CNF formula. A not-all-equal (NAE) assignment to the variables of ϕ is an assignment where each clause of ϕ contains two literals with unequal values. Thus an NAE-assignment satisfies ϕ without yielding three true literals in any clause. NAE-SAT is the following decision problem: Given a 3 - SAT instance ϕ, decide whether ϕ has an NAE-assignment.

  1. Show that the negation of an NAE-assignment is also an NAE-assignment.
  2. By reduction from 3 - SAT, prove that NAE-SAT is NP-Complete.

Problem 4

A cut of an undirected graph G = (V, E) is a partition of the vertices V = A ∪ B (with A ∩ B = ∅). The size of a cut is defined as the number of edges crossing the cut. MAX-CUT is the following optimization problem:

Given a graph G = (V, E), find a cut of G with the maximum size. By reduction from NAE-SAT, prove that unless P = NP, there is no polynomial- time algorithm for MAX-CUT.^1

Hint: For simplicity we may assume that for each variable x, no clause of ϕ contains both x and ¯x since such a clause is clearly satisfied by any assignment and thus can be removed. Let ϕ be a NAE-SAT instance with n variables and k clauses. Construct a graph G with 6nk vertices as follows: Each variable xi corresponds to 6k vertices – 3k labeled xi and 3k labeled ¯xi. For each i ∈ { 1 ,... , n}, connect each xi vertex with each ¯xi vertex (for a total of 9k^2 edges). For each clause in φ, select three vertices labeled by the literals in that clause and connect each pair of them by an edge. Avoid selecting the same vertex more than once. (This is possible as there are 3k vertices for each literal/label.) Show that ϕ ∈ NAE-SAT if and only if G has a cut of size at least 9k^2 n + 2k.

Problem 5

  1. MAX- 2 - LIN is the following optimization problem: Given a system of equations each of the form xi ⊕ xj = b, where each xi is a Boolean variable, ⊕ denotes XOR, and b ∈ { 0 , 1 }, find an assignment to the variables xi’s that maximizes the number of satisfied equations. By reduction from MAX-CUT, prove that unless P = NP, there is no polynomial-time algorithm for MAX- 2 - LIN.
  2. MAX- 2 - SAT is the following optimization problem: Given a 2 - SAT in- stance ϕ, find an assignment that maximizes the number of satisfied clauses. Prove that unless P = NP, there is no polynomial-time algo- rithm for MAX- 2 - SAT.

Problem 6

  1. Prove that the following problem is NP-Hard: Decide whether a given n-variate polynomial f (x 1 ,... , xn) ∈ Z[x 1 ,... , xn] with integral co- efficient has a root in Zn, that is, some a = (a 1 ,... , an) ∈ Zn^ such that f (a 1 ,... , an) = 0. For extra credit, show that the above decision problem remains NP-Hard even in the special case where the degree in each variable xi of the given polynomial f (x 1 ,... , xn) is at most 2. (^1) Note that the MIN-CUT problem can be solved in polynomial time using MAX FLOW.