The Constrainedness Knife-Edge Toby Walsh
The Constrainedness Knife-Edge Toby Walsh
The Constrainedness Knife-Edge Toby Walsh
3 , , , , , , , , ,
N=500
Figure 1: Ratio of clauses to variables, l/n on the 2.8 N-~00-~---
N=300
-E]-- "
N-~.00-x--
heuristic branch against the depth. 2.6 N=100~-
2.4
l Hence,
0.5
E(i,j)EE log2(1 - ~)
0
0,2 0.4 0.6 0.8
logdl-+D
dopflVN
In Figure 6, we plot the estimated constrainedness
downthe heuristic branch for a typical register al-
Figure 5: Lower-boundon the constrainedness, n down
location problem. Despite the fact that this plot is
a branch for random3-SATproblems with 100 variables
and varying initial ratio of clauses to variable.
! j
1 i m--40----
f
m--42-+---
111---44
-o--.
Non-random problems 0.8 /i m--46
-. ....
m=49(opt) -~--
The existence of a constrainedness knife-edge helps to m=50 -<~---
m--52-+---
0.6 .: ~.
explain the difficulty of solving randomproblems at m=54-~ --
sitions (Gent & Walsh 1996; Zhang & Korf 1996). (A)
we observe a constrainedness knife-edge when solving 10 .... ,;:i
such optimization problems? I Iog2(L)/N-~.0 I[~
/ Iog2(L)/N=1.8 ...... Jj ~
[,, :" J
To explore this question, we ran some experiments 8 [-I Iog2(L)/N=1.4
Iog2(t)/N=i.6
.....
/] :, [
/ Iog2ll.yl~-l.2.... //"!i
with the CKKoptimization procedure for number par- / ~(L~=I.0
-- /i ;
o F ~(L~4~--0.6...... / ! :: - f
titioning (Korf 1995). Given a bag of N number, i ~2(L~--0.4......
- / i : ] !
wish to find a partition into two bags that minimizesA, 4/ //.../
.."..."/i
the difference between the sum of the two bag. (Gent
& Walsh 1996) shows that for partitioning n numbers . ...........
drawn uniformly at random from(0,1], n ~ loa~(1)/n.
To estimate n during search, we assume that the num- 0 0.2 0.4 0.6 0.8
deptWN
bers left are taken from such an ensemble and that
their size, l is twice the sample average. In Figure 7, (B)
we plot this estimate for the constrainedness during
search. For comparison, we also plot the lower bound Figure 7: The constrainedness, n downthe heuristic
on n using the same scales. Weagain observe a con- branch for number partitioning problems with N =
strainedness knife-edge. Althoughthere is not a tran- 30 numbers, and varying L. (A) estimated n. (B)
sition between soluble and insoluble problems (since theoretical lower-boundto same scale.
there is always an optimal partition), there is now
transition between optimization problems with perfect
partitions (that is, in whichA < 1) and those without, that this heuristic is effective on hard and unsatis-
fiable random 3-SATproblems. For instance, for 50
and verifying the optimality of a partition with A > 1
can be costly. variable unsatisfiable problems at L/N = 4.3, the me-
dian nodes searched using this heuristic is 2,575 com-
Constrainedness as a heuristic pared to 3,331 nodes for MOMS heuristic, and 7,419
nodes for the heuristic that minimizes n. On the other
Knowledgeabout the existence of a constrainedness hand, maximizing~ is less effective on hard and sat-
knife-edge may help us design more effective search isfiable problems. For 50 variable satisfiable problems
procedures. For instance, for soluble problems, it sug- at L/N = 4.3, the median nodes searched when maxi-
gests that we should try to get off the knife-edge as mizing n is 1,487 compared to 164 nodes with MOMs
quickly as possible by branching into the subproblem heuristic, and 104 nodes with the heuristic that mini-
that is as under-constrained as possible. That is, as mizes n. An adaptive heuristic that switches between
suggested in (Gent et al. 1996), we should branch into minimizing and maximizing n depending on an esti-
the subproblemthat minimizes n. To test this thesis, mate of the solubility of the problem may therefore
we implemented a branching heuristic for the Davis- offer good performance.
Putnam procedure that branches on the literal which
gives the subproblem with smallest n. In Table 1, we
showthat this heuristic performs well on hard and sat- Related work
isfiable random 3-SATproblems. Most theoretical studies of the Davis-Putnam pro-
For insoluble problems, the existence of a con- cedure have used the easier constant probability
strainedness knife-edge suggests that we should branch model. One notable exception is (Yugami1995) which
into the sub-problemthat is as over-constrained as pos- computes the average-case complexity of the Davis-
sible. That is, we should branch into the subprob- Putnamprocedure for the random3-SATproblem class.
lem that maximizes n. Initial experiments suggest Freemanhas studied experimentally the running of the
N MOM KAPPA Acknowledgments
25 11 1 I wish to thank membersof the APESgroup, especially
50 164 104 Barbara Smith and Inn Gent, for their commentsand
75 1129 580 criticisms. The author is supported by EPSI~Caward
100 3903 1174 GR/K/65706.
References
Table 1: Median nodes searched by the Davis-Putnam
procedure for satisfiable random 3-SATproblems at Bayardo, R., and Schrag, 1%. 1997. Using CSPlook-
back techniques to solve real-world SATinstances. In
L/N = 4.3, branching either with MOMsheuristic,
Proceedings of the 14th National Conference on AL
or to minimize the constrainedness (KAPPA).
Brelaz, D. 1979. Newmethods to color the vertices
of a graph. Commincations of ACM22:251-256.
Davis-Putnam procedure on random 3-SAT problems Cheeseman, P.; Kanefsky, B.; and Taylor, W. 1991.
(Freeman1996). Unlike here, where the focus is on the Wherethe really hard problems are. In Proceedings
heuristic branch, Freemancomputesaverages across all of the 12th IJCAI, 331-337.
branches in the search tree. He identifies an "unit cas- Freeman, J. 1996. Hard random 3-SATproblems and
cade", a depth in the search tree where unit propaga- the Davis-Putnamprocedure. Artificial Intelligence
tion greatly simplifies the problem. The ineffectiveness 81(1-2):183-198.
of unit propagation above this depth helps to explain Geelen, P. 1992. Dual viewpoint heuristics for binary
the hardness of problems at the phase transition. constraint satisfaction problems.In Proceedingsof the
Gent and Walsh have studied experimentally the lOth ECAI, 31-35.
running of local search procedures for satisfiability Gent, I., and Walsh, T. 1993. An empirical analysis
(Gent ~ Walsh 1993). They show that various proper- of search in GSAT.Journal of Artificial Intelligence
ties like the percentage of clauses satisfied, and the Research 1:23-57.
numberof variables offered to flip are invariant if Gent, I., and Walsh, T. 1995. Phase transitions from
depths are scaled linearly with problem size. This mir- real computational problems. In Proceedings of the
rors the result here on the scaling of the constrained- 8th Int. Symp.on Artificial Intelligence, 356-364.
ness, the ratio of clauses to variables and the average Gent, I., and Walsh, T. 1996. Phase transitions
clause size. Such simple scaling results maybe useful and annealed theories: Numberpartitioning as a case
in the theoretical analysis of these search procedures. study. In Proceedings of ECAI-96.
Gent, I.; MacIntyre, E.; Prosser, P.; and Walsh, T.
Conclusions 1996. The constrainedness of search. In Proceedings
of the 13th National Conference on AL
Wehave measured how the constrainedness of prob- Gomes, C., and Selman, B. 1997. Problem structure
lems varies during search in several different prob- in the presence of perturbations. In Proceedingsof the
lem domains: both decision problems like proposi- l~th National Conference on AI, 221-226.
tional satisfiability and graph coloring, and optimiza- Korf, R. 1995. From approximate to optimal solu-
tion problems like number partitioning. Our experi- tions: A case study of number partitioning. In Pro-
ments have used both random and non-random prob- ceedings of the 14th IJCAL
lems. In each case, we observed a constrainedness Mitchell, D.; Selman, B.; and Levesque, H. 1992.
"knife-edge" in which critically constrained problems Hard and Easy Distributions of SATProblems. In
tended to remain critically constrained. The existence Proceedings of the lOth National Conference on AI,
of a constrainedness knife-edge helps to explain the 459-465.
hardness of problems from the phase transition. We Selman, B.; Levesque, H.; and Mitchell, D. 1992. A
have shown that a lower-bound calculation predicts NewMethodfor Solving Hard Satisfiability Problems.
this knife-edge theoretically. Wehave also observed In Proceedingsof the 10th National Conference on AI,
a very simple scaling with problem size for various 440-446.
properties measuredduring search like the constrained- Yugami, N. 1995. Theoretical analysis of Davis-
ness, the ratio of clauses to variables, and the average Putnamprocedure and propositional satisfiability. In
clause size. Finally, we have used the existence of a Proceedings of the 14th IJCAI, 282-288.
constrainedness knife-edge to propose somebranching Zhang, W., and Korf, R. 1996. A study of complex-
heuristics for propositional satisfiability. Weconjec- ity transitions on the asymmetictraveling salesman
ture that similar microscopicstudies that look closely problem. Artificial Intelligence 81(1-2):223-239.
inside search maybe useful in other domains.