Hostname: page-component-74656f9884-8r8nv Total loading time: 0 Render date: 2026-11-07T18:21:37.957Z Has data issue: false hasContentIssue false

The Goldilocks problem

Published online by Cambridge University Press:  07 August 2003

TUDOR HULUBEI
Affiliation:
Department of Computer Science, University of New Hampshire, Durham, New Hampshire, USA
EUGENE C. FREUDER
Affiliation:
Cork Constraint Computation Centre, Computer Science Department, University College Cork, Cork, Ireland
RICHARD J. WALLACE
Affiliation:
Cork Constraint Computation Centre, Computer Science Department, University College Cork, Cork, Ireland
Rights & Permissions [Opens in a new window]

Abstract

Constraint-based reasoning is often used to represent and find solutions to configuration problems. In the field of constraint satisfaction, the major focus has been on finding solutions to difficult problems. However, many real-life configuration problems, although not extremely complicated, have a huge number of solutions, few of which are acceptable from a practical standpoint. In this paper we present a value ordering heuristic for constraint solving that attempts to guide search toward solutions that are acceptable. More specifically, by considering weights that are assigned to values and sets of values, the heuristic can guide search toward solutions for which the total weight is within an acceptable interval. Experiments with random constraint satisfaction problems demonstrate that, when a problem has numerous solutions, the heuristic makes search extremely efficient even when there are relatively few solutions that fall within the interval of acceptable weights. In these cases, an algorithm that is very effective for finding a feasible solution to a given constraint satisfaction problem (the “maintained arc consistency” algorithm or MAC) does not find a solution in the same weight interval within a reasonable time when it is run without the heuristic.

Information

Type
Research Article
Copyright
© 2003 Cambridge University Press
Figure 0

An example problem. For variables v1, v2, and v3, the values and weights (in italics) are v1 = {0 = 0.2, 1 = 0.8}, v2 = {1 = 0.1, 2 = 0.7}, and v3 = {−1 = 0.8, 4 = 0.9}. For c12, the constraint between v1 and v2, individual tuples and weights (in italics) are {(0, 1) = 0.1, (1, 1) = 0.7, (1, 2) = 0.9}. For c13 they are {(0, −1) = 0.2, (0, 4) = 0.3, (1, −1) = 0.5}.

Figure 1

An illustration of the acceptable-weight heuristic. The domain values and weights (in italics) for the subproblem considered by the heuristic are v1 = {1 = 0.1}, v2 = {6 = 0.2}, v3 = {4 = 0.4}, and v4 = {1 = 0.4, 5 = 0.8}. The relevant constraint tuples and their weights (in italics) are c14 = {(1, 1) = 0.1, (1, 5) = 0.2}, c24 = {(6, 1) = 0.8, (6, 5) = 0.9}, and c34 = {(4, 1) = 0.6, (4, 5) = 0.7}. See the text for further details.

Figure 2

The behavior of MAC and MAC+acceptable-weight on a single test problem as described in the text. The solution weights are normalized to fall between 0 and 1. The range of acceptable weights is 0.05, which is centered at varying points along the scale of solution weights. The problems have a density of 0 (n − 1 edges) and a tightness of 0, so there are many solutions.

Figure 3

A performance comparison of MAC and MAC+acceptable-weight with a weight range of 0.05 for a problem with a density of 0 and a tightness of 0.25. (Increased tightness reduces the number of possible solutions.)

Figure 4

A performance comparison of MAC and MAC+acceptable-weight with a weight range of 0.1 for a problem with a density of 0 and a tightness of 0.25.

Figure 5

A performance comparison of MAC and MAC+acceptable-weight with a weight range of 0.1 for a problem with a density of 0.055 and a tightness of 0.25.

Figure 6

A performance comparison of MAC and MAC+acceptable-weight with a weight range of 0.1 for a problem in the “hard” region of the density space (density = 0.0651, tightness = 0.25).

Figure 7

A graph showing the transition between solvable and unsolvable problems as the density of the constraint graph increases. The time is that required to find one solution (in any part of the search space). The peak difficulty for search is at the boundary, or phase transition, between solvable and unsolvable problems. All problems have a tightness of 0.25.