Combinatorial search
== proof construction?
Jo Devriendt
jodevriendt.com
Acknowledgment:
MIAO group headed by Jakob Nordström
slides: slides.com/jod/proofsearch
Search constructs a solution by trial and error
- Depth-first search for a solution to a set of constraints
- Local search to improve the solution under some objective
- Calculate the value of a definition, query, DMN table, ...
Classic view:
Combinatorial solvers are
search engines

- Derive that no (more) solution(s) exists
- Construct an explanation for a propagation
- Prove that a solution is optimal
- Derive that a formula is implied by some theory
- ...
But what do you do if there is no solution?
In the classic view, one uses a completeness argument:
all possible solutions have been investigated by the search tree
- Exponentially many solutions
- Maybe even infinite
Complete search
x=1
y=1
z=1
z=0
x=1
y=1
y=0
z=1
z=0
z=0
x=0
Complete search
x=1
x=0
y=1
y=0
y=1
y=0
z=1
z=0
z=0
x=0
Complete search
Answer: proof construction
Combinatorial solvers also construct a (partial) proof during search
- Proof is a syntactical derivation tree
- Leafs are a set of "formula" constraints
- Each parent node is a new implied constraint derived by some sound syntactical rule
- The root is a trivial inconsistency, implying unsatisfiability of the formula constraints
Resolution proof
- Propositional clauses
- Resolution rule
- E.g.
Conflict-driven clause learning
constructs resolution proofs
x=1
y=1
z=1
z=0
Resolution:
Resolution:
y=0
z=0
x=1
x=0
Conflict-driven clause learning
constructs resolution proofs
Cool, let's try CDCL!
- IDP-Z3 uses CDCL
- constructs resolution proofs
- IDP-Z3 cannot find a short proof for PHP?
- Short resolution proof for PHP does not exist! [H85]
Cutting-plane proof system
- Input: 0-1 linear constraints, e.g.,
- Rules:
- Boolean axiom
- Addition
- Multiplication
- Division
- Boolean axiom
- Trivial inconsistency:
- Input: 0-1 linear constraints (+ linear objective)
-
Output: either
- (optimal) solution
- proof that no solution exists
-
Search state:
- set of constraints φ
- partial assignment α
-
Initial state:
- φ = input
- α = {}
-
Depth-first search loop
- learning an implied cutting plane from failure
Example:
Pseudo-Boolean learning
Unit propagation
- Under α, if a constraint c ∈ φ would be falsified by assuming x=0 (resp. x=1), extend α with x=1 (resp. x=0)
- Propagate until fixpoint
Pseudo-Boolean learning
Unit propagation
Conflict?
- Conflict: some c ∈ φ falsified by α
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
- Only if unit propagation did not lead to a conflict
- If no unassigned variable left, return solution
- Resume unit propagation
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
- Only if unit propagation did not lead to a conflict
- If no unassigned variable left, return solution
- Resume unit propagation
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
no
Pseudo-Boolean learning
- Conflict: some c ∈ φ falsified by α
Unit propagation
Conflict?
Learn constraint
Decide unassigned variable
yes
no
- From falsified constraint and reasons, construct learned constraint
- implied by φ, should prevent conflict
- Add learned constraint to φ
- → learned constraint database
Pseudo-Boolean learning
Unit propagation
Conflict?
Learn constraint
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
- Backjump based on learned constraint
- Resume unit propagation
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unit propagation
Conflict?
Decide unassigned variable
yes
no
Pseudo-Boolean learning
Backjump
Learn constraint
Unsatisfiable!
Unit propagation
Conflict?
Learn constraint
Backjump
Decide unassigned variable
yes
no
- Learning constraints pushes search forward
- Thousands of conflicts per second
- Originates from Boolean satisfiability (SAT) [MS96,BS97,MMZZM01]
- Generalized to pseudo-Boolean (PB) solving [CK05,SS06,LP10,EN18]
- many variations possible
here be dragons
Pseudo-Boolean learning
Learn constraint
here be dragons
Conflict analysis according to [EN18]
- Pop last variable from assignment stack
- if it exists, add reason constraint for last variable to conflict,
scaled such that variable fully cancels - if no reason, just continue
- if it exists, add reason constraint for last variable to conflict,
- Always maintain "conflictingness"
- when needed, divide reason constraint or add axioms
-
Stop when propagating at some earlier search node
- guaranteed to eventually stop
- Generalization of conflict-driven clause learning (CDCL) from SAT
Pseudo-Boolean learning
Pseudo-Boolean learning
"RoundToOne" method
- PB normal form: only positive coefficients
- Slack: best-case evaluation of constraint
- Slack is subadditive: sum of two constraints can not have more slack than sum of slacks of both constraints
- Conflict side conflicting: slack < 0
- Ensure reason has 0 slack
- Ensure latest propagated variable is cancelled after addition
- Result is new conflict, but without resolved variable
So far:
- Combinatorial solvers build proofs to avoid enumerating all potential solutions of unsatisfiable instances
-
CDCL-based solvers build resolution proofs
- Smallest PHP resolution proof is exponential
- RoundingSat and [CK05, SS06,LP10] PB solvers build cutting-plane proofs
Question break
Cutting-planes p-simulates resolution
Any resolution proof can be converted into a cutting planes proof with polynomial overhead
Resolution:
Do polynomial cutting-plane proofs for PHP exist?
Simple cardinality case:
Do polynomial cutting-plane proofs for PHP exist?
- Linear number of rule applications
- RoundingSat can find this proof
Simple cardinality case:
Sum up each forall
Add together
Do polynomial cutting-plane proofs for PHP exist?
Complex clausal case:
- Yes! [CCT87]
- So cutting-planes > resolution
- RoundingSat can not find this proof
- Only "canceling" application of the addition rule
- On CNFs, "conflict-driven cutting planes" degenerates to CDCL
- Don't encode a strong 0-1 linear inequalities as clauses
CDCL on the cardinality encoding for PHP?
- Clasp or IDP3: timeout
- "lazy clause generation" eventually encodes the at-most-1 constraints to clauses
- IDP-Z3: complicated
- With the right input, Z3's LP solver is triggered
Simple cardinality case:
- Currently the fastest PB solver
- though MIP solvers probably are faster on many MIPLIB / optimization benchmarks
- Returns machine-verifiable proof of unsatisfiability / optimality
- Integration with SoPlex [ZIB] LP solver [DGN20]
- fully sound, bypasses floating point issues
- Arbitrarily large coefficient constraints without efficiency loss on small coefficient constraints
- Recent: core-guided optimization
- MaxSAT technique
RoundingSat
gitlab.com/miao_research/roundingsat
RoundingSat

By Romain Wallon (CRIL, Univ Artois & CNRS)
instances taken from [PBCOMP]
RoundingSat

[LBDEN20]
- Verification of various bit-level multiplier circuits
- All instances are unsatisfiable
RoundingSat

[SDNS20]
- Planning problems with classic state-transition system
- Transition function is learned with a binarized neural network (BNN)
- Resulting planning problem has particular structure with bad linear relaxation and large SAT encoding
- Perfect for PB :)
RoundingSat

[P04]
- Knapsack instances seem hard for clause learning
- SCIP uses dynamic programming approach
- Latest version of RoundingSat can handle most with PB constraint learning
+ LP solving
RoundingSat
Conclusion
- Combinatorial solvers build proofs
- To prove unsatisfiability, optimality, logical implication
-
CDCL-based solvers build resolution proofs
- Smallest PHP proof is exponential
- Cutting-planes is strictly stronger than resolution
- RoundingSat and other PB solvers build cutting-planes proofs
- But limited to "canceling addition"
- No advantage on CNF
- But limited to "canceling addition"
- But most combinatorial solvers rely on CDCL, and hence, resolution
Epilogue: potential use cases for RoundingSat in Eavise
- Solving timetabling problems
- Proving equivalence of formal contracts (EuroClear)
- Proving completeness of DMN tables (Televic)
- Backcalculation of game of life patterns
- ...
Anything where proofs need to be generated or search performance limits applicability.
Thanks for your attention!
[H85] The intractibility of resolution - Haken
[CCT87] On the complexity of cutting-plane proofs - Cook, Coullard, Turán
[MS96] GRASP - a new search algorithm for satisfiability - Marques-Silva, Sakallah
[BS97] Using CSP lookback techniques to solve real-world SAT instances - Bayardo, Schrag
[MMZZM01] Chaff: Engineering an efficient SAT solver - Moskewicz, Madigan, Zhao, Zhang, Malik
[P04] Where are the hard knapsack problems? - Pisinger
[CK05] A fast pseudo-Boolean constraint solver - Chai, Kuehlmann
[SS06] Pueblo: A hybrid pseudo-Boolean SAT solver - Sheini, Sakallah
[LP10] The Sat4j library, release 2.2 - Le Berre, Parrain
[EN18] Divide and conquer: Towards faster pseudo-boolean solving - Elffers, Nordström
[EGNV18] Using Combinatorial Benchmarks to Probe the Reasoning Power of pseudo-Boolean Solvers - Elffers, Giráldez-Cru, Nordström, Vinyals
[D20] Watched Propagation for 0-1 Integer Linear Constraints - Devriendt
[DGN20] Learn to Relax: Integrating 0-1 Integer Linear Programming with Pseudo-Boolean Conflict-Driven Search - Devriendt, Gleixner, Nordström
[EGMN20] Justifying All Differences Using Pseudo-Boolean Reasoning - Elffers, Gocht, McCreesh, Nordström
[SDNS20] Theoretical and Experimental Results for Planning with Learned Binarized NeuralNetwork Transition Models - Say, Devriendt, Nordström, Stuckey
[LBDEN20] Verifying Properties of Bit-vector Multiplication Using Cutting Planes Reasoning - Liew, Beame, Devriendt, Elffers, Nordström
[ZIB] SoPlex - soplex.zib.de
[PBCOMP] Latest PB competition - www.cril.univ-artois.fr/PB16/
References
Proofs in combinatorial search
By Jo Devriendt
Proofs in combinatorial search
- 402