Presentation is loading. Please wait.

Presentation is loading. Please wait.

Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh.

Similar presentations


Presentation on theme: "Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh."— Presentation transcript:

1 Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh

2 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

3 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

4 Motivation When can we beat brute-force search for NP- hard problems? In practice, we do need to solve SAT and QBF SAT instances in various contexts (planning, verification etc.) – What can we say formally about algorithms solving for these problems?

5 Satisfiability Variants k-SAT: Satisfiability of k-CNFs CNF SAT: Satisfiability of formulae in conjunctive normal form Formula SAT: Satisfiability of arbitrary Boolean formulae Circuit SAT: Satisfiability of arbitrary Boolean circuits – Constant-depth Circuit SAT: Satisfiability of constant-depth circuits Versions of above where variables can be existentially or universally quantified (PSPACE-complete)

6 Satisfiability Variants k-SAT CNF SAT Formula SAT Constant-depth Circuit SAT Circuit SAT

7 Algorithms for Satisfiability m: input size; n: number of variables Brute-force algorithm runs in time 2 n poly(m) We are interested in algorithms running in time 2 n-f(n) poly(m), for f(n) asymptotically as large as possible – We call f the savings of the algorithm

8 Main Algorithmic Paradigms DLL: Search for a solution by iteratively setting variables, and backtracking if a full assignment does not yield a solution Random Walk: Start with an arbitrary assignment, and iteratively modify it to satisfy random unsatisfied clauses

9 Algorithms for Satisfiability: State of the Art 3-SAT: ~ 1.3 n [R06] k-SAT: Savings Ω(n/k) [PPSZ98, S99] CNF SAT: Savings Ω(n/log(m/n)) [S05] Constant-depth Circuit SAT: Savings Ω(n) for m = O(n) [CIP09] Formula SAT: ? Circuit SAT: ? QBF SAT: ?

10 Our New Upper Bounds Theorem 1: Formula SAT can be solved in time 2 n-Ω(n) on formulae of linear size Theorem 2: QBF SAT can be solved in time 2 n-Ω(n/log(n)) on bounded-read formulae (i.e., each variable occurring bounded number of times) Theorem 3: QBF SAT can be solved in time 2 n-Ω(n) on “structured” bounded-read formulae

11 Barriers to Improved SAT Algorithms Exponential-Time Hypothesis (ETH) formulated by [IP99,IPZ01]: 3-SAT cannot be solved in time 2 o(n) – Under ETH, we cannot achieve savings n-o(n) on k-SAT or Formula SAT/Circuit SAT on linear size [W09] shows that savings of ω(log(n)) for Circuit SAT for superpoly m would imply NEXP not in SIZE(poly) (and analogously for Formula SAT)

12 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

13 The Upper Bound for Formula SAT Theorem 1 (restated): There is a constant k > 2 for which there is a deterministic algorithm solving Formula SAT with savings n/c k on formulae of size cn Note: if we could achieve k = 0.1, then by [W09] we would have new formula size lower bounds for E NP

14 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

15 The Algorithm Search(φ) – Simplify φ according to simplification rules – If φ ↔ 1, return “yes” and halt – If φ ↔ 0, return “no” – Let x be the variable with max no of occurrences – Search (φ| x=0 ) – Search (φ| x=1 ) – Return “no”

16 Simplification Rules 1 Λ φ → φ 1 V φ → 1 0 Λ φ → 0 0 V φ → φ x V φ → x V φ| x=0 x Λ φ → x Λ φ| x=1 1-simplification rules 0-simplification rules Variable simplification rules

17 An Example (x V y) Λ (x V (x Λ y’ Λ z))

18 An Example (x V y) Λ (x V (0 Λ y’ Λ z)) (applying variable simpl. rule)

19 An Example (x V y) Λ (x V 0) (applying 0-simpl. rule)

20 An Example (x V y) Λ x (applying 0-simpl. rule)

21 An Example (x V y) Λ x (0 V y) Λ 0 1 st recursive call

22 An Example (x V y) Λ x y Λ 0

23 An Example (x V y) Λ x 0

24 An Example (x V y) Λ x 0(1 V y) Λ 1 2 nd recursive call

25 An Example (x V y) Λ x 0 1 Λ 1

26 An Example (x V y) Λ x 0 1 Success!

27 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

28 Analyzing Recursion Tree Size Typically done by solving a recurrence on m and n Instead, we derive inspiration from the method of random restrictions (though our algorithm itself is deterministic) A random restriction is a probability distribution on partial assignments to variables

29 Pure Random Restrictions Let 0 < p < 1 be a parameter. Given n input variables, choose each one independently to be 1 w.p. (1-p)/2, 0 w.p. (1-p)/2 and free w.p p Note that the choice of which variables to set is uniform, as well as the choice of which value to set a given variable to

30 Formula Size Lower Bounds via Pure Random Restrictions [S61] proved that when a formula of size m is hit by a random restriction with parameter p, expected size of simplified formula is O(p 1.5 m) – Implies Parity requires formulae of size Ω(n 1.5 ), by choosing p = O(1/n) [H98] proved optimal result: expected size of simplified formula is O(p 2 m) – Implies best known formula size lower bound of n 3-o(1) for a function in P

31 Formula Size Lower Bounds via Pure Random Restrictions [S61] proved that when a formula of size m is hit by a random restriction with parameter p, expected size of simplified formula is O(p 1.5 m) [H98] proved optimal result: expected size of simplified formula is O(p 2 m) Note that for either result, if m = O(n), there is constant p such that expected size of simplified formula << pn

32 Adaptively Random Restrictions Choice of which variable to set next is not uniform – Indeed, in our algorithm, setting of variables is deterministic, according to number of occurrences Choice of value, however, is uniformly random Greedy a.r.r: Variables are set sequentially in decreasing order of no. of occurrences [S61] and [H98] results hold also for (1-p)n - step greedy a.r.r

33 Random Restrictions and Recursion Tree Size: Basic Idea The simplified formulae at depth d of the recursion tree correspond to d-step greedy a.r.r Lemma: After (1-p)n steps of greedy a.r.r, size of simplified formula << pn with prob. 1-2 -Ω(n) (strong concentration version of Subbotovskaya’s result) This implies non-trivial bound on size of recursion tree

34 Why a Concentration Bound Helps. (1-p)n

35 Why a Concentration Bound Helps. (1-p)n Say we could show that fraction of bad nodes at depth (1-p)n is at most q. Then size of decision tree is at most 2 n-pn/2 + q2 n, which is 2 n-Ω(n) if q=2 -Ω(n)

36 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

37 Beating Brute Force Search for Exact Count Count(φ;n) – Simplify φ according to simplification rules – If φ ↔ 1, return 2 n – If φ ↔ 0, return 0 – Let x be the variable with max no of occurrences – Return Count(φ| x=0 ;n-1) + Count(φ| x=1 ;n-1) Analysis same as before, giving same runtime

38 Detour: Decision Trees x1x1 x2x2 x3x3 0 0 01 Φ = x 1 Λ x 2 Λ x 3

39 Average Case Lower Bounds for Formula Size Recursion tree of Search algorithm yields decision tree for function computed by input formula Proof of Theorem 1 shows that formulae of linear size have decision trees of size 2 n-Ω(n)

40 Average Case Lower Bounds for Formula Size Proof of Theorem 1 shows that formulae of linear size have decision trees of size 2 n-Ω(n) Let advantage of a decision tree T on a function f be Pr(T=f) – Pr(T≠f) Lemma: Any decision tree of size s has advantage at most s/2 n on Parity Corollary : Any formula of linear size has advantage 2 -Ω(n) on Parity

41 Analysis First, Algorithm Afterwards Could other random restriction results be used to get new upper bounds? Hastad has a famous result showing that constant-depth circuits simplify under (pure) random restrictions From this, we “extract” a randomized algorithm solving Constant-depth Circuit SAT with savings Ω(n 1/(d+1) ), where d is depth

42 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

43 A New Upper Bound for QBF SAT Theorem 2 (re-stated): There is an algorithm running in time 2 n-Ω(n/log(n)) solving QBF SAT on bounded-read formulae

44 Proof Idea for Theorem 2 We would like to use random restriction method again, but we have no control over order in which variables are to be set Let k be an upper bound on number of occurrences for any variable By fixing all but t variables, our new formula will have size at most kt – But how does this help?

45 Proof Idea for Theorem 2 Idea: Memoization When t<n/(5k log(n)), simplified formula has size at most n/(5 log(n)), and hence can be represented by < n/4 bits We can pre-compute answers to all such small QBF SAT questions in time 2 n/2 and store them in random-access memory Now, given an instance φ, we need only do exhaustive search over first n-t variables, replacing the rest of the search by a memory access

46 Structured Instances Theorem 2 only gives Ω(n/log(n)) savings for bounded-read formulae Can we get Ω(n) savings? A set S of instances is structured if every instance of length n in S has a description of size o(n) from which it can be recovered efficiently Eg., set of all sparse graphs is structured

47 Linear Savings for Structured Instances Theorem 3 (re-stated): There is an algorithm for QBF SAT which has savings Ω(n) on any set of structured bounded-read formulae Proof Idea: Formula obtained by fixing the first εn quantified variables of a QBF is also “somewhat structured” In the memoization phase, we don’t need to store answers to all small formulae, but only for reasonably structured ones

48 Plan of the Talk Introduction A New Upper Bound for Formula SAT – The Algorithm – The Analysis – Other Applications of Technique New Upper Bounds for QBF SAT Future Directions

49 Using the method of random restrictions in other settings or to get better parameters More connections between upper bounds and lower bounds Better upper bounds for QBF SAT

50 Thank You!


Download ppt "Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh."

Similar presentations


Ads by Google