Local Search Techniques Marijn J.H. Heule Warren A. Hunt Jr. The - - PowerPoint PPT Presentation

local search techniques
SMART_READER_LITE
LIVE PREVIEW

Local Search Techniques Marijn J.H. Heule Warren A. Hunt Jr. The - - PowerPoint PPT Presentation

Local Search Techniques Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin Heule & Hunt (UT Austin) Local Search Techniques 1 / 8 Local Search: Generic structure Generic structure of local search Sat solvers 1: for i


slide-1
SLIDE 1

Local Search Techniques

Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin

Heule & Hunt (UT Austin) Local Search Techniques 1 / 8

slide-2
SLIDE 2

Local Search: Generic structure Generic structure of local search Sat solvers

1: for i in 1 to MAX TRIES do 2:

ϕ := random initial assignment

3:

for j in 1 to MAX STEPS do

4:

if ϕ satisfies F then

5:

return satisfiable

6:

end if

7:

ϕ := Flip( ϕ )

8:

end for

9: end for 10: return unknown

Heule & Hunt (UT Austin) Local Search Techniques 2 / 8

slide-3
SLIDE 3

Local Search: Global vs Local flips Global flips Pro: Big improvements Neg: Probabilistic incomplete Local flips Neg: Small improvements Pos: Probabilistic complete

Heule & Hunt (UT Austin) Local Search Techniques 3 / 8

slide-4
SLIDE 4

Local Search: WalkSAT Flips Select a random unsatisfied clause C Free flip Random flip Heuristic flip

Heule & Hunt (UT Austin) Local Search Techniques 4 / 8

slide-5
SLIDE 5

Local Search: WalkSAT Code Flip WalkSat( ϕ )

1: C := random falsified clause by ϕ ◦ F 2: if a variable ∈ C can be flipped for free then 3:

flip in ϕ that variable

4: else 5:

flip in ϕ with p a random xi ∈ C

6:

flip in ϕ with 1 − p the “optimal” xi ∈ C

7: end if 8: return ϕ

Heule & Hunt (UT Austin) Local Search Techniques 5 / 8

slide-6
SLIDE 6

The UnitWalk Algorithm

ϕ0 π0

UnitWalk

period ϕ1 π1

UnitWalk

period ϕ2 π2

UnitWalk

period ϕ3 . . .

Heule & Hunt (UT Austin) Local Search Techniques 6 / 8

slide-7
SLIDE 7

The UnitWalk Algorithm

ϕ0 π0

UnitWalk

period ϕ1 π1

UnitWalk

period ϕ2 π2

UnitWalk

period ϕ3 . . . The general idea of a UnitWalk period: Within each unsatisfied clause in ϕi ◦ F the assignment to the least important variable (based on πi) is flipped

Heule & Hunt (UT Austin) Local Search Techniques 6 / 8

slide-8
SLIDE 8

The UnitWalk Algorithm

ϕ0 π0

UnitWalk

period ϕ1 π1

UnitWalk

period ϕ2 π2

UnitWalk

period ϕ3 . . . The general idea of a UnitWalk period: Within each unsatisfied clause in ϕi ◦ F the assignment to the least important variable (based on πi) is flipped For example: F = (x ∨ ¬y), ϕ0 = {x = 0, y = 1}, π0 = {y, x}

Heule & Hunt (UT Austin) Local Search Techniques 6 / 8

slide-9
SLIDE 9

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = ∗, x2 = ∗, x3 = ∗, x4 = ∗} π := (x2, x1, x4, x3) do iterative propagate unit clauses in ϕactive ◦ Fexample extend ϕactive with most important free variable according to π while ϕactive contains ∗’s

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-10
SLIDE 10

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = ∗, x2 = ∗, x3 = ∗, x4 = ∗} π := (x2, x1, x4, x3) do → iterative propagate unit clauses in ϕactive ◦ Fexample extend ϕactive with most important free variable according to π while ϕactive contains ∗’s Action: no unit clauses in ϕactive ◦ Fexample

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-11
SLIDE 11

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = ∗, x2 = 1, x3 = ∗, x4 = ∗} π := (x2, x1, x4, x3) do iterative propagate unit clauses in ϕactive ◦ Fexample → extend ϕactive with most important free variable according to π while ϕactive contains ∗’s Action: extend ϕactive with x2 := 1 (the truth value in ϕmaster)

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-12
SLIDE 12

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = ∗, x2 = 1, x3 = 0, x4 = ∗} π := (x2, x1, x4, x3) do → iterative propagate unit clauses in ϕactive ◦ Fexample extend ϕactive with most important free variable according to π while ϕactive contains ∗’s Action: detected unit clause ¬x3 → x3 := 0

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-13
SLIDE 13

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = ∗, x2 = 1, x3 = 0, x4 = 0} π := (x2, x1, x4, x3) do → iterative propagate unit clauses in ϕactive ◦ Fexample extend ϕactive with most important free variable according to π while ϕactive contains ∗’s Action: detected unit clauses x4 and ¬x4 → conflict assign x4 to truth value in ϕmaster → x4 := 0

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-14
SLIDE 14

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = 0, x2 = 1, x3 = 0, x4 = 0} π := (x2, x1, x4, x3) do iterative propagate unit clauses in ϕactive ◦ Fexample → extend ϕactive with most important free variable according to π while ϕactive contains ∗’s Action: extend ϕactive with x1 := 0 (the truth value in ϕmaster)

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-15
SLIDE 15

UnitWalk Period Example

Fexample := (x1 ∨ x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x2 ∨ ¬x3) ∧ (¬x2 ∨ x3 ∨ ¬x4) ∧ (¬x2 ∨ x3 ∨ x4) ∧ (¬x3 ∨ ¬x4) ϕmaster := {x1 = 0, x2 = 1, x3 = 1, x4 = 0} ϕactive := {x1 = 0, x2 = 1, x3 = 0, x4 = 0} π := (x2, x1, x4, x3) do iterative propagate unit clauses in ϕactive ◦ Fexample extend ϕactive with most important free variable according to π → while ϕactive contains ∗’s Action: end of period because all variables are assigned in ϕactive

Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

slide-16
SLIDE 16

Local Search Techniques

Marijn J.H. Heule Warren A. Hunt Jr. The University of Texas at Austin

Heule & Hunt (UT Austin) Local Search Techniques 8 / 8