Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.

Similar presentations


Presentation on theme: "Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera."— Presentation transcript:

1 Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera

2 Overview The Satisfiability Problem in its most general form is determining whether it is possible to satisfy a given set of logical constraints The Satisfiability Problem in its most general form is determining whether it is possible to satisfy a given set of logical constraints Could take many forms: Could take many forms: Boolean expressions & logic circuits Boolean expressions & logic circuits Many other applications as well (e.g. Artificial Intelligence) Many other applications as well (e.g. Artificial Intelligence) Was the original NP-Complete Problem Was the original NP-Complete Problem Shown in 1970 by Stephen Cook Shown in 1970 by Stephen Cook

3 CNF-SAT Problem CNF – Acronym for Conjunctive Normal Form which is a boolean expression given as a product of sums CNF – Acronym for Conjunctive Normal Form which is a boolean expression given as a product of sums Let us consider the example: Let us consider the example: (A  B)  (B  ¬C)  (A  ¬B) (A  B)  (B  ¬C)  (A  ¬B) Could easily use an exhaustive search in the form of a truth table to solve this problem Could easily use an exhaustive search in the form of a truth table to solve this problem

4 Davis-Putnam Algorithm Recursive Algorithm that creates a search tree by making assignments to the remaining variables at each stage of the algorithm Recursive Algorithm that creates a search tree by making assignments to the remaining variables at each stage of the algorithm Performs better on average than an exhaustive search Performs better on average than an exhaustive search Effectively prunes failed branches from the search tree Effectively prunes failed branches from the search tree

5 Davis-Putnam Algorithm Continued Let ’ s apply the Davis-Putnam Algorithm to our example: Let ’ s apply the Davis-Putnam Algorithm to our example: (A  B)  (B  ¬C)  (A  ¬B) procedure split(E) { if E has an empty clause, then return if E has no clauses, then exit with current partial assignment select next unassigned variable, x i in E split(E(x i =0)) split(E(x i =1)) } Davis-Putnam Algorithm:

6 Davis-Putnam Algorithm Continued (A  B)  (B  ¬C)  (A  ¬B) B  (B  ¬C)  ¬B B  ¬C ()()()() ()()()() ¬C¬C¬C¬C  ()()()() A=0A=1 B=0B=1B=0B=1 C=0C=1 Application to: (A  B)  (B  ¬C)  (A  ¬B) (  ) = Failed Partial Assignment  = Successful Partial Assignment

7 Davis-Putnam Algorithm Continued Unfortunately in the worse case the Davis-Putnam Algorithm is still exponential Unfortunately in the worse case the Davis-Putnam Algorithm is still exponential Currently there is no known solution that provides a worse case performance better than exponential Currently there is no known solution that provides a worse case performance better than exponential

8 Other Applications? So far we have seen instances of the Satisfiability problem to pure logic applications So far we have seen instances of the Satisfiability problem to pure logic applications However it is possible to apply to many other types of problems as well However it is possible to apply to many other types of problems as well In fact the problem of Satisfiability is a “ central ” problem and has limitless applications In fact the problem of Satisfiability is a “ central ” problem and has limitless applications

9 Complexity Classes Review Review P – Problems which can be solved in polynomial time P – Problems which can be solved in polynomial time NP – Problems which can be solved in non-deterministic polynomial time NP – Problems which can be solved in non-deterministic polynomial time All problems in the NP class can be reduced (in polynomial time) to problems which are said to be NP-Complete All problems in the NP class can be reduced (in polynomial time) to problems which are said to be NP-Complete P = NP??? – Could be shown if one could find a polynomial time solution for a NP-Complete problem such as the Satisfiability problem. P = NP??? – Could be shown if one could find a polynomial time solution for a NP-Complete problem such as the Satisfiability problem.

10 Complexity Classes Continued… Class P Class NP NP-Complete Problems exist at very edge of Class NP Intractable Problems Increasing Hardness Can be visualized in the form of a set chart with problem hardness increasing radially

11 Transformation Of Other NP Problems Into SAT Problems Instance of the Satisfiability Problem Some Examples Include: Hamiltonian cycle traveling salesperson, 3-graph coloring, partition problem, etc… Any Problem In Complexity Class NP Transformation Transform the problem to be solved from an optimization to a decision. This can be done in polynomial time Provides a method to transform any problem in NP class into an instance of the Satisfiability problem. Therefore, we can say that the Satisfiability problem is NP-Complete. Output is a series of “ true ” or “ false ”

12 Implications Since the Satisfiability problem is NP-Complete, if a polynomial time solution for the Satisfiability problem was known then we could solve all the problems in the NP complexity class in polynomial time. Since the Satisfiability problem is NP-Complete, if a polynomial time solution for the Satisfiability problem was known then we could solve all the problems in the NP complexity class in polynomial time. This would essentially collapse the complexity class NP into P This would essentially collapse the complexity class NP into P


Download ppt "Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera."

Similar presentations


Ads by Google