Documente Academic
Documente Profesional
Documente Cultură
12000 120
10000
100
Runtime (ms)
Runtime (ms)
8000
80
6000
60
4000
40
2000
20
0
0 2 4 6 8 10 12
0
Clause/Symbol Ratio 0 0.2 0.4 0.6 0.8 1
Probability p
DPLL Satisfied DPLL Unsatisfied
WalkSAT 2500
Local-search algorithms are known for their speed and sim-
plicity. WalkSAT begins by randomly assigning every sym- 2000
Runtime (ms)
8000
0.6
0.5
6000
0.4
4000
0.3
2000
0.2
0
0.1
0 5 10 15
0
Clause/Symbol Ratio
0 1 2 3 4
WalkSAT DPLL Clause/Symbol Ratio
Figure 5: DPLL/WalkSAT Runtime verus Clause/Symbol Figure 6: BackboneSet
Ratio
800
0.6 1
Best-Order / Avg Runtime Ratio
0.5 0.8
Normalized Counts
0.4 0.6
0.3
0.4
0.2
0.2
0.1
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39
0 Problem Symbols
1 3 5 7 9 11 13 15 17 19
Random Problems (4.0 C/S Ratio) FalseSymbols AllFlips
MaxSatFlips RandomFlips
0.35
0.5
Mean Normalized Flip Count
0.3
Deviation in Average-Value
0.4
0.25
0.2 0.3
0.15
0.2
0.1
0.05 0.1
0
0
1 4 7 10 13 16 19 22 25 28 31 34 37 40
0 1 2 3 4 5 6
Symbol Position Clause/Symbol Ratio
average flip counts for the symbol space. The graph shows we record the standard deviation of each symbols average
the symbols in best-order from left to right, with each sym- value. The standard deviation tells us roughly if each sym-
bols normalized flip count graphed for each problem. The bol is assigned consistently across multiple WalkSAT runs,
graph shows that there is no cross-problem correlation be- as indicated by low standard deviation, or if the symbol is
tween best symbol-ordering and flip counts. Just to be cer- instead assigned sporadically. We can average all these stan-
tain we ran DPLL on symbol-orders of both increasing and dard deviations across multiple symbols to get an idea of the
decreasing flip count and neither method did better than av- stability of assignments for a given problem.
erage runtime. Figure 11 shows the relationship between average assign-
ment stability and clause/symbol ratio for a randomly gen-
Value-Ordering Heuristic erated problem set. We know assignment stability is most
Though symbol-ordering demonstrably plays a role in DPLL stable as it approaches zero, since this indicates the smallest
runtime, it is not the only target for heuristic optimization. mean deviation in symbol assignment over time. We notice
Just as the order in which symbols are selected for assign- that as we approach the 4.3 asymptotic region, assignments
ment is negotiable, so is the order in which domain values become more stable than problems in the rest of the region.
for these symbols are assigned. Expanding the assigned-true This observation is important, since we’ve hypothesized that
branch before the assigned-false branch for a given symbol a stable assignment might inform value-ordering in DPLL
is a potential influence on DPLL runtime. and assignments are most stable in the difficult problem re-
While value-ordering seems the obvious counterpart to gion.
symbol-ordering when exploring DPLL branching, we were Though we’ve shown stable average-value assignment for
especially motivated to explore value-ordering based on a WalkSAT approaching the 4.3 asymptote, how does the
newly considered WalkSAT execution statistic. In addition average-value best inform DPLL? For a randomly gener-
to flip counts, we can track the portion of time a value spends ated problem set, we ran both WalkSAT and DPLL to re-
with a given assignment during the course of solver exe- spectively accumulate average-value statistic and to find a
cution. We record this as a percentage, where zero repre- known solution for each problem. We then compared the
sents false and one represents true. Thus, a symbol which average-value of each symbol with its known solution value
is mainly valued as false during WalkSAT execution will and calculated a percentage of matching assignments out
tend to zero, while symbols valued as true will tend to one. of all assignments. The average percentage matching was
We hypothesize the symbols with high flip counts will tend 61.4 with a standard deviation of 4.21, indicating that the
towards 0.5, as they will alternate between true and false average-assignment does only slightly better than average at
throughout solver execution. determining a symbols solution value.
We wish to characterize this statistic for various classes
of SAT problems. Our intuition tells us that if a symbol is A Framework for WalkSAT Heuristic
valued consistently across WalkSAT execution, then the val-
uation might provide some hint to value-ordering for that Application
symbol in DPLL execution. We record the average value Though none of our potential WalkSAT statistic heuristics
statistic for each symbol in a SAT problem across multiple seem particularly promising, we still wish to follow through
runs of WalkSAT over a randomly generated problem set. on our goal of tying together DPLL and WalkSAT. Recall the
For multiple executions of WalkSAT on the same problem, general form of DPLL we outline earlier. We extend DPLL
20000
Conclusion
18000
We have explored a number of different avenues involving
16000 applying WalkSAT to generate a heuristic for DPLL. Our
14000 initial focus was on the backbone set, but our results showed
Runtime (ms)
12000 that the backbone set tends towards zero as problems ap-
10000 proach the 4.3 clause/symbol ratio. Intuitively, this relation
8000 makes sense. For SAT problems with smaller clause/symbol
6000 ratios, the symbols are less-constrained, allowing an in-
4000
creased number of solutions and increasing the size of the
potential backbone set. Regardless, identifying the back-
2000
bone set for randomly-generated SAT problems does not ap-
0 pear to be worthwhile.
Further exploration focused on informing symbol and
1
52
04
56
1
62
14
68
2
72
3.
5.
1.
2.
2.
3.
4.
4.
5.
value ordering in DPLL using WalkSAT cumulative statis-
Clause/Symbol Ratio tics. Our experimentation showed that symbol-order does
play a key factor in DPLL runtime. We were not able to es-
DPLL Hybrid WalkSAT
tablish a linkage between flip counts in WalkSAT and sym-
bol ordering in DPLL to consistently decrease the runtime of
DPLL. Intuitively, we know that higher flip counts suggest
Figure 12: Hybrid that the given symbols are highly constrained. We hypoth-
esized that branching on these symbols might allow DPLL
to discover and prune inconsistent assignments earlier in the
by adding the following code before the unit and pure literal search tree. However, it seems that this rough-grained ap-
propogation (line 8): proach to symbol ordering is not enough to produce a reduc-
1: if some probability then tion in runtime.
2: reduced ← Reduce( clauses, model) Our exploration of value ordering appeared more promis-
3: if WalkSAT( reduced, symbols ) then ing. Our results showed that symbols have increas-
4: return true ingly consistent assignments under WalkSAT as problem
5: end if clause/symbol ratios approach 4.3. We hoped this might
6: Adjust Next(), DomainValues() from WalkSAT tell us something about assignments of a possible solu-
7: end if tion, though our results indicate such statistics were only
We essentially run WalkSAT on a reduced SAT prob- marginally better than average at predicting a problem solu-
lem and condition symbol-order and value-order branch- tion. Intuitively, we can explain the increasingly consistent
ing based on cumulative WalkSAT statistics. As an added assignments as a function of the level of constraint in a prob-
bonus, if WalkSAT happens to solve the problem, we can lem. We hypothesize that for highly constrained problems,
return immediately. Notice that the local search is not run WalkSAT tends to get stuck in local maxima, flipping just a
at each node in the DPLL search tree. Instead, WalkSAT few values while the remaining symbols remain largely un-
is run with some conditional probability factor, allowing us touched.
to avoid the performance over head of WalkSAT being run Lacking strong evidence of a worthwhile heuristic, we im-
for every node in the DPLL search tree. Ideally this hybrid plemented a hybrid DPLL-WalkSAT algorithm that, unfor-
algorithm will have the completeness of DPLL and the opti- tunately, did not perform well. For the most part, our hy-
mized runtime of WalkSAT. brid algorithm performed on par with WalkSAT for lightly
constrained problems, as our hybrid algorithm effectively re-
Application of Value-Ordering Heuristic duced to WalkSAT in that region. As problems became more
constrained, our internal WalkSAT had less luck finding so-
Of our available heuristics, value-ordering based on accrued lutions straight off, turning over execution to our informed
average-value WalkSAT statistics seems the most promis- value-ordering heuristic. Unfortunately, this heuristic does
ing. Utilizing the framework above, we run WalkSAT and not seem to produce valued results.
adjust the order of DOMAIN-VALUES for each unassigned It is interesting to note the parallels between our approach
symbol in the DPLL problem space. In theory, DPLL will and another combining DPLL and WalkSAT (Mazure, Sas,
branch more often than not on correct symbol assignments, & Grgoire 1998). Their approach combined DPLL and
speeding up the search time to find the average solution. WalkSAT in much the same way, except that they used
As figure 12 shows, the theory does not hold true in prac- WalkSAT to inform symbol ordering in DPLL by tracking
tice. Though the hybrid solver performs on-par with DPLL the symbol with the highest flip count. Their increased per-
and WalkSAT in the easy symbol/clause region, the runtime formance seems contradictory to our results demonstrating
is drastically worse as we pass through the 4.3 region. In that flip count does not reliably inform symbol ordering.
short, the hybrid approach offers no real speed benefits over However, closer examination of their approach reveals the
WalkSAT in the satisfiable region and degrades in the unsat- use of Tabu stochastic search, which keeps a history of re-
isfiable region. cently flipped symbols which are not immediately consid-
ered for subsequent flipping. Such an implementation avoids Moskewicz, M. W.; Madigan, C. F.; Zhao, Y.; Zhang, L.;
repeated flip-flops in local maxima, which might inflate and and Malik, S. 2001. Chaff: Engineering an Efficient SAT
distort flip counts in regular WalkSAT. Unfortunately, we Solver. In Proceedings of the 38th Design Automation
lacked the time to verify the approach of Mazure, Sas, & Conference (DAC’01).
Grgoire. O’Donnel, T. 2002. Determining satisfiability of np-
complete 3-sat logic problems solely from the overlap of
Contributions clauses.
1. Brian Ferris: Brian wrote most of the DPLL-related Russell, S., and Norvig, P. 2003. Artificial Intelligence:
code, as well as the hybrid implementation. Most the A Modern Approach. Prentice-Hall, Englewood Cliffs, NJ,
experimentation regarding heuristics using WalkSAT and 2nd edition edition.
DPLL were implemented and written up by him. Selman, B.; Kautz, H. A.; and Cohen, B. 1994. Noise
strategies for improving local search. In Proceedings of
2. Jon Froehlich: Jon wrote most of the WalkSAT-related
the Twelfth National Conference on Artificial Intelligence
code, as well as all of the result aggregation framework.
(AAAI’94), 337–343.
Jon did most of the direct comparison between WalkSAT
and DPLL and the accompanying write up. Selman, B.; Kautz, H. A.; and Cohen, B. 1996. Local
search strategies for satisfiability testing. In Johnson, D.,
and Trick, M., eds., Second DIMACS implementation chal-
External Code lenge : cliques, coloring and satisfiability, volume 26 of
All code was written from scratch for this project. The text DIMACS Series in Discrete Mathematics and Theoretical
was consulted for the basic implementation of DPLL and Computer Science. American Mathematical Society. 521–
WalkSAT. 532.
Selman, B.; Kautz, H. A.; and McAllester, D. A. 1997. Ten
Acknowledgements challenges in propositional reasoning and search. In Pro-
We wish to acknowledge the contributions of Henry Kautz ceedings of the Fifteenth International Joint Conference on
of the University of Washington in our efforts. A conversa- Artificial Intelligence (IJCAI’97), 50–54.
tion with him regarding the application of DPLL and Walk- Slaney, J., and Walsh, T. 2001. Backbones in optimization
SAT together lead to the idea of monitoring statistics of and approximization. In Proceedings of the International
WalkSAT for informing the DPLL search process. Joint Conference on Artificial Intelligence, 254–259.
References
Cook, S. A., and Mitchell, D. G. 1997. Finding hard
instances of the satisfiability problem: A survey. In Du;
Gu; and Pardalos., eds., Satisfiability Problem: Theory
and Applications, volume 35 of Dimacs Series in Discrete
Mathematics and Theoretical Computer Science. American
Mathematical Society. 1–17.
Davis, M.; Logemann, G.; and Loveland, D. 1962. A
machine program for theorem proving. Communications
of the ACM 5(7):394–397.
Habet, D.; Li, C.; Devendeville, L.; and Vasquez, M. 2002.
A hybrid approach for sat. In In Proceedings of the Eigth
International Conferences on Principles and Practice of
Constraint Programming, 172–184.
Li, C.-M., and Anbulagan. 1997. Heuristics based on unit
propagation for satisfiability problems. In Proceedings of
the Fifteenth International Joint Conference on Artificial
Intelligence (IJCAI’97), 366–371.
Lynce, I., and Silva, J. M. 2003. An overview of backtrack
search satisfiability algorithms. volume 37, 307–326.
Mazure, B.; Sas, L.; and Grgoire, E. 1997. Tabu search for
sat. In Proceedings of the Fourteenth National Conference
on Artificial Intelligence (AAAI’97), 281–285.
Mazure, B.; Sas, L.; and Grgoire, E. 1998. Boosting com-
plete techniques thanks to local search methods. Annals of
Mathematics and Artificial Intelligence 22:319–331.