
Recent Posts
 Code Generation With Unfixed Variable Locations May 18, 2022
 Code Generation With Address Expressions December 8, 2021
 Code Generation for Parallel Assignments November 17, 2021
 Code Generation With Unlimited Registers November 4, 2021
 Code Generation on a OneRegister Machine October 13, 2021
Recent Comments
 Linear regression with l0l_0 regularization – GrindSkills on Exact Cover by 3Sets
 Sean T. McCulloch on Satisfiability
 Jonathan Buss on Satisfiability
 Sean T. McCulloch on Pokemon
 Tim Knittel on Pokemon
Archives
 May 2022
 December 2021
 November 2021
 October 2021
 September 2021
 August 2021
 July 2021
 May 2021
 April 2021
 March 2021
 February 2021
 January 2021
 December 2020
 November 2020
 October 2020
 September 2020
 August 2020
 March 2020
 February 2020
 January 2020
 December 2019
 November 2019
 October 2019
 September 2019
 August 2019
 July 2019
 June 2019
 May 2019
 April 2019
 March 2019
 February 2019
 January 2019
 December 2018
 November 2018
 October 2018
 September 2018
 August 2018
 July 2018
 June 2018
 May 2018
 April 2018
 March 2018
 February 2018
 January 2018
 December 2017
 November 2017
 October 2017
 September 2017
 August 2017
 July 2017
 June 2017
 May 2017
 April 2017
 March 2017
 February 2017
 January 2017
 December 2016
 November 2016
 October 2016
 September 2016
 August 2016
 July 2016
 June 2016
 May 2016
 April 2016
 March 2016
 February 2016
 January 2016
 December 2015
 November 2015
 October 2015
 September 2015
 August 2015
 July 2015
 June 2015
 May 2015
 April 2015
 March 2015
 February 2015
 January 2015
 December 2014
 November 2014
 October 2014
 September 2014
 August 2014
 July 2014
 June 2014
Categories
 Algebra and Number Theory
 Appendix Algebra and Number Theory
 Appendix Automata and Language Theory
 Appendix Games and Puzzles
 Appendix Mathematical Programming
 Appendix Network Design
 Appendix Program Optimization
 Appendix Sets and Partitions
 AppendixGraph Theory
 AppendixLogic
 Appendix: Sequencing and Scheduling
 Appendix: Storage and Retrieval
 Chapter 3 Exercises
 Core Problems
 Overview
 Problems not in appendix
 Uncategorized
Tag Archives: LO3
Protected: Generalized Satisfiability
Enter your password to view comments.
Posted in AppendixLogic
Tagged 3sat, Difficulty 5, Generalized Satisfiability, LO1, LO2, LO3, LO4, LO5, LO6
Not All Equal 3SAT
This is jumping ahead a little, but this is a variant of 3SAT that will be helpful in the future (actually, for the next problem)
The problem: NotAllEqual3SAT (NAE3SAT). This is problem LO3 in the appendix.
The description: Just like 3SAT, except instead of requiring at least one of the literals in each clause to be true, we’re requiring at least one literal to be true and at least one literal to be false. So we’re removing the case where all three literals can be true.
Notice that if we have an assignment of variables that is a NAE3SAT solution, then if we negate all of the variables, we still have a NAE3SAT solution
The reduction: From regular 3SAT. We’re given a formula that is a collection of 3literal clauses. For each clause (x_{1} ∨ x_{2} ∨ x_{3}) we create a new variable c_{i} (for clause i) and add 2 clauses to our NAE3SAT instance:
(x_{1}∨ x_{2} ∨ c_{i}) and (x_{3} ∨ ~c_{i} ∨ F) (Where “F” is the constant value false. We’ll talk more about this later)
The idea is that c_{i} is there to “fix” the clause. If the original clause was satisfiable because of x_{1} or x_{2}, then c_{i} can be false, and its negation can make the second clause true. If the original clause was satisfiable because of x_{3}, we can make c_{i} true. If the original clause had all three literals satisfiable, we can make c_{i} false, and become an acceptable NAE3SAT solution.
Note that because the definition of NAE3SAT (and, for that matter, regular 3SAT) is defined in terms of collections of 3 variables, the constant value false we used above isn’t strictly legal. We’ve really just shown “NAE3SAT with some constants replacing variables” is NPHard. To show “normal” NAE3SAT is NPHard, we need to reduce the fixed constant version into the normal version:
Given an instance of NAE3SAT with fixed constants, we create 2 new variables x_{T} and x_{F}. We replace all instances of the constant value true with x_{T}, and all instances of the constant value false with x_{F}. We also add one additional clause:
(x_{T} ∨ x_{T} ∨ x_{F}).
Note that this new clause is only NAESatisfiable if x_{T} != x_{F}. We can’t directly bind x_{T} to true and x_{F} to false because if you take a NAE3SAT solution and negate all literals, you get another NAE3SAT solution. But because of that, this is NAESatisfiable if and only if the original formula is.
Difficulty: It depends on what you give them. If you make them do everything I did above, I’d say it’s an 8. If you let them stop at the NAE3SAT with fixed constants, then maybe a 7.
Posted in AppendixLogic
Tagged 3sat, Difficulty 8, LO3, NAE3SAT, reductions, uncited reduction