30
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho Kim Provable Software Lab, KAIST

Presented by Yunho Kim Provable Software Lab, KAIST

  • Upload
    nan

  • View
    21

  • Download
    0

Embed Size (px)

DESCRIPTION

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz. Presented by Yunho Kim Provable Software Lab, KAIST. Introduction Search procedures and problem domains Cost distributions of backtrack search - PowerPoint PPT Presentation

Citation preview

Page 1: Presented by  Yunho  Kim Provable Software Lab, KAIST

Heavy-Tailed Phenomena in Satisfiabil-ity and Constraint Satisfaction Prob-

lemsby Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz

Presented by Yunho KimProvable Software Lab, KAIST

Page 2: Presented by  Yunho  Kim Provable Software Lab, KAIST

Contents

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 2/28

• Introduction

• Search procedures and problem do-mains

• Cost distributions of backtrack search

• Consequences for Algorithm Design

• Conclusion

Page 3: Presented by  Yunho  Kim Provable Software Lab, KAIST

Introduction(1/4)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 3/28

• The DPLL algorithm is a complete algorithm for deciding the satisfiability of propositional logic formulas– It is guaranteed that eventually either the DPLL algo-

rithm finds a satisfying model or proves the formula is unsatisfiable

The iterative version of DPLL algorithm 1 status = preprocess(); 2 if (status!=UNKNOWN) return status; 3 while(1){ 4 decide_next_branch(); 5 while(1){ 6 status = deduce(); 7 if (status == CONFLICT){ 8 blevel = analyze_conflict(); 9 if (blevel == 0) 10 return UNSAT; 11 else backtrack(blevel); 12 } 13 else if (status == SAT) 14 return SAT; 15 else break; 16 } 17 }

Page 4: Presented by  Yunho  Kim Provable Software Lab, KAIST

Introduction(2/4)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 4/28

• At each step a heuristic is used to select the next branch variable– A branch heuristic scores each variable in some manner

and select the highest one

• Randomization can be used for tie-breaking– If several choices are ranked equally, choose among

them at random– All variables that receive scores within H-percent of the

highest score are considered equally good• H is a heuristic equivalence parameter

• Empirically it is known that randomized branching heuristics is effective on hard instances

Page 5: Presented by  Yunho  Kim Provable Software Lab, KAIST

Introduction(3/4)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 5/28

• Problem instance: quasigroup completion problem (N = 11, 30% pre-assignments)

The sample mean of the number of backtracks does diverge

Sam

ple

mea

n (n

umbe

r of b

ack-

track

s)

Number of runs

Page 6: Presented by  Yunho  Kim Provable Software Lab, KAIST

Introduction(4/4)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 6/28

• The authors have observed the erratic behavior of the mean and the variance of the search cost dis-tributions on a same instance

• The mean cost calculated over an increasing number of runs, on the same satisfiable problem instance, of a randomized backtrack search pro-cedure does diverge.

• The authors have not found unsatisfiable in-stances with heavy-tailed behavior

Page 7: Presented by  Yunho  Kim Provable Software Lab, KAIST

Contents

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 7/28

• Introduction

• Search procedures and problem do-mains

• Cost distributions of backtrack search

• Consequences for Algorithm Design

• Conclusion

Page 8: Presented by  Yunho  Kim Provable Software Lab, KAIST

Search Procedures

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 8/28

• The authors modified two state-of-the-art SAT solvers(at that time), Satz and Relsat

• Both solvers hire similar occurrences-based deci-sion heuristics

• Satz employs chronological backtracking while Relsat uses non-chronological backtracking

Page 9: Presented by  Yunho  Kim Provable Software Lab, KAIST

Quasigroup Completion Problem(1/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 9/28

• A quasigroup is an ordered pair(Q, ¢), where Q is a set and (¢) is a binary operation on Q such that the equations a ¢ x = b and y ¢ a = b are uniquely solvable for every pair of el-ements a, b in Q

• The order N of the quasigroup is the cardinality of the set Q

• The multiplication table of a finite quasigroup is a Latin square– An N £ N table filled with n different symbols in such a way that each

symbol occurs exactly once in each row and exactly once in each col-umn

Order 4 quasigroup Order 10 quasi-group

Page 10: Presented by  Yunho  Kim Provable Software Lab, KAIST

Quasigroup Completion Problem(2/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 10/28

• The quasigroup completion problem – determining whether the remaining entries of the partial

Latin square can be filled in such a way that we obtain a complete Latin square

• The quasigroup completion problem is NP-com-plete

32% pre-as-signed

Page 11: Presented by  Yunho  Kim Provable Software Lab, KAIST

Other Problems

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 11/28

• Timetabling, planning and instances in the Di-macs Challenge benchmark are also considered

• Timetabling problem is to determine whether there exists a feasible schedule that consider a set of pairing and distribution constraints

• Planning is to find a sequence of actions that transform an initial state to a goal state

Page 12: Presented by  Yunho  Kim Provable Software Lab, KAIST

Contents

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 12/28

• Introduction

• Search procedures and problem do-mains

• Cost distributions of backtrack search

• Consequences for Algorithm Design

• Conclusion

Page 13: Presented by  Yunho  Kim Provable Software Lab, KAIST

Cumulative Distribution(1/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 13/28

• Data was produced by running the randomized backtrack search procedure 10,000 times on the same instance

• Even though 50% of the runs solve the instance in 1 backtrack or less, after 100,000 backtracks 0.5% of the runs were still not completed

Number of backtracks

Cumulative fraction of suc-cessful runs

Completion of quasi-group

Page 14: Presented by  Yunho  Kim Provable Software Lab, KAIST

Cumulative Distribution(2/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 14/28

• A solution is found in 1,000 backtracks or less in 80% of runs

• However, 5% of the runs do not result in a solu-tion even after 1,000,000 backtracks

Number of backtracks

Cumulative fraction of suc-cessful runs

Timetabling

Page 15: Presented by  Yunho  Kim Provable Software Lab, KAIST

Heavy-Tailed Distributions(1/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 15/28

StandardExponential decay e.g. Normal:

P{X>x} ~ Ce-x2 for some C > 0

Heavy-Tailed Power law decay e.g. Pareto-Levy:

P{X>x} ~ Cx-®

where for some 0 < ® < 2 and C > 0

Power Law Decay

Standard Distribution(finite mean & variance)

Exponential Decay

Page 16: Presented by  Yunho  Kim Provable Software Lab, KAIST

Heavy-Tailed Distributions(2/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 16/28

• We consider distributions that asymptotically have “heavy tails”, namely,

where for some 0 < ® < 2 and C > 0

• The ® is referred to as the index of stability of the distribu-tion– The lower the index, the heavier the tail

• Heavy-tailed distributions have finite/infinite mean and infi-nite variance

P{X>x} ~ Cx-®

0 < ® · 1 1 < ®Mean Infinite FiniteVari-ance

Infinite Infi-nite

Page 17: Presented by  Yunho  Kim Provable Software Lab, KAIST

Heavy-Tailed Distributions(3/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 17/28

• Comparison of tail probabilities P{X > c} – Cauchy distribution is the heavy-tailed distribution which has

® = 1.0– Levy distribution is the heavy-tailed-distribution which has ® =

0.5

Page 18: Presented by  Yunho  Kim Provable Software Lab, KAIST

Visual Check(1/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 18/28

• Log-log plot of the cost distribution of the satisfi-able completion of quasigroups instances

• 1-F(x) = P{X > x} ~ Cx-®

N = 15, 40% pre-assignments

Completion of quasigroups

Log(1-F(x))

N = 15, 30% pre-assignments

N = 11, 30% pre-assignments

Log number of backtracks

Log(1-F(x)) ~ -®Log(x) + C’

Page 19: Presented by  Yunho  Kim Provable Software Lab, KAIST

Visual Check(2/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 19/28

• Log-log plot of the cost distribution of the satisfi-able timetabling instance

• 1-F(x) = P{X > x} ~ Cx-®

Completion of timetablingLog(1-F(x))

Log number of backtracks

Page 20: Presented by  Yunho  Kim Provable Software Lab, KAIST

Visual Check(3/3)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 20/28

• Log-log plot of the cost distribution of the satisfi-able logistics planning from two different SAT solvers

• 1-F(x) = P{X > x} ~ Cx-®

Logistics planning Log(1-F(x))

Log number of back-tracks

SatzRelsat

Page 21: Presented by  Yunho  Kim Provable Software Lab, KAIST

Estimation of ®

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 21/28

• Calculated maximum likelihood estimates of ® using Hill estimator– k is sample size

• Since ® · 1, mean and variance are infinite

Page 22: Presented by  Yunho  Kim Provable Software Lab, KAIST

Unsatisfiable Instance

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 22/28

• Log-log plot of the cost distribution of unsatisfi-able completion of quasigroups instnces

• 1-F(x) = P{X > x} ~ Cx-®

Completion of quasigroups

Log(1-F(x))

Log number of back-tracks

Page 23: Presented by  Yunho  Kim Provable Software Lab, KAIST

Contents

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 23/28

• Introduction

• Search procedures and problem do-mains

• Cost distributions of backtrack search

• Consequences for Algorithm Design

• Conclusion

Page 24: Presented by  Yunho  Kim Provable Software Lab, KAIST

Restarts

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 24/28

• Restart after a fixed number of backtracks pre-vent a solver from entering pitfall

Total number of backtracks

Effect of restarts on a quasigroup in-stanceN = 20, 5% pre-assignments

Log(1-F(x))

No restarts

With restarts

Without restarts and given a total of 300 backtracks, 70% of runs failed

With restarts, only 0.01% of runs failed

Page 25: Presented by  Yunho  Kim Provable Software Lab, KAIST

Restarts

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 25/28

• Randomized rapid restarts(RRR) show better per-formance than deterministic

Page 26: Presented by  Yunho  Kim Provable Software Lab, KAIST

Contents

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 26/28

• Introduction

• Search procedures and problem do-mains

• Cost distributions of backtrack search

• Consequences for Algorithm Design

• Conclusion

Page 27: Presented by  Yunho  Kim Provable Software Lab, KAIST

Conclusion

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 27/28

• The authors show the suitability of heavy-tailed distributions in modeling the runtime behavior of DPLL SAT solver with the random decision heuris-tic

• Restarts can exploit the mass of probability on the left of the cost distributions

Page 28: Presented by  Yunho  Kim Provable Software Lab, KAIST

Reference

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 28/28

• Heavy-Tailed Phenomena in Satisfiability and Constraint Sat-isfaction Problemsby Carla P. Gomes, Bart Selman, Nuno Crato and Henry Kautzin Journal of Automated Reasoning 24: 67-100, 2000

Page 29: Presented by  Yunho  Kim Provable Software Lab, KAIST

Lévy Distribution(1/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 29/28

• Probability density function of Lévy distri-bution– Lévy have infinite mean and variance

Page 30: Presented by  Yunho  Kim Provable Software Lab, KAIST

Lévy Distribution(2/2)

Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems Yunho Kim, Provable Software Lab, KAIST 30/28

• Cumulative distribution function of Lévy distribu-tion