local search techniques
play

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


  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

  2. Local Search: Generic structure Generic structure of local search Sat solvers 1: for i in 1 to MAX TRIES do ϕ := random initial assignment 2: for j in 1 to MAX STEPS do 3: if ϕ satisfies F then 4: return satisfiable 5: end if 6: ϕ := Flip ( ϕ ) 7: end for 8: 9: end for 10: return unknown Heule & Hunt (UT Austin) Local Search Techniques 2 / 8

  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

  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

  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 flip in ϕ that variable 3: 4: else flip in ϕ with p a random x i ∈ C 5: flip in ϕ with 1 − p the “optimal” x i ∈ C 6: 7: end if 8: return ϕ Heule & Hunt (UT Austin) Local Search Techniques 5 / 8

  6. The UnitWalk Algorithm π 0 π 1 π 2 UnitWalk UnitWalk UnitWalk . . . period period period ϕ 0 ϕ 1 ϕ 2 ϕ 3 Heule & Hunt (UT Austin) Local Search Techniques 6 / 8

  7. The UnitWalk Algorithm π 0 π 1 π 2 UnitWalk UnitWalk UnitWalk . . . period period period ϕ 0 ϕ 1 ϕ 2 ϕ 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

  8. The UnitWalk Algorithm π 0 π 1 π 2 UnitWalk UnitWalk UnitWalk . . . period period period ϕ 0 ϕ 1 ϕ 2 ϕ 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

  9. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = ∗ , x 2 = ∗ , x 3 = ∗ , x 4 = ∗} ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do iterative propagate unit clauses in ϕ active ◦ F example extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  10. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = ∗ , x 2 = ∗ , x 3 = ∗ , x 4 = ∗} ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do → iterative propagate unit clauses in ϕ active ◦ F example extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Action: no unit clauses in ϕ active ◦ F example Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  11. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = ∗ , x 2 = 1 , x 3 = ∗ , x 4 = ∗} ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do iterative propagate unit clauses in ϕ active ◦ F example → extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Action: extend ϕ active with x 2 := 1 (the truth value in ϕ master ) Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  12. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = ∗ , x 2 = 1 , x 3 = 0 , x 4 = ∗} ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do → iterative propagate unit clauses in ϕ active ◦ F example extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Action: detected unit clause ¬ x 3 → x 3 := 0 Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  13. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = ∗ , x 2 = 1 , x 3 = 0 , x 4 = 0 } ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do → iterative propagate unit clauses in ϕ active ◦ F example extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Action: detected unit clauses x 4 and ¬ x 4 → conflict assign x 4 to truth value in ϕ master → x 4 := 0 Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  14. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = 0 , x 2 = 1 , x 3 = 0 , x 4 = 0 } ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do iterative propagate unit clauses in ϕ active ◦ F example → extend ϕ active with most important free variable according to π while ϕ active contains ∗ ’s Action: extend ϕ active with x 1 := 0 (the truth value in ϕ master ) Heule & Hunt (UT Austin) Local Search Techniques 7 / 8

  15. UnitWalk Period Example F example := ( x 1 ∨ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ∨ x 3 ) ∧ ( ¬ x 2 ∨ ¬ x 3 ) ∧ ( ¬ x 2 ∨ x 3 ∨ ¬ x 4 ) ∧ ( ¬ x 2 ∨ x 3 ∨ x 4 ) ∧ ( ¬ x 3 ∨ ¬ x 4 ) := { x 1 = 0 , x 2 = 1 , x 3 = 1 , x 4 = 0 } ϕ master := { x 1 = 0 , x 2 = 1 , x 3 = 0 , x 4 = 0 } ϕ active := ( x 2 , x 1 , x 4 , x 3 ) π do iterative propagate unit clauses in ϕ active ◦ F example 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

  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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend