Download presentation
Presentation is loading. Please wait.
1
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel AI Group University of York Toby Walsh 4C
2
Transforming Constraint Satisfaction Problems Constraint Satisfaction Problem (CSP) –Set of variables each associated with a finite domain. –Set of constraints on values that variables can simultaneously take. –Problem: find assignment to variables that satisfy constraints Ease of solving a problem depends greatly on how it is formulated as a CSP. –Carefully chosen transformations of a basic model can greatly reduce the amount of effort required to solve it.
3
The Golomb Ruler n ticks at integer points on a ruler, length m. All inter-tick distances unique. n Solution Effort Minimise: max i (x i ) x 1 – x 2 x 1 – x 3 x 1 – x 2 x 2 – x 1 x 1 – x 2 x 2 – x 3 x 1 – x 2 x 3 – x 1 x 1 – x 2 x 3 – x 2 x 1 – x 3 x 1 – x 2 x 1 – x 3 x 2 – x 1 x 1 – x 3 x 2 – x 3 x 1 – x 3 x 3 – x 1 x 1 – x 3 x 3 – x 2 x 2 – x 1 x 1 – x 2 x 2 – x 1 x 1 – x 3 x 2 – x 1 x 2 – x 3 x 2 – x 1 x 3 – x 1 x 2 – x 1 x 3 – x 2 x 2 – x 3 x 1 – x 2 x 2 – x 3 x 1 – x 3 x 2 – x 3 x 2 – x 1 x 2 – x 3 x 3 – x 1 x 2 – x 3 x 3 – x 2 x 3 – x 1 x 1 – x 2 x 3 – x 1 x 1 – x 3 x 3 – x 1 x 2 – x 1 x 3 – x 1 x 2 – x 3 x 3 – x 1 x 3 – x 2 x 3 – x 2 x 1 – x 2 x 3 – x 2 x 1 – x 3 x 3 – x 2 x 2 – x ! x 3 – x 2 x 2 – x 3 x 3 – x 2 x 3 – x 1 x 1 < x 2 x 2 < x 3 x1 x3x1 x3 z 0 = x 1 – x 2 z 1 = x 2 – x 3 z 2 = x 3 – x 1 All-different(z 0, z 1, z 2 )
4
CGRASS Constraint GeneRation And Symmetry-breaking. Designed to automate the task of performing model transformations that reduce solution time. –Adding implied constraints. –Breaking symmetry. –Removing redundant constraints. –Replacing constraints with their logical equivalents. Based on, and extends, Bundy’s proof planning. –Modelling expertise captured in PP methods. –Methods selectively applied to transform the problem.
5
Normalisation Inspired by HartMath: www.hartmath.org Can replace (to an extent) the test for semantic equivalence with a much simpler syntactic comparison. Makes method-writing easier. Lexicographic Ordering: x 1 – x 2 x 1 – x 3 x 1 – x 3 x 1 – x 2 x 1 – x 2 x 1 – x 3 Lex-order Simplification: x 1 – x 2 x 1 – x 3 Simplify x2 x3x2 x3
6
Symmetry-breaking Often useful implied constraints can be derived only when some/all symmetry broken. CGRASS detects/breaks symmetry as a pre-processing step. Symmetrical variables. –Have identical domains –If all occurrences of x 1, x 2 are exchanged, re-normalised constraint set returns to its original state. E.g. x 1 x 2 Add: x 1 < x 2 x2 x1x2 x1 Exchange x1 x2x1 x2 Normalise
7
Introduce/Eliminate Can reduce arity by introducing new variables: –New variable bound to a sub-expression. –E.g. z 0 = x 1 – x 2 `Eliminate` method substitutes new variables into the quaternary constraints, reducing their arity. z 0 = x 1 – x 2 z 1 = x 2 – x 3 x 1 – x 2 x 2 – x 3 Eliminate z0 z1z0 z1
8
Other Methods Simple, cheap methods given high priority. GenAllDiff –Generates an all-different constraint from a clique of inequations. –Maximal clique identification is NP-complete –CGRASS uses a greedy procedure. z0 z1z0 z1 z1 z2z1 z2 z0 z2z0 z2 genAllDiff allDifferent(z 0, z 1, z 2 )
9
Next Steps Direct support for quantified expressions. Allows reasoning about a class of problems. Writing these methods typically more complicated. –Some easier: –Becomes all-different(x i ) Further Applications: –Steel Mill Slab Design. –Balanced Incomplete Block Design…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.