This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 577: Introduction to Algorithms 12/12/06 Homework Solution: 6a Instructor: Shuchi Chawla TA: Siddharth Barman Question 1 1a Given an assignment of variables we can verify in polytime that the boolean formula is satisfied along with the fact that each variable occurs at most thrice. This proves that ReadThrice 3SAT RT SAT is in NP . We reduce 3 SAT to RT SAT to prove that it is NPcomplete. Given a boolean formula φ in 3 CNF we wish to reduce it to ϕ such that in ϕ each literal occurs at most thrice and ϕ is satisfiable iff φ is satisfiable. The idea is to introduce new variables (family y ) for each variable that occurs more than three times in φ . Say φ has boolean variables x 1 to x n . Now, if a particular variable x i and its complement x i occurs m i time ( m i > 3) we introduce additional variables y i 1 to y i m i . We also ensure that for any assignment all the additional variables y i 1 to y i m i get assigned the same value as x i . We replace the occurrence of x i ( x i ) by y i j ( y i j ), this ensures that each literal occurs at most thrice. The caveat regarding equivalence of x i and y i j s follows. In general to ensure that variables x and y i s (superscripts are dropped for now) are assigned the same value we add the following clauses: ( x ∨ y 1 ) , ( y 1 ∨ y 2 ) ,...., ( y k − 1 ∨ y k ) and finally ( y k ∨ x )....
View
Full
Document
This note was uploaded on 02/17/2011 for the course CS 577 taught by Professor Joseph during the Spring '08 term at University of Wisconsin.
 Spring '08
 JOSEPH
 Algorithms

Click to edit the document details