-
Recent Posts
- Matrix Domination December 1, 2023
- Maximum Likelihood Ranking October 27, 2023
- Randomization Test For Matched Pairs October 13, 2023
- Clustering September 29, 2023
- Shapley-Shubik Voting Power September 15, 2023
Recent Comments
Archives
- December 2023
- October 2023
- September 2023
- August 2023
- March 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- June 2022
- 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
- Appendix-Graph Theory
- Appendix-Logic
- Appendix: Miscellaneous
- 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 Appendix-Logic
Tagged 3-sat, 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: Not-All-Equal-3SAT (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 3-literal clauses. For each clause (x1 ∨ x2 ∨ x3) we create a new variable ci (for clause i) and add 2 clauses to our NAE3SAT instance:
(x1∨ x2 ∨ ci) and (x3 ∨ ~ci ∨ F) (Where “F” is the constant value false. We’ll talk more about this later)
The idea is that ci is there to “fix” the clause. If the original clause was satisfiable because of x1 or x2, then ci can be false, and its negation can make the second clause true. If the original clause was satisfiable because of x3, we can make ci true. If the original clause had all three literals satisfiable, we can make ci 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 NP-Hard. To show “normal” NAE3SAT is NP-Hard, 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 xT and xF. We replace all instances of the constant value true with xT, and all instances of the constant value false with xF. We also add one additional clause:
(xT ∨ xT ∨ xF).
Note that this new clause is only NAESatisfiable if xT != xF. We can’t directly bind xT to true and xF 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 Appendix-Logic
Tagged 3-sat, Difficulty 8, LO3, NAE3SAT, reductions, uncited reduction