Analysis of Algorithms: Random Satisfiability Benny Applebaum Introduction.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems Russell and Norvig: Chapter
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Survey Propagation Algorithm
Approximation Algoirthms: Semidefinite Programming Lecture 19: Mar 22.
Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
Semidefinite Programming
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
CPSC 322, Lecture 13Slide 1 CSPs: Arc Consistency & Domain Splitting Computer Science cpsc322, Lecture 13 (Textbook Chpt 4.5,4.8) February, 02, 2009.
Constraint Satisfaction Problems
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
NP-complete and NP-hard problems
AAAI00 Austin, Texas Generating Satisfiable Problem Instances Dimitris Achlioptas Microsoft Carla P. Gomes Cornell University Henry Kautz University of.
1 Discrete Structures CS 280 Example application of probability: MAX 3-SAT.
 Linear Programming and Smoothed Complexity Richard Kelley.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
ENGG3190 Logic Synthesis “Boolean Satisfiability” Winter 2014 S. Areibi School of Engineering University of Guelph.
1 Paul Beame University of Washington Phase Transitions in Proof Complexity and Satisfiability Search Dimitris Achlioptas Michael Molloy Microsoft Research.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
Constraint Satisfaction Problems
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
COSC 4426 Topics in Computer Science II Discrete Optimization Good results with problems that are too big for people or computers to solve completely
Modular Arithmetic Shirley Moore CS4390/5390 Fall September 3, 2013.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Equations of Linear Relationships
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
Fitting a Function to the Difficulty of Boolean Formulas Greg Dennis NMM Final Project.
Chapter 5 Constraint Satisfaction Problems
Sarah R. Allen Ryan O’Donnell David Witmer Carnegie Mellon University.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
1 Beginning & Intermediate Algebra – Math 103 Math, Statistics & Physics.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
Why almost all satisfiable k - CNF formulas are easy? Danny Vilenchik Joint work with A. Coja-Oghlan and M. Krivelevich.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Complexity ©D.Moshkovits 1 2-Satisfiability NOTE: These slides were created by Muli Safra, from OPICS/sat/)
PhD March The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CS623: Introduction to Computing with Neural Nets (lecture-7) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay.
Evolutionary Computing Chapter 13. / 24 Chapter 13: Constraint Handling Motivation and the trouble What is a constrained problem? Evolutionary constraint.
© R.A. Rutenbar 2009 Slide 1 Carnegie Mellon (Lec 06) Boolean Satisfiability: SAT Solvers (Pt 1) What you know  Representation and manipulation via BDDs,
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
Richard Anderson Lecture 26 NP-Completeness
Dr. Rachel Ben-Eliyahu – Zohary
The Propositional Calculus
Richard Anderson Lecture 26 NP-Completeness
Implications of the ETH
Possibilities and Limitations in Computation
SAT-Based Area Recovery in Technology Mapping
Constraint Satisfaction Problems
Presentation transcript:

Analysis of Algorithms: Random Satisfiability Benny Applebaum Introduction

Department should schedule the following courses: Discrete Math, Physics1, Linear Algebra, Differential Methods, Matlab, Physics2, Intro to CS, Differential Equations, Data-Structures, Logic-Design Constraints: DiscMath, Phys1, LinAlg,DiffMeth can’t be at the same time Dr. No: wants to teach LinAlg and DiffEq at the same day Dr. Phil (Phys1, Phys2): hates Mondays Dr. Evil (LogDes) wants to arrive late on Wednesdays (after 2pm) …. Hard to satisfy all constraints…. (Is it possible at all?) The Time-Table Problem

Given: n variables x 1,…,x n over domain X and m constraints: f 1 (x 1,x 2,x 3 )=a 1 … f m (x 1,x 10,x 11,x 50 )=a m Goal: find a satisfying assignment Abstraction: Constraint Satisfaction Problems Time table example: For each course define 2 vars (Day, Time): - (D DiscMath, T DiscMath ), (D Phy1, T Phy1 ), (D LinAlg, T LinAlg ), (D DiffMet, T DiffMet ), … Constraints: -(D DiscMath, T DiscMath )  (D Phy1, T Phy1 ) - D LinAlg = D DiffMet AND D LinAlg  D DiffMet -…

Given: n variables x 1,…,x n over domain X and m constraints: f 1 (x 1,x 2,x 3 )=a 1 … f m (x 1,x 10,x 11,x 50 )=a m Goal: find a satisfying assignment The power of Constraint Satisfaction Problems CSPs can be found everywhere: circuit-design (placement, routing, testing) compiler optimization/scheduling computer graphics, image processing decoding error-correcting codes computational biology, economics, physics, chemistry, sociology Universality: solving CSP allows to solve all NP-problems !

k-CNF: n variables x 1,…,x n over binary domain {0,1} constraints in conjunctive normal form: x 1  x 2  x 3 (  x 2 )  x 4  (  x 5 ) … x 2   x 10  x 11 Each constraint contains at most k variables The special case of k-SAT K-SAT problem: given k-CNF find a satisfying assignment if it exists Special case of CSPs …. But still universal !!! Cook-Levin Thm: 3-SAT is NP-hard - efficiently solving 3-SAT  efficiently solving all NP Literal (variable or its negation) Clause

Coping with NP-hardness The P  NP assumption: There is no efficient algorithm that always solves 3-SAT It is widely believed that Assumption holds But proving it is one of the most important problems in science The assumption talks about worst-case behavior Q: Is there an efficient algorithm that solves 3-SAT on “most” instances? Depends on the distribution of instances Subject of our course !

Random CNFs F 3 (n,m)= uniform distribution over 3-CNFs: n variables x 1,…,x n m random constraints C 1,…C m - Choose C i independently and uniformly from all possible 3-clauses -(n choose 3)*2 3 options for each clause F k (n,m)= uniform distribution over k-CNFs - how many possibilities per clause ? Random Graph: n m variables clauses x1xnx1xn x1x2 x5x1x2 x

More Clauses  Less Solutions Clauses: 1. x 1  x 2  x 3 2. (  x 2 )  x 4  (  x 5 ) 3. x 2   x 10  x … 5.… 6.… 7.… 8.… 9.… 10.… All assignments {0,1} n Satisfying UnSatisfying 000********* *1*01****** *0*******10*

K-CNFs: Phase-Transition vs. Complexity Let r=m/n Clause-Variables ratio all assignments {0,1} n 2 k ln2±k Sat UnSat SAT threshold Satisfiable Pr[F k (n,rn) sat]  1 Algorithmic Barrier 2 k /k UnSatisfiable Pr[F k (n,rn) sat]  0 Efficient Algorithms Interesting connection: complexity depends on geometry of solutions?

Course Plan Let r=m/n Clause-Variables ratio all assignments {0,1} n 2 k ln2±k Sat UnSat SAT threshold Satisfiable Algorithmic Barrier 2 k /k UnSatisfiable (whp) Efficient Algorithms (1) Solving sparse instances (2) Solving dense satisfiable instances (3) Applications: Hard CSPs  fast crypto Easy CSPs  fast error-correction

Two Frameworks for Algorithms DPLL(CNF  ): While there exists an unassigned variable x i Try x i =1, recurse on  |x i =1 If “failed”, Try x i =0, recurse on  |x i =0 If “failed” output “unsat” Output assignment LocalSearch(CNF  ): Initialize assignment  For T iterations If  satisfies  output  Update  to  ’ via a “local rule” Output failed to find an assignment How to choose the next var? Which value (0,1) to try first? Where to start? How to modify assignment ?

Phase-Transition vs. Computational Complexity Let r=m/n Clause-Variables ratio {0,1} n r<4 r>4.5 r  4.2 Pr[F 3 (n,rn) sat]  1 Sat UnSat Pr[F 3 (n,rn) sat]  1/2 Pr[F 3 (n,rn) sat]  0 Efficient Algorithms Yes Unknown! (seems Hard…) Interesting connection: complexity depends on statistical structure?

Efficient Algorithms K-SAT: The Sparse Regime Let r=m/n Clause-Variables ratio {0,1} n 2 k ln2±k Sat UnSat SAT threshold Satisfiable But no algorithms Algorithmic Barrier 2 k /k UnSatisfiable (whp)

Efficient Algorithms K-SAT: The Dense Regime Let r=m/n Clause-Variables ratio {0,1} n 2 k ln2±k Sat UnSat SAT threshold Satisfiable But no algorithms Algorithmic Barrier 2 k ln(k)/k UnSatisfiable (whp)