Student:Victoria Kravchenko Supervisors:Prof. Yoram Moses Liat Atsmon.

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
The Theory of NP-Completeness
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Mount Holyoke College 2 The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
Graphs 4/16/2017 8:41 PM NP-Completeness.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003.
NP-Complete Problems Problems in Computer Science are classified into
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
3.5 – Solving Systems of Equations in Three Variables.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Lecture 22 More NPC problems
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
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.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
CSC 413/513: Intro to Algorithms
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
NP-complete Languages
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.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
P & NP.
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Lecture 2-2 NP Class.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Intro to Theory of Computation
Lecture 24 NP-Complete Problems
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
NP-Completeness Proofs
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
Prabhas Chongstitvatana
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

Student:Victoria Kravchenko Supervisors:Prof. Yoram Moses Liat Atsmon

Study and evaluate the approach of solving optimization problems through SAT reduction, and using SAT solvers to solve the reduced problems.

 Boolean satisfiability problem (x 1 +x 5 ’+x 4 ) (x 1 ’+x 5 +x 3 +x 4 ) (x 3 ’+x 4 ’)  NP-Complete  CNF (Conjunctive Normal Form) – “AND of ORs”

 Developed at 2003 by Niklas Eén and Niklas Sörensson  Advantages: open-source, successful, small.

For:(x 1 +x 5 ’+x 4 ) (x 1 ’+x 5 +x 3 +x 4 ) (x 3 ’+x 4 ’) p cnf 5 3 → p cnf number_of_variables number_of_clauses → 0 is the end of the clause

 PART 1: Equation Checker  PART 2: SAT with Optimization  PART 3: Maximal Acyclic Subgraph

 Input: X, Y, Z – decimal numbers  Output: whether X+Y=Z or not  Calculates the binary form of the numbers  The program prepares the input for MiniSat using the table:

 For the LSB bit:

 Input: Vec – x 0,x 1,x 2,… Phi – CNF expression  Output: maximal value of Vec (as a binary number) which satisfies Phi

 Versions: I.Bit by Bit: II.MiniSat condition: MSB 1?1 0 ????? ?1?

 Input: graph name nodes – [node_number],[node_weight] edges – [node_from],[node_to] For example: ex1 1,2-2,2-3,1 1,2-2,3-3,1 1 (2) 3 (1) 2 (2)

 Output: maximal acyclic subgraph 1 (2) 3 (1) 2 (2)

1 (1) 3 (2) 2 (2) 5 (3) 4 (3) lsg ex1 1,1-2,2-3,2-4,3-5,3 1,2-1,3-2,3-2,4-4,5-5,3

1 (1) 3 (2) 2 (2) 5 (3) 4 (3) lsg ex2 1,1-2,2-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,3

1 (2) 3 (2) 2 (1) 5 (3) 4 (3) lsg ex3 1,2-2,1-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,3

1 (1) 3 (2) 2 (2) 5 (3) 4 (3) lsg ex4 1,1-2,2-3,2-4,3-5,3 1,2-3,1-2,3-2,4-4,5-5,2-5,3

1 (1) 3 (2) 2 (4) 5 (1) 4 (3) lsg ex5 1,1-2,4-3,2-4,3-5,1 1,2-3,1-2,3-2,4-4,5-5,2-5,3

For each edge:  Define: [node_from] > [node_to]  Condition:  Translate the condition to CNF using a tree (reduction to 3-SAT)

Building the weighted sum:  [node] x [weight]: Y1 [m vars] ↔ X1 [node number] x W1 [m vars] Y2 [m vars] ↔ X2 [node number] x W2 [m vars]  Sum the intermediate variables as in the Equation Checker: Z1 [m vars] ↔ Y1 [m vars] + Y2 [m vars]  Continue summing: Z2 [m vars] ↔ Z1 [m vars] + Y3 [m vars]  Save the last intermediate variables representing the accumulated sum: Z(n-1) [m vars] ↔ Z(n-2) [m vars] + Yn [m vars]  Z final ↔ X 1 *W 1 + X 2 *W 2 + … + X n *W n

 Get a result from the MiniSat using only the edges conditions and extract the weight W res  Demand a new result with a greater weight s.t. Z final > W res  Continue until the conditions can not be saturated

 The graphs are polynomial and not exponential although the problem in NP complete – success!  Nodes have a stronger effect on the run time.

Thank you for your attention!