380 likes | 596 Views
Resolution proof system. Presenter Valeriy Balabanov NTU, GIEE, AlCom lab. Outline. Basic definitions Key-facts about resolution proofs Intractability of resolution Heuristics for proof minimization Resolution in first-order logic Conclusion and future work References.
E N D
Resolution proof system Presenter ValeriyBalabanov NTU, GIEE, AlCom lab
Outline • Basic definitions • Key-facts about resolution proofs • Intractability of resolution • Heuristics for proof minimization • Resolution in first-order logic • Conclusion and future work • References
Resolution is a deductive rule in a form: • where a, b, c are some distinct logical facts • “a” is called pivot • (b or c) is called resolvent • A Resolution refutation proof for F is a sequence of clauses R = (C1, ..,Ct), where • Ct = ∅; • Ci ∈ F or Ci is derived from two previous clauses by the resolution rule
The length of the proof = # of clauses in the derivation • Resolution proof can also be seen as DAG, where the nodes represent clauses, and edges represent resolution steps; the single sink node is an empty clause • Tree-like resolution is a resolution, with special property – each parent node has exactly one child (in other words each clause in a proof is resolved only once) • Note: Tree-like resolution can be derived from DAG resolution by splitting multiply used nodes into separate nodes
Key-facts about resolution proofs • For 2SAT it is possible to find the shortest resolution proof in polynomial time (2SAT∈ P) • For HornSAT polynomial resolution proof exists (HornSAT ∈ P-complete), but finding the shortest proof is NP-hard • Generally, finding the shortest resolution proof is NP-hard (generally, as we will see the shortest proof can be exponential in number of clauses)
Intractability of resolution • Resolution is complete and sound • Proof: • Soundness: every clause, resolved from the formula is implied by that formula, thus, if resolved clause is empty – formula is UNSAT • Completeness: • elimination of variable “a” from CNF, is a procedure, when we make all possible resolutions using “a” as a pivot, and then eliminating all the clauses containing “a” from the original formula
Completeness(continued): • Let F be UNSAT CNF with m-variables a1,a2…am • Let Si be the set of clauses, which are left after elimination ofivariables from F; S0 is the original formula F; Sm has at most the empty clause. • Let’s prove by induction on i, that every truth assignment to variables in F will make some clause in Si to be false • For i=0 S0 is UNSAT, and thus has false clause for every assignment • Assume for Sk it is also true, and for some assignment V, the false clause is θ, then if θ doesn’t contain variable ak+1, then θ also will be present after elimination of ak+1;
Completeness(continued): • now, if θ has variable ak+1, let W be the truth assignment, same as V, but with different assignment to variable ak+1; let β be the clause which is false for W; if β doesn’t contain variable ak+1, then β will be in Sk+1; if it does – then the resolvent of β and θ will be present in Sk+1 and obviously will be false for V(also W); • thus for every truth assignment, Si must contain a clause which will be false under it • Thus, Sm should contain the empty clause, and by the construction of Sm it was derived by resolution
Pigeonhole principle: • Let A be a sequence of n=sr + 1 distinct numbers. Then either A has: • an increasing subsequence of s + 1 terms or • a decreasing subsequence of r + 1 terms (or both). • Consequence: • Suppose we have n=s+1 pigeons (r=1) • If we put them in at most s holes, then there definitely will be at least 2 pigeons in the same hole • In other words it is impossible to put every pigeon to it’s own hole
Proof: • Every number in sequenceaihas score (xi, yi). • xiis the longest increasing subsequence ending at ai • yiis the longest decreasing subsequence starting at ai • (xi, yi) ≠ (xj, yj) whenever i ≠ j. • Assume i < j, then: • if ai< aj → xi< xj • if ai> aj → yi> yj • Thus we have rs+1 points on a plane, and there is aiwith coordinate (xi, yi) outside the rs-square. • So, for that ai we will have xi ≥ s+1 or yi ≥ r+1
Formalizing PHP to CNF formula • xi,j - pigeonisits in hole j • (type 1): xi,1 ∨ xi,2 ∨ .. ∨ xi,n−1 for i = 1..n (every pigeon sits in at least one hole) • (type 2): (¬xi,k∨ ¬xj,k) for 1 ≤ i ≠ j ≤ n ; 1 ≤ k ≤ n − 1 (no two pigeons sit in the same hole) • From pigeonhole principle conjunction of above clauses is UNSAT • Example: • Note: deleting any clause will lead to SAT
Haken’s super-polynomial lower bound • Original proof shows the bound for n>200 • We present modified proof: Ω(2√n/32) • Definition: • A critical assignment is a one-to-one mapping of n − 1 pigeons to n − 1 holes, with one pigeon unset. Having i-th pigeonunset defines a i-critical assignment. • Presenting the assignments of the xi,jas a matrix, the critical assignments would look like this: Example of 9-critical assignment for PHP with n=9
Let R be the proof of unsatisfiability of PHPn • Replace xi,j’ in all clauses C by: • Definition: The resulting sequence of positive clauses R+ = (C1+ , ..,Ct+ ) is a positive pseudo-proof of PHPn • Lemma:C+(α) = C(α) for any critical α • Proof: Suppose ∃C+(α) ≠ C(α) ⇒∃xi,j’ ∈ C s.t. Ci,j(α) ≠ xi,j’(α) ⇔(x1,j ∨ .. ∨ xn,j)(α) ≠ xi,j’(α). This is impossible, since α is critical, therefore has exactly one 1 in the column j.
We will show now, that t ≥ 2n/32. For a contradiction, assume t < 2n/32, t is the number of clauses in R+. • Definition: A long clause has at least n2/8 variables. (more than 1/8 of all possible n(n − 1) variables). l is the number of long clauses in R. l ≤ t < 2n/32 • By the pigeonhole principle, there exists a variable xi,j, which occurs in at least l/8 of the long clauses. • Set the special variable xi,j to 1. • Set all xi,j’, xi’,j for j’≠j, i’≠i to 0. • Clauses containing xi,j are set to 1 and therefore disappear from the proof. • The variables set to 0 disappear from all clauses.
We are left with a pseudo-proof of PHPn−1 with at most l(1 − 1/8) long clauses. • Doing this d = 8log(l) times, we will eliminate all long clauses, since • We are left now with a pseudo-proof of PHPmwith no long clauses (of length more than n2/8). • Since m = n – d, and from assumption l < 2n/32,we can obtain
Lemma: Any positive pseudo-proof of PHPmmust have a clause with at least 2m2/9 variables. • Proof: let R’ be a positive pseudo-proof of PHPm • Definition: ∀C∈R’, W is a witness of C if W is a set of clauses from PHPm, whose conjunction implies C for critical assignments. (∀ critical α: α satisfies all ω∈W → α satisfies C). The weight of C = # clauses in minimal witness. • Note: for any C there exist witness W • Clauses of (type 2) are not the part of a minimal witness • Clauses of (type 1) have weight 1 • The weight of the final clause is m • The weight of a clause is at most the sum of the two clauses its been derived from • There exists a clause C∈R’ of weight s, m/3 ≤ s ≤ 2m/3.
Let • S is a set of indices of witness clauses for C • W = {Ci|i ∈ S}, |S| = s, • Ci = xi,1 ∨ xi,2.. ∨ xi,m−1; Ci∈ PHPm • ∧Ci → C • Also let • i ∈ S • α is i-critical assignment with C(α)=0 • j ∉ S; α’ is j-critical • α’ is obtained from α, by swapping rowi and rowj: If α maps pigeonj to holek, then α’ maps pigeoni to holek
Since j ∉ S α’ satisfies all Ci ∈ W, so C(α’)=1 • From the construction α differs from α’ only in xi,k, xj,k • This implies xi,k ∈ C • We can run this argument for current i-critical assignment under all (m − s) different choices for j ∉ S • Thus C contains the variables xi,k1, xi,k2, .., xi,km−s • And by repeating this for all i ∈ S, we conclude that C contains at least (m-s)s different variables • Since m/3 ≤ s ≤ 2m/3, we have (m-s)s ≥ 2m2/9, concluding the proof for lemma • We reached a contradiction to our assumption that t ≤ 2n/32
Thus we conclude, that pigeonhole family of clauses requires super-polynomial minimal proofs for large n • People have also found many exponentially hard examples for resolution using graph theory • Definition: extended resolution, is a regular resolution, but with additional property: any definition can be added to original formula, if it doesn’t change its satisfiability • Example: if x is not in original formula, we can add • Extended resolution can find polynomial proofs for pigeonhole formulas • Extended resolution is one of the strongest known proof systems
Heuristics for proof minimization • Resolution proofs are useful for • Extracting unsatisfiable cores • Extracting interpolants • Detecting useful clauses for incremental SAT-solving • Run-till-fix and Trim-till-fix • Use SAT-solver repeatedly to minimize UNSAT-core • Use incremental SAT-solver to analyze the structure of the proof and restructure it • Running time is usually large, since we need to rerun SAT-solver again and again
Recycling learned unit clauses • If (x) is a unit clause that was learned by the SAT solver, it can be used for simplifying resolution inferences that used x as the pivot prior to learning this clause • May lead to circular reasoning, so must be applied carefully • Let • P – is a resolution proof of the empty clause • For a given node n in P: • n.C - is the clause represented by n • n.L and n.R are parents of n • n.piv – is the variable used to resolve n.C from n.L.C and n.R.C
Example: • It is easy to see, that recycling units will only make proof stronger • The size of the proof also will be reduced • The time complexity is quadratic in size of the proof, and no SAT-solving is used
Recycling Pivots • Observation:along each path from root to sink in a proof graph there is no need for resolving on the same variable more than once • Proof: • Key point here is: why do we want to use resolution? • We use current resolution step to eliminate variable “x” • If in few steps variable “x” will reappear again – then what was the purpose of first resolution? • The proof with above mentioned property is called Regular • The shortest proof for a given problem must be regular • The Reconstruct-Proof algorithm will be the same as that for Recycling Units • Runtime of Recycling Pivots is linear in proof size
Experimental results • Run-till-fix finds the smallest UNSAT core (# of roots), but it increases the proof-size • Recycle Units and Pivots significantly simplify the proof, but cannot make UNSAT core small enough
Resolution in first-order logic • Propositional logic vs. First-order logic • Example • Universal reduction • Example but • Q-resolution • combines resolution and universal reduction
Example: Red lines: universal reduction Green lines: exist. resolution
Q-resolution is both complete and sound • Soundness: • if the empty clause was generated, as in SAT, QBF obviously evaluates to 0 • Completeness: • Induction on number of quantifiers: • For single ∃-variable it is just a usual resolution • For single ∀-variable, falsity of formula->there is at least one non-tautological clause, which can be universally reduced • Induction step for ∀-variable (a) will choose the value of a, which leads to UNSAT, and use the same resolution steps; • For ∃-variable (a) both assignments to a lead to a conflict; we use Q-res steps for those assignments; if in one of them a (a’) was not present – we are done; if both present – we resolve resulting clauses on a, and thus get the conflict clause
As QBF is a general case of SAT, Q-resolution is also intractable • More definitions: • ∃-unit clause is clause with only one ∃-variable • Q-unit resolution is a Q-resolution where one of the clauses is a positive ∃-unit clause • Horn clause is a clause with only one positive literal • Extended quantified Horn formula has every clause’s existential part to be a Horn clause
Theorem: Q-unit resolution is complete and sound for extended quantified Horn formulas • Proof: look into [7] • Theorem: For every t>0 there exists a quantified extended Horn formula of length 18t+1 which is FALSE, and the refutation to the empty clause requires at leas 2tQ-resolution steps • Proof: look into [7] • Q-resolution can’t simulate usual resolution • Example can’t conclude x
Conclusion and future work • Resolution is simplest, but yet efficient proof system • Resolution is intractable • Existence of exponential lower bounds • Resolution proofs are used in model checking • Shorter proofs can be produced using some heuristics • Q-resolution is an extension of resolution in first-order logic
Other proof systems • Exchange of the nodes in the resolution graph • Different heuristics for proof-length reduction • Interpolants in first-order logic • Q-resolution vs. QBF’s certificates
References • “The relative efficiency for propositional proofs”, Stephen A. Cook and Robert A. Reckhov • “Hard examples for Resolution”, Alasdair Urquhart • “On the complexity of derivation in propositional calculus”, G.S. Tseitin • “Optimal length tree-like resolution refutations for 2SAT formulas”, K. Subramani • “The intractability of resolution”, Armin Haken • “Reducing the size of resolution proofs in linear time”, O.B.Ilan, O. Fuhrmann, S. Hoory, O. Shacham, O.Strichman • “Resolution for Quantified Boolean Formulas”, H.Buning, M. Karpinski, A. Flogel