ABHELSINKI UNIVERSITY OF TECHNOLOGY

Similar documents
CS-E3200 Discrete Models and Search

Lecture: Iterative Search Methods

Foundations of AI. 8. Satisfiability and Model Construction. Davis-Putnam, Phase Transitions, GSAT and GWSAT. Wolfram Burgard & Bernhard Nebel

Satisfiability. Michail G. Lagoudakis. Department of Computer Science Duke University Durham, NC SATISFIABILITY

algorithms, i.e., they attempt to construct a solution piece by piece and are not able to offer a complete solution until the end. The FM algorithm, l

Stochastic greedy local search Chapter 7

Simple mechanisms for escaping from local optima:

Note: In physical process (e.g., annealing of metals), perfect ground states are achieved by very slow lowering of temperature.

CS227: Assignment 1 Report

Massively Parallel Seesaw Search for MAX-SAT

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

SAT-Solving: Performance Analysis of Survey Propagation and DPLL

Set 5: Constraint Satisfaction Problems Chapter 6 R&N

Speeding Up the ESG Algorithm

Kalev Kask and Rina Dechter. Department of Information and Computer Science. University of California, Irvine, CA

Boolean Functions (Formulas) and Propositional Logic

GSAT and Local Consistency

Choosing Probability Distributions for Stochastic Local Search and the Role of Make versus Break

Example: Map coloring

Evidence for Invariants in Local Search

Set 5: Constraint Satisfaction Problems

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur

The MAX-SAX Problems

An Introduction to SAT Solvers

Local 3-approximation algorithms for weighted dominating set and vertex cover in quasi unit-disk graphs

Solving the Satisfiability Problem Using Finite Learning Automata

Discrete Optimization. Lecture Notes 2

Using Learning Automata to Enhance Local-Search Based SAT Solvers

Heuristic Optimisation

2SAT Andreas Klappenecker

P and NP (Millenium problem)

Set 5: Constraint Satisfaction Problems

Set 5: Constraint Satisfaction Problems

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

Exploring the Landscape of the Space of Heuristics for Local Search in SAT

Kalev Kask and Rina Dechter

The Scaling of Search Cost. Ian P. Gent and Ewan MacIntyre and Patrick Prosser and Toby Walsh.

An Adaptive Noise Mechanism for WalkSAT

Performance Prediction and Automated Tuning of Randomized and Parametric Algorithms

EECS 219C: Formal Methods Boolean Satisfiability Solving. Sanjit A. Seshia EECS, UC Berkeley

CMPUT 366 Intelligent Systems

6.034 Notes: Section 3.1

Steiner trees in the stochastic mean-field model of distance

CMU-Q Lecture 8: Optimization I: Optimization for CSP Local Search. Teacher: Gianni A. Di Caro

Handbook of Constraint Programming 245 Edited by F. Rossi, P. van Beek and T. Walsh c 2006 Elsevier All rights reserved

Chapter 27. Other Approaches to Reasoning and Representation

Solving Problems with Hard and Soft Constraints Using a Stochastic Algorithm for MAX-SAT

Survey Propagation Revisited, or where is all the satisfaction coming from. Lukas Kroc, Ashish Sabharwal, Bart Selman

CS:4420 Artificial Intelligence

Stochastic Local Search Methods for Dynamic SAT an Initial Investigation

1. To condense data in a single value. 2. To facilitate comparisons between data.

Approximation Algorithms

The Resolution Algorithm

3.6.2 Generating admissible heuristics from relaxed problems

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

space. We will apply the idea of enforcing local consistency to GSAT with the hope that its performance can

Randomness and Computation March 25, Lecture 5

Configuration landscape analysis and backbone guided local search. Part I: Satisfiability and maximum satisfiability

Interior Penalty Functions. Barrier Functions A Problem and a Solution

Two approaches. Local Search TSP. Examples of algorithms using local search. Local search heuristics - To do list

On the Run-time Behaviour of Stochastic Local Search Algorithms for SAT

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Constraint Satisfaction Problems

A Simple ¾-Approximation Algorithm for MAX SAT

COMPARISON OF SIMPLIFIED GRADIENT DESCENT ALGORITHMS FOR DECODING LDPC CODES

First-improvement vs. Best-improvement Local Optima Networks of NK Landscapes

Constraint Satisfaction Problems

Andrew Davenport and Edward Tsang. fdaveat,edwardgessex.ac.uk. mostly soluble problems and regions of overconstrained, mostly insoluble problems as

Discrete Lagrangian-Based Search for Solving MAX-SAT Problems. Benjamin W. Wah and Yi Shang West Main Street. Urbana, IL 61801, USA

(Stochastic) Local Search Algorithms

Captain Jack: New Variable Selection Heuristics in Local Search for SAT

Random Subset Optimization

Stochastic Local Search for SMT

SLS Methods: An Overview

N-Queens problem. Administrative. Local Search

Outline of the module

REACTIVE SEARCH FOR MAX-SAT: DIVERSIFICATION- BIAS PROPERTIES WITH PROHIBITIONS AND PENALTIES

An upper bound for the chromatic number of line graphs

A Course on Meta-Heuristic Search Methods for Combinatorial Optimization Problems

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

An IPS for TQBF Intro to Approximability

An Analysis and Comparison of Satisfiability Solving Techniques

Comparison of Interior Point Filter Line Search Strategies for Constrained Optimization by Performance Profiles

Random Walk With Continuously Smoothed Variable Weights

Ant Colony Optimization

CMPUT 366 Assignment 1

Dynamic Variable Filtering for Hard Random 3-SAT Problems

Artificial Intelligence

Extending the Reach of SAT with Many-Valued Logics

A B. A: sigmoid B: EBA (x0=0.03) C: EBA (x0=0.05) U

Travelling salesman problem using reduced algorithmic Branch and bound approach P. Ranjana Hindustan Institute of Technology and Science

Improving the Hopfield Network through Beam Search

Lecture 20: Satisfiability Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Cycles in Random Graphs

P vs. NP. Simpsons: Treehouse of Horror VI

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable

EE795: Computer Vision and Intelligent Systems

Pre-requisite Material for Course Heuristics and Approximation Algorithms

Random backtracking in backtrack search algorithms for satisfiability

A Multilevel Greedy Algorithm for the Satisfiability Problem

Transcription:

Local Search Algorithms for Random Satisfiability Pekka Orponen (joint work with Sakari Seitz and Mikko Alava) Helsinki University of Technology Local Search Algorithms for Random Satisfiability 1/30

Outline Background WalkSAT and related algorithms Results and conjectures on WalkSAT Experiments on WalkSAT Record-to-Record Travel and variants Experiments on RRT Focused Metropolis Search Experiments on FMS Dynamics of FMS Analysis? Local Search Algorithms for Random Satisfiability 2/30

Background Denote N = number of variables, M = number of clauses, α = M/N. Satisfiability transition at α c 4.267 (Mitchell et al. 1992,..., Braunstein et al. 2002). Good experiences with local search methods in the satisfiable region α < α c : e.g. GSAT (Selman et al. 1992), WalkSAT (Selman et al. 1996). Experiments 1996: N 2000 at α α c. Local Search Algorithms for Random Satisfiability 3/30

GSAT Selman et al. 1992... 1996. Denote by E = E F (s) the number of unsatisfied clauses in formula F under truth assignment s. GSAT(F): s = initial truth assignment; while flips < max_flips do if s satisfies F then output s & halt, else: - find a variable x whose flipping causes largest decrease in E (if no decrease is possible, then smallest increase); - flip x. Local Search Algorithms for Random Satisfiability 4/30

NoisyGSAT GSAT augmented by a fraction p of random walk moves. NoisyGSAT(F,p): s = initial truth assignment; while flips < max_flips do if s satisfies F then output s & halt, else: - with probability p, pick a variable x uniformly at random and flip it; - with probability (1-p), do basic GSAT move: - find a variable x whose flipping causes largest decrease in E (if no decrease is possible, then smallest increase); - flip x. Local Search Algorithms for Random Satisfiability 5/30

WalkSAT NoisyGSAT focused on the unsatisfied clauses. WalkSAT(F,p): s = initial truth assignment; while flips < max_flips do if s satisfies F then output s & halt, else: - pick a random unsatisfied clause C in F; - if some variables in C can be flipped without breaking any presently satisfied clauses, then pick one such variable x at random; else: - with probability p, pick a variable x in C at random; - with probability (1-p), pick an x in C that breaks a minimal number of presently satisfied clauses; - flip x. Local Search Algorithms for Random Satisfiability 6/30

WalkSAT vs. NoisyGSAT The focusing seems to be important: in the (unsystematic) experiments in Selman et al. (1996), WalkSAT outperforms NoisyGSAT by several orders of magnitude. Local Search Algorithms for Random Satisfiability 7/30

Recent results and conjectures Barthel et al. (2003): numerical experiments with WalkSAT (mainly with p = 1, some also with p < 1) at N = 50,000, α = 2.0... 4.0. Observed transition in the dynamics at α dyn 2.7 2.8. When α < α dyn, satisfying assignments are found in linear time per variable (i.e. in a total of cn flips ), when α > α dyn exponential time is required. Similar results obtained by Semerjian & Monasson (2003), though with smaller experiments (N = 500). Explanation: for α > α dyn the search equilibrates at a nonzero energy level, and can only escape to a ground state through a large enough random fluctuation. Conjecture: no local search algorithm works in linear time beyond the clustering transition at α s 3.92 3.93 (Mézard, Monasson, Weigt et al.) Local Search Algorithms for Random Satisfiability 8/30

WalkSAT experiments (3-SAT) WalkSAT (N = 10^5) WalkSAT (N = 10^5) 100000 100000 10000 10000 1000 1000 flips/n 100 flips/n 100 10 p = 0.45 p = 0.55 p = 0.57 p = 0.65 1 3.8 3.9 4 4.1 4.2 4.3 10 p = 0.45 p = 0.55 p = 0.57 p = 0.65 1 3.8 3.9 4 4.1 4.2 4.3 alpha alpha Normalised solution times for WalkSAT, α = 3.8...4.3. Left: complete data; right: medians and quartiles. Local Search Algorithms for Random Satisfiability 9/30

WalkSAT linear scaling WalkSAT (p = 0.55, alpha = 4.15) WalkSAT (p = 0.55, alpha = 4.20) 100 100 80 80 cum.freq. 60 40 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 20 0 N = 10^4 N = 3*10^4 1 10 100 1000 10000 flips/n flips/n Cumulative solution time distributions for WalkSAT with p = 0.55. Local Search Algorithms for Random Satisfiability 10/30

WalkSAT optimal noise level? 100000 WalkSAT (N = 10^5) 10000 flips/n 1000 100 alpha = 4.10 alpha = 4.12 alpha = 4.14 10 alpha = 4.16 alpha = 4.18 alpha = 4.20 alpha = 4.22 1 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 p Normalised solution times for WalkSAT with p = 0.50... 0.60, α = 4.10... 4.22. Local Search Algorithms for Random Satisfiability 11/30

WalkSAT sensitivity to noise WalkSAT (p = 0.55, alpha = 4.20) WalkSAT (p = 0.57, alpha = 4.20) 100 100 80 80 cum.freq. 60 40 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 1 10 100 1000 10000 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 flips/n flips/n Cumulative solution time distributions for WalkSAT at α = 4.20 with p = 0.55 and p = 0.57. Local Search Algorithms for Random Satisfiability 12/30

Record-to-Record Travel (RRT) Very simple stochastic local optimisation algorithm introduced by Dueck (1993). Dueck claimed good results on solving 442-city and 532-city TSP s; after that little used. RRT(E,d): s = initial feasible solution; s* = s; E* = E(s); while moves < max_moves do if s is a global min. of E then output s & halt, else: pick a random neighbour s of s; if E(s ) <= E* + d then let s = s ; if E(s ) < E* then: s* = s ; E* = E(s ). Local Search Algorithms for Random Satisfiability 13/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

RRT in action (d = 2) Local Search Algorithms for Random Satisfiability 14/30

Focused RRT In applying RRT to SAT, E(s) = number of clauses unsatisfied by truth assignment s. Single-variable flip neighbourhoods. Focusing: flipped variables chosen from unsatisfied clauses. (Precisely: one unsatisfied clause is chosen at random, and from there a variable at random.) FRRT = focused RRT. Local Search Algorithms for Random Satisfiability 15/30

FRRT experiments (3-SAT) Focused Record-to-Record Travel (N = 10^5) Focused Record-to-Record Travel (N = 10^5) 100000 100000 10000 10000 1000 1000 flips/n 100 flips/n 100 10 d = 5 d = 7 d = 9 d = 11 1 3.8 3.9 4 4.1 4.2 4.3 10 d = 5 d = 7 d = 9 d = 11 1 3.8 3.9 4 4.1 4.2 4.3 alpha alpha Normalised solution times for FRRT, α = 3.8... 4.3. Left: complete data; right: medians and quartiles. Local Search Algorithms for Random Satisfiability 16/30

FRRT linear scaling Focused Record-to-Record Travel (alpha = 4.15) Focused Record-to-Record Travel (alpha = 4.20) 100 100 80 80 cum.freq. 60 40 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 flips/n flips/n Cumulative solution time distributions for FRRT with d = 9. Local Search Algorithms for Random Satisfiability 17/30

FRRT linear scaling (cont d) Focused Record-to-Record Travel (alpha = 4.15) Focused Record-to-Record Travel (alpha = 4.20) 100 100 80 80 cum.freq. 60 40 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 20 0 N = 10^4 N = 3*10^4 1 10 100 1000 10000 flips/n flips/n Cumulative solution time distributions for FRRT with d = 7. Local Search Algorithms for Random Satisfiability 18/30

FRRT qualitative observations 10 4 x N flips 10 3 10 2 d=5 d=6 d=7 d=8 d=9 WalkSAT fitted curves intersections a 4.05 4.1 4.15 4.2 4.25 α For each fixed d there seems to be a transition value α d s.th. for α < α d the algorithm runs in linear time per variable, and for α > α d requires exponential time per variable. (Empirical estimates: α 5 4.11, α 6 4.14, α 7 4.18, α 8 4.19, α 9 4.21.) Local Search Algorithms for Random Satisfiability 19/30

FRRT qualitative observations cont d 10 4 x N flips 10 3 10 2 d=5 d=6 d=7 d=8 d=9 WalkSAT fitted curves intersections a 4.05 4.1 4.15 4.2 4.25 α An empirical fit of the transition points α d suggests that for large d they converge towards α 4.26. Comparative experiments using WalkSAT with near optimal parameter settings (p = 0.55) yield estimate α dyn 4.19 for WalkSAT s transition point. Local Search Algorithms for Random Satisfiability 20/30

WalkSAT & FRRT on structured problems Jia, Moore & Selman (2004) tested WalkSAT and FRRT on highly structured glassy 3-SAT formulas. Here the number of variables is always of the form N = L L; values of L = 5,8,10,11,16 were tried out. At L = 16 WalkSAT no longer converged; FRRT did, but only for d = 5. 1e+09 WalkSAT and FRRT on NM glassy formulas (alpha = 4) 1e+08 1e+07 total flips 1e+06 100000 10000 1000 100 WalkSAT WalkSAT median FRRT FRRT median 20 40 60 80 100 120 N Local Search Algorithms for Random Satisfiability 21/30

Focused Metropolis Search Arguably the most natural focused local search algorithm. Variable flip acceptance probabilities determined by a parameter η, 0 η 1. FMS(F,eta): s = initial truth assignment; while flips < max_flips do if s satisfies F then output s & halt, else: pick a random unsatisfied clause C in F; pick a variable x in C at random; let x = flip(x), s = s[x /x]; if E(s ) <= E(s) then flip x, else: flip x with prob. eta^(e(s )-E(s)). Local Search Algorithms for Random Satisfiability 22/30

FMS experiments (3-SAT) Focused Metropolis Search (N = 10^5) Focused Metropolis Search (N = 10^5) 100000 100000 10000 10000 1000 1000 flips/n 100 flips/n 100 10 eta = 0.2 eta = 0.3 eta = 0.36 eta = 0.4 1 3.8 3.9 4 4.1 4.2 4.3 10 eta = 0.2 eta = 0.3 eta = 0.36 eta = 0.4 1 3.8 3.9 4 4.1 4.2 4.3 alpha alpha Normalised solution times for FMS, α = 3.8... 4.3. Left: complete data; right: medians and quartiles. Local Search Algorithms for Random Satisfiability 23/30

FMS linear scaling Focused Metropolis Search (eta = 0.3, alpha = 4.00) Focused Metropolis Search (eta = 0.3, alpha = 4.10) 100 100 80 80 cum.freq. 60 40 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 N = 10^6 1 10 100 1000 10000 flips/n flips/n Cumulative solution time distributions for FMS with η = 0.3. Local Search Algorithms for Random Satisfiability 24/30

FMS optimal acceptance ratio? 100000 Focused Metropolis Search (N = 10^5) 10000 flips/n 1000 100 alpha = 4.10 alpha = 4.12 alpha = 4.14 10 alpha = 4.16 alpha = 4.18 alpha = 4.20 1 alpha = 4.22 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 eta Normalised solution times for FMS with η = 0.28... 0.38, α = 4.10... 4.22. Local Search Algorithms for Random Satisfiability 25/30

FMS optimal acceptance ratio cont d Focused Metropolis Search (eta = 0.36, alpha = 4.20) 100 80 cum.freq. 60 40 20 0 N = 10^4 N = 3*10^4 N = 10^5 N = 3*10^5 1 10 100 1000 10000 flips/n Cumulative solution time distributions for FMS with η = 0.36, α = 4.20. Local Search Algorithms for Random Satisfiability 26/30

Analysis? For FRRT: landscape structure? For FMS: contact processes? Local Search Algorithms for Random Satisfiability 27/30

Combinatorial landscapes Reidys & Stadler (SIAM Rev. 2002) f z b(x) x y barrier height from x to y: b(x,y) = min{max{f(z) f(x),0 z p} p an x-y path} barrier height of x Opt: b(x) = min{b(x,y) f(y) < f(x)} depth of a landscape: D f = max{b(x) x Opt} Local Search Algorithms for Random Satisfiability 28/30

Focused search as a contact process Local Search Algorithms for Random Satisfiability 29/30

Focused search as a contact process Local Search Algorithms for Random Satisfiability 29/30

Focused search as a contact process Local Search Algorithms for Random Satisfiability 29/30

Focused search as a contact process Local Search Algorithms for Random Satisfiability 29/30

References References [1] S. Seitz, P. Orponen: An efficient local search method for random 3-satisfiability. Proc. LICS 03 Workshop on Typical Case Complexity and Phase Transitions (Ottawa, Canada, June 2003). Elsevier Electronic Notes in Discrete Mathematics Vol. 16. [2] S. Seitz, M. Alava, P. Orponen: Threshold behaviour of WalkSAT and focused Metropolis search on random 3-satisfiability. Proc. 8th Intl. Conf. on Theory and Applications of Satisfiability Testing (St. Andrews, Scotland, June 2005). Springer-Verlag, Berlin, to appear. [3] S. Seitz, M. Alava, P. Orponen: Focused local search algorithms for random 3-satisfiability. To appear. Local Search Algorithms for Random Satisfiability 30/30