Weizmann Institute Range Minimization O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.

Slides:



Advertisements
Similar presentations
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Advertisements

NP-Completeness: Reductions
Approximative Kernelization: On the Trade-off between Fidelity and Kernel Size joint with Michael Fellows and Frances Rosamond Charles Darwin University.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Complexity ©D.Moshkovits 1 Hardness of Approximation.
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
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.
Ofer Strichman, Technion 1 Decision Procedures in First Order Logic Part III – Decision Procedures for Equality Logic and Uninterpreted Functions.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Ch 13 – Backtracking + Branch-and-Bound
1 Internet Networking Spring 2002 Tutorial 6 Network Cost of Minimum Spanning Tree.
Coloring Algorithms and Networks. Coloring2 Graph coloring Vertex coloring: –Function f: V  C, such that for all {v,w}  E: f(v)  f(w) Chromatic number.
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM-HRL.
Complexity 1 Hardness of Approximation. Complexity 2 Introduction Objectives: –To show several approximation problems are NP-hard Overview: –Reminder:
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Hardness Results for Problems
1 Joint work with Shmuel Safra. 2 Motivation 3 Motivation.
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Fixed Parameter Complexity Algorithms and Networks.
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.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic Range Allocation.
Daniel Kroening and Ofer Strichman 1 Decision Proceduresfoe Equality Logic 4 Range Allocation.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Lecture 22 More NPC problems
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
1 Latency-Bounded Minimum Influential Node Selection in Social Networks Incheol Shin
NPC.
CSC 413/513: Intro to Algorithms
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
CS 721 Project Implementation of Hypergraph Edge Covering Algorithms By David Leung ( )
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
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.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
Chapter 10 NP-Complete Problems.
Decision Procedures in Equality Logic
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Graph Theory and Algorithm 02
Exact Inference Continued
ICS 353: Design and Analysis of Algorithms
Computation Basics & NP-Completeness
Exact Inference Continued
NP-Completeness Yin Tat Lee
Presentation transcript:

Weizmann Institute Range Minimization O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel

Weizmann Institute DC+C Verification Condition Generator Code generation Abstraction Level ++ CVT Auto-decomposition Abstraction Range Minimizer TLV (verifier)

Weizmann Institute To a formula with uninterpreted functions Uninterpreted functions From a general formula:

Weizmann Institute From a formula with uninterpreted functions: To a formula in the theory of equality Ackerman’s reduction

Weizmann Institute Choosing a minimal range for the integer variables 0. a,b,c,d,e : { }(1.2 E 24)(normal) 1.a,b,c,d,e : {1..5} (3125)(1..n) 2. a,b,c: {1..3}(connectivity d,e: {1..2} (108) analysis) 3. a: {1}, b:{1-2}, c: {1-3}(factorial d: {1}, e: {1-2} (12) reduction)

Weizmann Institute The Range-Minimization Problem Given a quantifier-free formula with equalities only, find in polynomial time the minimal domain needed to preserve its truth value D : Infinite domain D*: finite domain D*D

Weizmann Institute Using the (1..11) range imposes a state space of We can do much better: x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u2 x 1,y 1,u 1 :{0} x 2, y 2, f 1, f 2, u 2 : {0,1}g 1 : {0,1} g 2 : {0,2} z: {0,3} These ranges impose a state-space of 2 8 =256

Weizmann Institute Before and after, in SMV

Weizmann Institute Using Normal Form to analyze the formula The Disjunctive Normal Form of a formula can be exponentially long in its original size Yet...

Weizmann Institute Prediction of the negation sign in DNF The negation sign of each comparison, if transformed to DNF, can be predicted in polynomial time. Counting negations in the parsing tree:     b=c a=b d=e

Weizmann Institute The negation sign can be predicted in P-time. The clauses can not be predicted in P-time.

Weizmann Institute If  is false, then it has at least one falsifying vector Without knowing the partitioning of  to clauses, we have to consider ~ all combinations:

Weizmann Institute x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u {0,1} 00 0 A graphical representation These ranges impose a state-space of 16

Weizmann Institute The Range-Minimization Algorithm Step I - preprocessing Add a single unique value to G  /G = edges, and remove them from the graph: x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u

Weizmann Institute Step II - Set construction For each shared vertex, following an arbitrary order: 1. Add a unique value 2. Broadcast the value on G  3. Remove it from the graph g1g1 g2g2 z 00 0 g1g1 z {0,1} g1g1 g2g2 z

Weizmann Institute u1u1 f1f1 f2f2 u2u f1f1 f2f2 u2u2 {0,1} f2f2 u2u2 {0,1,2} u2u2 {0,1,2,3} u1u1 f1f1 f2f2 u2u2 0{0-1}{0-2}{0-3}

Weizmann Institute x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u {0,1} Why is the algorithm sound? For each G  component, in a given vector: As a common value, choose the value originated in the first shared vertex that was removed. The availability of these values is guaranteed by step II. 0{0-1}{0-2}{0-3}

Weizmann Institute Order makes a difference Order: State-space=24 {0}{0}{0,1}{0,1,2}{0,1,2,3} I IIIIIIV {1,0}{1}{1}{1,2}{1,2,3} III IIIIV Order: State-space=12

Weizmann Institute Construct G’(V,E): V: The shared vertexes of G E: An edge for every two shared vertexes connected directly on G  The Minimal Vertex Cover (MVC) of G’: the minimal set of vertexes that cover all edges of G’. Order makes a difference G’G’

Weizmann Institute The MVC problem is NP-Hard. Therefore we use a heuristic called the greedy algorithm: 1. Remove vertexes in a descending order of degree, until G’ is covered 2. Remove the rest of the vertexes in an arbitrary order Order makes a difference G’G’ Order: III IIIIV

Weizmann Institute V i - The i-th vertex in the order S i - The computed set of values for V i mvc k - the set of vertexes in the MVC of component k m k = |mvc k | For each V i  mvc k : |S i |  i. m k ! For each V i  mvc k : |S i |  m k +1 The upper bound for the state space is: Order makes a difference G’G’ In our case the upper bound is

Weizmann Institute Colors make a difference Order: State-space=12 State-space=4 III IIIIV {1,0}{1}{1}{1,2}{1,2,3} Order: III IIIIV {1,0}{1}{1}{1}{1}

Weizmann Institute Colors make a difference Construct G’’(V,E) and ‘color’ it: V: The shared vertexes of G E: Add an edge for every two shared vertexes that: 1. Are connected through exactly one solid edge (V 1,V 2 ) in G. 2. Are dominant, due to the ordering, in deciding the value of V 1 and V 2 v1v1 v2v2 v3v3 v4v4 If v 3 <v 1 and v 4 <v 2 then color(v 3 )  color(v 4 ) v1<v3v1<v3

Weizmann Institute y k - the number of colors in mvc k (y k  m k ) For every vertex V i s.t. i  y k : |S i |  i For every vertex V i s.t. y k <i  m k : |S i |  y k For every vertex V i s.t. m k <i  n k : |S i |  y k +1 G’’ {0,1}{0}{0}{0}{0} The state-space upper-bound : Colors make a difference

Weizmann Institute In our case: y k =1, m k =2, n k =4 and the upper bound is x1x1 x2x2 y1y1 y2y2 g1g1 g2g2 zu1u1 f1f1 f2f2 u2u {0,1} 00 0

Weizmann Institute The worst case: double cliques One connected component (n k =n) All vertexes are shared Worst vertex-cover: m k = n k -1 Worst coloring: y k =m k Worst state-space = n! A 4 double-clique

Weizmann Institute Formulas with constants The maximal state-space of a formula with c k constants: In the worst case: a b5 {1,5} {1,2,5}

Weizmann Institute The range minimization algorithm - FAQ: The Range minimization algorithm is proven to be sound for any mixed graph. It utilizes heuristics from 3 famous NP-hard problems: Coloring, Set Cover and Minimal Vertex-Cover Under the limitation of the above heuristics, in most cases the algorithm finds a solution which is very close to the optimal one. The implementation is ~ 700 lines long and available

Weizmann Institute Experimental Results Before : 92% verified in reasonable time After: 99.9% verified in reasonable time (solved almost all hard models) With the Range Minimization Module, CVT verified formulas that originally had a state-space of and more.