Download presentation
Presentation is loading. Please wait.
Published byCollin Bradford Modified over 8 years ago
1
Making Path-Consistency Stronger for SAT Pavel Surynek Faculty of Mathematics and Physics Charles University in Prague Czech Republic
2
Outline of the talk Motivation SAT problems Constraint model of SAT and Path-consistency Modification of Path-consistency Complexity and propagation algorithm Experimental evaluation propagation strength comparison comparison on SAT preprocessing CSCLP 2008 Pavel Surynek
3
Motivation Local consistencies local inference often too weak for SAT arc-consistency, path-consistency, i,j-consistency insignificant gain in comparison with unit-propagation expensive propagation w.r.t. inference strength Global consistencies (global constraints) strong global inference often significant simplification of the problem no explicit global constraints in SAT Consistency based on structural properties exploit structure for global propagation in SAT CSCLP 2008 Pavel Surynek
4
Boolean Satisfaction Problem (SAT) A Boolean formula is given - variables can take either a value true or false The task is to find valuation of variables such that the formula is satisfied or decide that no such valuation exists Conjunctive normal form (CNF) - standard form of the input formula variables: x 1,x 2,x 3,... literals: x 1, x 1,x 2, x 2,... variable or its negation clauses: (x 1 x 2 x 3 )... disjunction of literals formula: (x 1 x 2 ) (x 1 x 2 x 3 )... conjunction of clauses CSCLP 2008 Pavel Surynek example: x = true y = false example: ( x y) (x y) example: p cnf 3 2 1 -2 0 1 2 -3 0...
5
SAT as CSP: Literal encoding model (X,D,C) X... variables ↔ clauses D... variable domains ↔ literals C... constraints ↔ values standing for complementary literals are forbidden Consider SAT CSP model as an undirected graph vertices ↔ values in domains, edges ↔ allowed pairs of values (not all shown in the example) V ( x1 x2) x1x1 x2x2 x1x1 x2x2 x2x2 x3x3 x2x2 x3x3 x3x3 x1x1 x3x3 x1x1 x1Vx2x1Vx2 x1Vx2x1Vx2 x2Vx3x2Vx3 x2Vx3x2Vx3 x3Vx1x3Vx1 x3Vx1x3Vx1 Constraint Model for SAT CSCLP 2008 Pavel Surynek example: V ( x1 x2),V (x1 x2),... example: V ( x1 x2) { x 1, x 2 } example: V ( x1 x2) = x 1 and V (x1 x2) = x 1 is forbidden
6
Let us have a sequence of variables (path) pair of values is path-consistent w.r.t. to the sequence if there is a path between them in the graph that uses the edges between neighboring variables in the sequence Ignores constraints not between variables neighboring in the sequence of variables x1x1 x2x2 x1x1 x2x2 x2x2 x3x3 x2x2 x3x3 x3x3 x1x1 x3x3 x1x1 x1Vx2x1Vx2 x1Vx2x1Vx2 x2Vx3x2Vx3 x2Vx3x2Vx3 x3Vx1x3Vx1 x3Vx1x3Vx1 Path-Consistency for SAT: a graph interpretation CSCLP 2008 Pavel Surynek
7
Modified Path-Consistency for SAT Deduce more information from constraints decompose values into disjoint sets (called layers... L 1, L 2,...) deduce more information from constraints - calculate maximum numbers of visits by a path in layers Stronger restriction on paths → stronger propagation CSCLP 2008 Pavel Surynek x1x1 x2x2 x1x1 x2x2 x2x2 x3x3 x2x2 x3x3 x3x3 x1x1 x3x3 x1x1 x1Vx2x1Vx2 x1Vx2x1Vx2 x2Vx3x2Vx3 x2Vx3x2Vx3 x3Vx1x3Vx1 x3Vx1x3Vx1 1 1 2 2 22 2 2 2 2 1 1 L1L1 L2L2 path ending in this vertex must not visit L 1 more than two times
8
NP-Completeness of Modified Path-Consistency Enforcing modified path-consistency is difficult (NP-complete) Theorem: Existence of a Hamiltonian path in a graph is reducible to the existence of the path respecting maximum numbers of visits. Main idea of the proof: G=(V,E), where V={v 1,v 2,...,v n } CSCLP 2008 Pavel Surynek (v 1,v 2 ) (v 1,v 1 ) (v 1,v n ) (v 2,v 2 ) (v 2,v 1 ) (v 2,v n ) (v n,v 2 ) (v n,v 1 ) (v n,v n )... (v i,v k ) (v j,v k+1 ) {v i,v j } E L1L1 L2L2 LnLn 1 1 1 1 1 1 1 1 1
9
Approximation Algorithm We need to relax from the exact enforcing the modified path-consistency We use a variant of Dijkstra’s single-source shortest path algorithm for each vertex we calculate the lower bound of number of visits in layers if the lower bound of visits in L i for the vertex x is k then every path starting in the original vertex and ending in x visits L i at least k-times lower bounds allow us to check violation of the maximum number of visits → some paths may become forbidden CSCLP 2008 Pavel Surynek
10
Experimental Evaluation: propagation strength of PC and MPC Comparison of the number of filtered pairs of values several benchmark problems from the SAT Library comparison of PC and modified PC enforced by approximation algorithm on some problems modified PC is significantly stronger times were slightly higher for modified PC CSCLP 2008 Pavel Surynek SAT Problem Number of variables Number of clauses Pairs filtered by standard PC Pairs filtered by modified PC bw_large.a495467522 hanoi47184934910 huge459705412 jnh2100850135147 logistics.a8286718192 medium116953177227 par8-1-c64254019 par8-2-c6827009 par8-3-c752980100 par16-1-c3171264011 par16-2-c349139207 par16-3-c334133207 ssa0432/0034351027811598 ssa2670/1301359332142656 ssa2670/1419862315208871 ssa7552/03815013575165652 ssa7552/15813633034492371
11
Experimental Evaluation: PC and MPC on SAT preprocessing Improvement ratio gained by preprocessing of SAT problems by modified PC in comparison with PC the number of decision steps was measured on some problems modified PC has a good effect CSCLP 2008 Pavel Surynek Problem#variables#clausesHaifaSatMinisat2Rsat_1_03zChaff bw_large.a45946751.0 hanoi471849341.0 hanoi51931144681.0 huge45970541.0 jnh21008501.0 1.3 logistics.a82867181.0 medium1169531.0 0.80.9 par8-1-c642541.0 0.90.7 par8-2-c682700.91.20.70.8 par8-3-c752980.81.40.60.8 par16-1-c31712640.10.42.20.1 par16-2-c34913921.12.30.8 par16-3-c33413320.81.46.61.6 ssa0432-00343510271.0228.0155.0122.0 ssa2670-1301359332151.0411.0371.0323.0 ssa2670-1419862315289.0429.0455.0489.0 ssa7552-03815013575190.0226.0173.0238.0 ssa7552-15813633034114.0129.0151.0312.0
12
Conclusions and Future Work We proposed a modified variant of path-consistency We are trying to exploit global structural properties of the problem Experimental evaluation indicates some advantages of modified path-consistency in comparison with the standard version There are still many open questions for future work: experimental evaluation on standard CSPs more competitive evaluation with SAT solvers better approximation algorithm, tractable cases CSCLP 2008 Pavel Surynek
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.