Académique Documents
Professionnel Documents
Culture Documents
Next: What is quantitative relationship between satisable and unsatisable problems? In other words if we pick a set of clauses at random with what probability it will be satisable? How can we randomly generate hard problems? Randomized algorithms for showing satisability.
1 / 30
1.0
(r, n)
* n = 200
************
n = 140 n = 80
0.5
0 ********* 3 4
r 5 6
4 / 30
-window
1 0.9
(r, 80)
0.1 0 3 4 5
0.1-window r 6
5 / 30
6 / 30
Easy-Hard-Easy Pattern
branches
7000 6000 5000 4000 3000 2000 1000 0 3 4 5 6
7 / 30
easy
hard
crossover point
easy
r
8 / 30
Local search: Choose a random interpretation. If this interpretation is not a model, repeatedly choose a variable and change its value in the interpretation (ip the variable). The ipped variables are chosen using heuristics or randomly, or both.
10 / 30
Flipping a Variable
11 / 30
GSAT
procedure GSAT (S ) input: set of clauses S output: interpretation I such that I |= S or dont know parameters: integers MAX-TRIES, MAX-FLIPS begin repeat MAX-TRIES times I := random interpretation if I |= S then return I repeat MAX-FLIPS times p := an atom such that ip (I, p) satises the maximal number of clauses in S I := ip (I, p) if I |= S then return I return dont know end
12 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1
interpretation p1 0 p2 0 p3 1
satised clauses p1 4 p2 p3
ipped atom
13 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1
interpretation p1 0 p2 0 p3 1
satised clauses p1 4 3 p2 4 p3 4
ipped atom p2
14 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1 2
interpretation p1 0 0 p2 0 1 p3 1 1
satised clauses p1 4 4 3 p2 4 p3 4
ipped atom p2
15 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1 2
interpretation p1 0 0 p2 0 1 p3 1 1
satised clauses p1 4 4 3 3 p2 4 4 p3 4 4
ipped atom p2 p3
16 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1 2 3
interpretation p1 0 0 0 p2 0 1 1 p3 1 1 0
satised clauses p1 4 4 4 3 3 p2 4 4 p3 4 4
ipped atom p2 p3
17 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1 2 3
interpretation p1 0 0 0 p2 0 1 1 p3 1 1 0
satised clauses p1 4 4 4 3 3 5 p2 4 4 4 p3 4 4 4
ipped atom p2 p3 p1
18 / 30
GSAT example
p1 p2 p3 ,
p2 p3 ,
p1 p3 ,
p1 p2 ,
p1 p 2 .
ip no. 1 2 3
interpretation p1 0 0 0 1 p2 0 1 1 1 p3 1 1 0 0
satised clauses p1 4 4 4 5 3 3 5 p2 4 4 4 p3 4 4 4
ipped atom p2 p3 p1
WSAT
procedure WSAT (S ) input: set of clauses S output: interpretation I such that I |= S or dont know parameters: integers MAX-TRIES, MAX-FLIPS begin repeat MAX-TRIES times I := random interpretation if I |= S then return I repeat MAX-FLIPS times randomly select a clause C S such that I randomly select an atom p in C I := ip (I, p) if I |= S then return I return dont know end
21 / 30
WSAT example
p1 p2 p3 , ip no. 1
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2
p1 p 2 . ipped atom
interpretation p1 0 p2 0 p3 1
22 / 30
WSAT example
p1 p2 p3 , ip no. 1
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2
p1 p 2 . ipped atom p1
interpretation p1 0 p2 0 p3 1
23 / 30
WSAT example
p1 p2 p3 , ip no. 1 2
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2 p1 p3 p1 p2
p1 p 2 . ipped atom p1
interpretation p1 0 1 p2 0 0 p3 1 1
24 / 30
WSAT example
p1 p2 p3 , ip no. 1 2
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2 p1 p3 p1 p2
p1 p 2 . ipped atom p1 p2
interpretation p1 0 1 p2 0 0 p3 1 1
25 / 30
WSAT example
p1 p2 p3 , ip no. 1 2 3
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2 p1 p3 p1 p2 p2 p3 p1 p3
p1 p 2 . ipped atom p1 p2
interpretation p1 0 1 p2 0 0 p3 1 1
26 / 30
WSAT example
p1 p2 p3 , ip no. 1 2 3
p2 p3 ,
p1 p3 , unsatised clauses p 1 p2 p1 p3 p1 p2 p2 p3 p1 p3
p1 p 2 . ipped atom p1 p2 p3
interpretation p1 0 1 p2 0 0 p3 1 1
27 / 30
WSAT example
p1 p2 p3 , ip no. 1 2 3 p2 p3 , p1 p3 , unsatised clauses p 1 p2 p1 p3 p1 p2 1 1 1 p2 p3 p1 p3 1 1 0 p1 , p2 , p3 p3 p1 p2 , candidates for ipping p1 , p2 p1 , p2 , p3 p1 p 2 . ipped atom p1 p2
interpretation p1 0 1 p2 0 0 p3 1 1
28 / 30
29 / 30
Summary
We have studied probabilistic behaviour of satisability: sharp threshold from sat. to unsat. hard problems near the threshold Randomized algorithms for satisability: one-side answer: satisable or dont know GSAT, GSAT with random walks and WSAT
30 / 30