CSE 200 HW 2 Solutions
R. Impagliazzo,Chris Calabro
Abstract:Show that 3-SAT remains NP -complete when restricted to formulas where every variable appears in at most three clauses. Since we can verify that a formula has the above property in polynomial time, the restricted 3-SAT is still in NP . We reduce from arbitrary 3-SAT to the restricted 3-SAT as follows. Let Φ be a 3−CNF in variables x1, ..xn and with clauses C1, ..Cm. We construct Φ ′ as follows: Our new set of variables contains a variable xi,j for each 1 ≤ i ≤ n and 1 ≤ j ≤ m. For each clause Cj , we replace each variable xi in the clause by xi,j and each negated variable ¬xi with ¬xi,j . Call the result C ′ j , and add it to Φ.. Note that x ← y is equivalent to y ∨ ¬x. Thus, we can express xi,1 ← xi,2 ← ...xi,n ← xi,1 as a set of m clauses of size 2. For each i, we add these m clauses to Φ. These two types of clauses are all the clauses in Φ. Note that each xi,j can only appear up to three times in Φ : once in C ′ j , and once each in the implications between xi,j−1 and xi,j and between xi,j and xi,j+1 (operations in indices being done modulo m). This gives the reduction. We now need to show that Φ is satisfiable if and only if Φ is. First, assume Φ is satisfiable, by assigning each xi value ai. Then consider the assignment to the variables xi,j that assigns each xi,j value ai. Since each clause Cj is satisfied by ~a, and we assign each xi,j the value xi was assigned, each C ′ j is satisfied. Since we give all xi,j the same value, each implication is satsified. Thus, Φ is satisfiable. If Φ is satisfiable by xi,j = ai,j , we must have all ai,j with the same i equal to satisfy the implication clauses. Define ai to be this common value of ai,j . Then the assignment giving xi value ai satisfies Φ, since ai,j satisfies each clause C ′ j and we give the xi the same value as xi,j . Thus, the reduction exactly preserves satisfiability, and hence the restricted version is still NP -complete.