1: \documentclass{llncs}
2:
3: \usepackage{times,epsfig,amssymb,latexsym,lscape}
4:
5: \newcommand{\at}{\hbox{{\it atomic}}}
6: \newcommand{\fs}{\hbox{{\it feasible}}}
7: \newcommand{\upb}{\hbox{{\it getUpperBound}}}
8: \newcommand{\MS}{\hbox{{\it MS}}}
9: \newcommand{\lb}{\hbox{{\it lb}}}
10: \newcommand{\rb}{\hbox{{\it rb}}}
11: \newcommand{\diffdiag}{\hbox{{\it diffdiag}}}
12: \newcommand{\lt}{\hbox{{\it lt}}}
13: \newcommand{\allEq}{\hbox{{\it allEq }}}
14:
15: \newcommand{\A}{\mathcal{A}}
16: \newcommand{\C}{\mathcal{C}}
17: \newcommand{\E}{\mathcal{E}}
18: \newcommand{\D}{\mathcal{D}}
19: \newcommand{\F}{\mathcal{F}}
20: \newcommand{\R}{\mathcal{R}}
21: \newcommand{\N}{\mathcal{N}}
22: \newcommand{\Z}{\mathcal{Z}}
23: \newcommand{\calS}{\mathcal{S}}
24: \newcommand{\pp}{^{\prime\prime}}
25: \newcommand{\T}{\mathcal{T}}
26: \newcommand{\V}{\mathcal{V}}
27: \newcommand{\X}{\mathcal{X}}
28:
29: \title{Using propagation for solving complex arithmetic constraints}
30: \author{M.H. van Emden \and B. Moa}
31:
32: \institute{Department of Computer Science, \\University of Victoria,
33: Victoria, Canada \\
34: \email{\{vanemden, bmoa\}@cs.uvic.ca},\\ WWW home page:
35: \texttt{http://www.cs.uvic.ca/\homedir vanemden/ }\\
36: April 4, 2003; as submitted to CP'03
37: }
38:
39: %\date{}
40: \pagestyle{headings}
41: \setcounter{page}{1}
42: \begin{document}
43: \maketitle
44:
45: \begin{abstract}
46: Solving a system of nonlinear inequalities is an important problem for
47: which conventional numerical analysis has no satisfactory method. With
48: a box-consistency algorithm one can compute a cover for the solution set
49: to arbitrarily close approximation. Because of difficulties in the use
50: of propagation for complex arithmetic expressions, box consistency is
51: computed with interval arithmetic. In this paper we present theorems
52: that support a simple modification of propagation that allows complex
53: arithmetic expressions to be handled efficiently. The version of box
54: consistency that is obtained in this way is stronger than when interval
55: arithmetic is used.
56:
57: \end{abstract}
58:
59: \section{Introduction}
60: One of the most important applications of constraint programming is
61: to solve a system of numeric inequalities:
62:
63: \begin{equation}
64: \label{nonLinSys}
65: \begin{array}{ccccccccc}
66: g_1(x_1&,& x_2 &,& \ldots &,& x_m) & \leq & 0 \\
67: g_2(x_1 &,& x_2 &,& \ldots &,& x_m) & \leq & 0 \\
68: \multicolumn{9}{c}{\dotfill} \\
69: g_k(x_1 &,& x_2 &,& \ldots &,& x_m) & \leq & 0 \\
70: \end{array}
71: \end{equation}
72:
73: Such systems often appear as conditions in optimization problems.
74: Inequalities are regarded as intractable in conventional numerical
75: analysis. The Kuhn-Tucker conditions allow these to be converted
76: to equalities. The continuation method \cite{mrgn87a} is a fairly,
77: but not totally, dependable method for solving such
78: equalities. Moreover, it is restricted to polynomials.
79:
80: An important contribution of constraint programming is the
81: box-consistency method \cite{bmcv94,vhlmyd97}, which improves on the
82: continuation method in several ways. It applies not only to polynomials
83: $g_1, \ldots, g_k$ but to any functions that can be defined by an
84: expression that can be evaluated in interval arithmetic. It computes a
85: cover for the set of solutions and can make it fit arbitrarily closely.
86: In this way, all solutions are found and are approximated as closely as
87: required. The performance of the box-consistency method compares
88: favorably with that of the continuation method \cite{vhlmyd97}.
89:
90: \section{Preliminaries}
91: In this section we provide background by reviewing some basic concepts.
92:
93: \subsection{Constraint satisfaction problems}
94:
95: In a {\em constraint satisfaction problem (CSP)} one has a set of
96: {\em constraints}, each of which is an instance of a formula. Each of the
97: variables in the formula is associated with a {\em domain}, which is
98: the set of values that are possible for the variable concerned. A {\em
99: solution} is a choice of a domain element for each variable that makes
100: all constraints true.
101:
102: With each type of constraint, there is an associated {\em domain
103: reduction operator}\/; DRO for short. This operator may remove from the domains
104: of each of the variables in the constraint certain values that do not
105: satisfy the constraint, given that the other variables of the
106: constraint are restricted to their associated domains.
107: Any DRO is contracting, monotonic, and idempotent.
108:
109: When the DROs of the constraints are applied in a ``fair'' order,
110: the domains converge
111: to a limit or one of the domains becomes empty.
112: A sequence of DROs activations is fair if every one of them occurs
113: an infinite number of times \cite{vnmd97,aptEssence}.
114: The resulting cartesian product of the domains becomes the
115: greatest common fixpoint of the DROs \cite{vnmd97,aptEssence}.
116: If one of the domains becomes empty,
117: it follows that no solutions exist within the initial
118: domains. This, or any variant that leads to the same result, is called
119: a {\em constraint propagation algorithm}.
120:
121: In practice, we are restricted to the domains that are representable in
122: a computer. As there are only a finite number of these,
123: constraint propagation terminates.
124:
125: %A {\em constraint system} has the following components.
126: %\begin{enumerate}
127: %\item
128: %A set $\T = \{T_1, \ldots, T_m\}$ of sets called {\em types}.
129: %
130: %\item
131: %A set $\X = \{x_1, \ldots, x_n\}$ of {\em variables}.
132: %
133: %\item
134: %A {\em typing function} $\tau$: $\X \rightarrow \T$ such that for all
135: %$i\in\{1, \ldots, n\}$, $x_i$ is of type $\tau(x_i)\in \T$.
136: %
137: %\item
138: %A set of {\em constraints} $\C = \{C_1, \ldots, C_m\}$. Each
139: %constraint is an atomic formula of first order predicate logic.
140: %
141: %\item
142: %A finite sequence of {\em domains} $\D = \langle D_1, \ldots, D_n
143: %\rangle$, where $D_i \subseteq \tau(x_i)$ for $i \in \{1, \ldots, n\}$.
144: %
145: %\end{enumerate}
146:
147: %With each constraint $C$, we associate a so-called {\em Domain
148: %Reduction Operator} (DRO for short) that reduces the domain of each
149: %variable involved in $C$ by eliminating values that do not satisfy
150: %$C$. That is, DRO contracts domains by removing inconsistent values.
151:
152: \subsection{Constraint propagation}
153: A {\em Generic Propagation Algorithm} (GPA in the sequel) is a fair
154: sequence of DROs. A GPA maintains a pool of DROs, called {\em active set},
155: that still need to be applied. No order is specified for applying
156: these operators. Even though many variants of GPA exist
157: (see Apt~\cite{aptEssence} and Bartak~\cite{rthpra01}), they are all similar to
158: the pseudo-code given in Figure~\ref{lGPA}. Notice that the active
159: set $A$ is initialized to contain all constraints.
160:
161: \begin{figure}
162: \begin{tabbing}
163: put all constraints into the active set $A$\\
164: while \=( $A \neq \emptyset$) $\{$\\
165: \>choose a constraint $C$ from the active set $A$\\
166: \>apply the DRO associated with $C$\\
167: \> if one of the domains has become empty then stop\\
168: \>add to $A$ all constraints involving variables whose
169: domains have changed, if any\\
170: \>remove $C$ from $A$\\
171: $\}$
172: \end{tabbing}
173: \caption{
174: \label{lGPA}
175: A pseudo-code for GPA.
176: }
177: \end{figure}
178:
179: \subsection{Interval constraint satisfaction problems}
180: The constraint programming paradigm is very general. It applies to
181: domains as different as booleans, integers, finite symbolic domains,
182: and reals. In this paper we consider {\em interval CSPs}, which are
183: CSPs where there is only one type and it is equal to the set
184: $\mathcal{R}$ of real numbers. In such CSPs domains are restricted to
185: intervals, as reviewed below.
186:
187: \subsection{Intervals}
188: A {\em floating-point number} is any element of $F \cup \{-\infty,
189: +\infty\}$,
190: where $F$ is a finite set of reals. A {\em floating-point interval} is
191: a closed connected set of reals, where the bounds, in so far as they exist,
192: are floating-point numbers. When we write ``interval'' without
193: qualification,
194: we mean a floating-point interval.
195: A {\em canonical interval} is a non-empty interval that does not properly
196: contain an interval. For every finite non-empty interval $X$, $lb(X)$ and
197: $rb(X)$ denote the left and right bound of $X$ respectively.
198: For an unbounded $X$, the left or right bound is defined as $-\infty$
199: or $+\infty$, or both.
200: Thus,
201: $ X = [lb(X), rb(X)]$ is a convenient notation for all non-empty intervals,
202: bounded or not.
203:
204: If a real $x$ is not a floating-point number, then there is a unique
205: canonical interval containing it. Otherwise, there are three. Either way,
206: there is a unique least canonical interval containing $x$, and it is
207: denoted $\overline{x}$.
208:
209: A {\em box} is a cartesian product of intervals.
210:
211: \subsection{Box consistency}
212:
213: In \cite{vhlmyd97}, box consistency is computed by a relaxation
214: algorithm implemented in interval arithmetic. The algorithm takes as
215: input certain intervals $X_1, \ldots, X_m$ for the variables $x_1,
216: \ldots, x_m$. It uses each of the functions $g_1, \ldots, g_k$ in the
217: way that is explained by a generic instance that we temporarily call
218: $g$. We assume that the function $g$ is defined by an expression $E$
219: containing no variables other than $x_1, \ldots, x_n$. We call the
220: algorithm in \cite{vhlmyd97} a {\em relaxation algorithm} because it
221: improves the intervals for the variables one at a time while keeping
222: the intervals for all the other variables fixed.
223: This is similar to the relaxation algorithms of numerical analysis.
224:
225: For simplicity of
226: notation, let us assume that the interval for $x_1$ is to be improved
227: on the basis of the fixed intervals $X_2, \ldots, X_m$ for the
228: variables $x_2, \ldots, x_m$. This is done by means of a function
229: $g_{X_2, \ldots, X_m}(x)$ that is defined by evaluating in interval
230: arithmetic the expression $E$ with $\overline{x}$ substituted for $x_1$
231: and $X_2, \ldots, X_m$ substituted for $x_2, \ldots, x_m$,
232: respectively. Thus, $g_{X_2, \ldots, X_m}$ maps a real to an
233: interval.
234:
235: To improve the interval $X_1 = [\lb(X_1),\rb(X_1)]$
236: for $x_1$, suppose that for some $a < \rb(X_1)$ we have
237: that
238: \begin{equation}
239: \label{trial}
240: \lb(g_{X_2, \ldots, X_m}([a,\rb(X_1)])) > 0.
241: \end{equation}
242: In that case the interval for $x_1$ can be improved from
243: $X_1$ to $[\lb(X_1),a]$.
244:
245: A bisection algorithm is used to find the least floating-point $a$ for
246: which (\ref{trial}) holds, for fixed intervals $X_2, \ldots, X_m$. A
247: similar bisection is used to improve the lower bound of $X_1$ using $g$
248: and the fixed intervals $X_2, \ldots, X_m$. This exhausts what can be
249: done with $g$ and $X_2, \ldots, X_m$. In general, repeating this
250: process with the other arguments and with the other functions among
251: $\{g_1,\ldots,g_k\}$ causes reductions of $X_2, \ldots, X_m$ and
252: further reductions of $X_1$.
253:
254: If one of the intervals becomes empty, it is shown that no solution
255: exists within the original intervals $X_1, \ldots, X_m$. Otherwise, the
256: box-consistency algorithm terminates with no interval reduction possible.
257: Let us call the resulting state of the domains
258: {\em functional box consistency}, to
259: distinguish it from the type of box consistency described below.
260:
261: As the criterion for $a$ being an improved upper bound for $X_1$ is
262: (\ref{trial})
263: with the left-hand side
264: evaluated in interval arithmetic, this box consistency algorithm can be
265: improved by means of interval constraints, as was pointed out in
266: \cite{vnmdn01b}. Here it was proposed that instead of such interval
267: arithmetic evaluation, one applies propagation to the interval
268: CSP containing as constraints
269: \begin{eqnarray}
270: g(x_1,\ldots,x_m) & \leq & 0 \nonumber \\
271: x_1 & > & a \\
272: x_2 \in X_2, \ldots, x_m \in X_m & & \nonumber
273: \end{eqnarray}
274: The result is called {\em relational box consistency}. In \cite{vnmdn01b}
275: it is shown that the resulting intervals are contained in those obtained by
276: functional box consistency.
277:
278:
279: To apply propagation, one needs to decompose the arbitrarily complex
280: expression for $g$ into multiple primitive arithmetic constraints
281: ($x+y=z$, $x \times y=z$, as well as those involving trigonometric or logarithmic
282: constraints), as
283: explained in section~\ref{arch}, so that the corresponding efficient
284: DROs can be applied. In this way the structure of $E$
285: is lost. As a result, GPA
286: will activate DROs that have no effect,
287: even though, on eventual termination of GPA, the result is the correct one:
288: the unique and consistent state, or failure.
289:
290: This problem was addressed in \cite{bggp99,vnmdn01b}. The remedy
291: described there is to create a tree data structure for $E$ and perform
292: propagation based on the tree structure. Such a {\em structured
293: propagation} algorithm avoids superfluous activations of DROs by
294: following the tree from the bottom to the top and then from the top to
295: the bottom and to repeat these two traversals as a cycle.
296:
297: In this paper we show that by a simple modification of the GPA one can
298: get the effect of an optimized version of a structured propagation
299: algorithm, yet without maintaining a tree data structure. The downward
300: part of this algorithm is enhanced by the absence of multiple occurrences
301: of variables. In interval arithmetic this would be an unacceptable
302: limitation. However constraint programming allows us to translate
303: multiple occurrences to equality constraints. This may be a welcome
304: improvement compared to the usual way of representing a system such as
305: in Equation~\ref{nonLinSys}.
306:
307: In section~\ref{arch}, we describe our translation of a system such as
308: in Equation~\ref{nonLinSys} to a CSP consisting of primitive
309: constraints.
310:
311: \section{Generating a CSP from a system of nonlinear numerical
312: inequalities}
313: \label{arch}
314:
315: The functions $g_1, \ldots, g_k$ in Equation~\ref{nonLinSys}
316: are defined by expressions that can be evaluated in interval arithmetic
317: and hence can be translated to CSPs containing only primitive
318: constraints. Any of these expressions may have multiple occurrences of
319: some of the variables. As there are certain advantages in avoiding
320: multiple occurrences of variables in the same expression, we rewrite
321: without loss of generality the system in Equation~\ref{nonLinSys} to
322: the system shown in Figure~\ref{singleSys}.
323:
324: \begin{figure}
325: \begin{displaymath}
326: \begin{array}{ccccccccc}
327: g_1(x_1&,& x_2 &,& \ldots &,& x_m) & \leq &0 \\
328: g_2(x_1 &,& x_2 &,& \ldots &,& x_m) & \leq & 0 \\
329: \multicolumn{9}{c}{\dotfill} \\
330: g_k(x_1 &,& x_2 &,& \ldots &,& x_m) & \leq & 0 \\
331:
332: \allEq(v_{1,1}&,& v_{1,2}&,& \ldots&,& v_{1,{n_1}}) && \\
333: \multicolumn{7}{c}{\dotfill} \\
334: \allEq(v_{p,1}&,& v_{p,2}&,& \ldots&,& v_{p,{n_p}}) && \\
335: \end{array}
336: \end{displaymath}
337: \caption{
338: \label{singleSys}
339: A system of non-linear inequalities without multiple occurrences.
340: The variables $\{x_1,\ldots,x_m\}$ are partitioned into equivalence
341: classes
342: $V_1,\ldots,V_p$ where
343: $V_j$ is a subset $\{v_{j,1}, \ldots, v_{j,{n_j}}\}$
344: of $\{x_1,\ldots,x_m\}$,
345: for $j \in \{1,\ldots, p\}$.
346: }
347: \end{figure}
348:
349: In Figure~\ref{singleSys}, the expressions for the functions $g_1,
350: \ldots, g_k$ have no multiple occurrences of variables. As a result,
351: they have up to $m$ rather than $n$ variables, where $m \geq n$. This
352: special form is obtained by associating with each of the variables
353: $x_j$ in Equation~\ref{nonLinSys} an equivalence class of the variables
354: in Figure~\ref{singleSys}. In each expression each occurrence of a
355: variable is replaced by a different element of the corresponding
356: equivalence class. This can be done by making each equivalence class as
357: large as the largest number of multiple occurrences.
358: The predicate $\allEq$ is true if and only if all its real-valued
359: arguments are equal.
360:
361: An advantage of this translation is that evaluation in interval
362: arithmetic of each expression gives the best possible result, namely
363: the range of the function values. At the same time, the $\allEq$
364: constraint is easy to enforce by making all intervals of the variables
365: in the constraint equal to their common intersection. This takes
366: information into account from all $k$ expressions. If the system in
367: its original form~\ref{nonLinSys}, with multiple occurrences, would be
368: translated to a CSP, then only multiple occurrences in a single
369: expression would be exploited at one time.
370:
371: The translation of a complex arithmetic expression to a CSP containing
372: primitive arithmetic constraints is an obvious variant of the procedure
373: that has been familiar since FORTRAN compilers parsed a complex arithmetic
374: expression and generated code from the parse. The CSP variant of this
375: procedure is at least as old as BNR Prolog \cite{BNR88},
376: which was first implemented
377: in the late 1980s. For a formal description of the translation
378: we refer to
379: \cite{vnmdn01b}. We give a brief informal description here.
380:
381: For the purpose of the translation, one regards an
382: expression as a tree with operators as internal
383: nodes and constants or variables as external nodes. We associate with
384: each internal node a unique variable. Each internal node now generates
385: a primitive constraint. For example, if an internal node has ``$/$'' as
386: an operator, $x$ as a variable, and $y$ and $z$ as variables associated
387: with left and right child nodes, respectively, then the ternary
388: constraint $x \times z=y$ is generated.
389:
390: In this way, each expression generates a primitive constraint for each
391: internal node. Let $v$ be the variable associated with the root. As
392: this represents the value of the entire expression, the primitive
393: constraint $v \leq 0$ is generated as well. Because of the absence of
394: multiple occurrences, the partial CSP generated is an acyclic CSP for
395: which local consistency implies global consistency \cite{hyvo94}.
396:
397: Finally, as the $\allEq$ constraints in Figure~\ref{singleSys} do not
398: contain expressions, they need no translation to more primitive
399: constraints: they have the obvious, optimal, and efficient domain
400: reduction operator described earlier.
401:
402: This completes our description of how to translate a system as in
403: Equation~\ref{nonLinSys} to a CSP. To solve it
404: by propagation, we must first
405: consider propagation in a CSP consisting only of primitive constraints
406: generated from the tree of a single expression together with the
407: inequality constraint involving the root variable. This we do in the
408: next section.
409:
410: Before proceeding thus, we point out that
411: translating the system (\ref{singleSys}) to a CSP in the way just described
412: enhances the opportunities for parallelism in propagation beyond those
413: already present in the system (\ref{nonLinSys}).
414: To investigate these would take us beyond the limits of this paper.
415: However, it will be useful here to highlight the structure that gives rise
416: to these opportunities by means of a hardware metaphor.
417:
418: In the first place it is important to note that the sets of
419: constraints arising from the same expression
420: form a cluster for the purposes of propagation. For example, with the
421: exception of the root, the internal variables only have unique
422: occurrences.
423: As a result, when the DRO of a constraint is activated, it usually causes
424: constraints generated by the same expression to be added to the active
425: set. However, the external variables may occur in all of these clusters.
426:
427: For the purposes of a parallel algorithm it is useful to imagine the
428: clusters arising from each of the expression as hardware ``cards'', each
429: connected to a ``bus'', where the lines of the bus represent the external
430: variables in common to several expressions.
431: %In figure~\ref{archfig} we have
432: %sketched such a hardware architecture.
433: %
434: %\begin{figure}[!htbp]
435: %\begin{center}
436: %\epsfxsize=5in
437: %\leavevmode
438: %\epsfbox{arch.eps}
439: %\caption{
440: %\label{archfig}
441: %A hardware architecture for CSP (2).
442: %}
443: %\end{center}
444: %\end{figure}
445: %
446: %The cards have been given a triangular
447: %form to symbolize the fact that they have the structure of expression
448: %trees.
449: Whenever two external variables belong to the same equivalence
450: class, they are connected by a ``jumper'' in the hardware model.
451:
452: The hardware architecture suggests a parallel process for each card
453: that asynchronously executes DROs of constraints only involving
454: internal variables. The processes synchronize when they access one of
455: the bus variables. The DROs of $\allEq$ constraints can also be
456: executed by a parallel process dedicated to each.
457:
458: \section{Modifying propagation for evaluating an expression}
459:
460: We first show that, regardless of efficiency,
461: GPA can be used to evaluate a single expression.
462: Suppose that we have an expression $E$ in variables $x_1,\ldots,x_n$.
463: Let $y$ be the variable at the root of the tree representing
464: the value of $E$.
465: Let $C$ be the CSP generated by $E$ as described before.
466:
467: \begin{theorem}\label{basic}
468: Suppose the domains of $x_1,\ldots,x_n$ are the intervals
469: $X_1,\ldots,X_n$. Suppose the domains of $y$ and the other internal
470: variables are $[-\infty,+\infty]$. Applying the GPA to $C$ results in
471: the domain of $y$ being the same interval as the one obtained by
472: evaluating $E$ in interval arithmetic with $X_1,\ldots,X_n$ substituted
473: for $x_1,\ldots,x_n$, respectively.
474:
475: \end{theorem}
476:
477: {\em Proof.}
478: According to \cite{vnmd97,aptEssence}, every fair
479: sequence of DROs in GPA converges to the same limit
480: for the domains of the variables. There
481: is a finite sequence $s$ of DROs that mimics the evaluation of $E$ in
482: interval arithmetic. At the end of this, $y$ has the value computed by
483: interval arithmetic and GPA terminates.
484:
485: \paragraph{}
486: Theorem~\ref{basic} is useful in showing that, in the absence of
487: information about the value of the expression, propagation does the
488: equivalent of interval arithmetic. But the GPA does it in a wasteful
489: way. GPA does not specify the order of applying the DROs other than
490: that their sequence should be a fair one. In a typical random fair
491: sequence,
492: many DROs will not have any effect. This inefficient
493: behavior is the motivation for our modifications
494: to GPA presented here.
495:
496: \begin{theorem}
497: \label{modEval}
498: Suppose we modify GPA so that the active set is initialized to contain
499: instead of all constraints only those containing at most one internal
500: variable. Suppose also that the active set is a queue in which the
501: constraints are initially ordered according to the level they occupy in
502: the expression tree, with those that are further away from the root
503: placed nearer to the front of the queue. Then GPA terminates after
504: activating the DRO of every constraint at most once. On termination,
505: $y$ has as domain the value that the expression has in interval
506: arithmetic.
507:
508: \end{theorem}
509:
510: Thus we see that GPA has exactly the right behavior for the evaluation
511: of an expression if only we initialize the active set with the right
512: selection of constraints. We call this {\em propagation with selective
513: initialization (PSI)}. In the sequel, the constraints that have at most
514: one internal variable are referred to as {\em peripheral constraints}.
515:
516: \section{Selective initialization for obtaining box consistency}
517:
518: Propagation, whether modified or not, obtains results that are at least
519: as strong, and typically stronger than, box consistency as described in
520: \cite{vhlmyd97}. This can already be demonstrated when considering a
521: single expression $E$ in variables $x_1, \ldots, x_m$ with intervals
522: $X_1, \ldots, X_m$ as domains. A step towards box consistency is to
523: reduce the interval for each of the variables separately. To simplify
524: notation we do this for $x_1$, keeping the interval domains $X_2,
525: \ldots, X_m$ for $x_2, \ldots, x_m$ fixed. Suppose that for some $a <
526: \lb(X_1)$ we have that $\lb(g_1([a,\rb(X_1)],X_2, \ldots, X_m)) > 0$.
527: In that case the interval for $x_1$ can be improved from $X_1$ to
528: $[\lb(X_1),a]$.
529:
530: Suppose that instead of such an interval arithmetic evaluation, one
531: applies propagation to the interval constraint system containing as
532: constraints $x_1 > a$, $x_2 \in X_2, \ldots, x_m \in X_m$, as well as
533: all the ones obtained by translating the expression tree of $E$ to
534: primitive constraints.
535:
536: \begin{theorem} \label{unModBox}
537: Suppose that $\lb(E([a,\rb(X_1)],X_2, \ldots, x_m \in X_m) >0$.
538: When GPA is applied to this CSP, failure results.
539:
540: \end{theorem}
541:
542: {\em Proof.} Consider any fair sequence that starts with a segment $s$
543: mimicking the interval arithmetic evaluation of $E$. At the end of
544: $s$, the interval for $y$ has a positive lower bound, by the
545: assumption. The fair sequence can be continued by applying the DRO for
546: $y \leq 0$. This yields failure.
547:
548: This proves the theorem.
549: If we use GPA in this
550: way for box consistency instead of interval arithmetic, we never obtain
551: a worse result and we typically obtain a better result.
552:
553: However, unmodified GPA will obtain the better result in an inefficient
554: way.
555:
556: Our next result is a modification of GPA that obtains the better result
557: in a more efficient way.
558:
559: \paragraph{}
560:
561: Suppose we have a CSP $S$ generated by an expression $E$. Let
562: $y$ be the variable at the root of the tree representing $E$. Suppose
563: we apply GPA to $S$. After the termination of GPA, we have the following
564: theorem.
565:
566: \begin{theorem}
567: \label{modSolve}
568: Suppose the domain for $y$ is changed to a proper subset of it.
569: Suppose the unique
570: constraint containing $y$ is placed in the active set as only element.
571: Then
572: GPA terminates with the same result as when the active set would have
573: been initialized to contain all constraints.
574: \end{theorem}
575:
576: \begin{proof}
577: Let $s$ be any fair sequence of DROs. If $s$ starts with the unique
578: constraint containing $y$, then the theorem follows. If $s$ starts with
579: a different constraint $c$, then applying the DRO associated with $c$
580: does not affect any domain (DROs are idempotent and the DRO of $c$ is
581: already in its fixpoint). Thus, removing $c$ from $s$ does not affect the
582: fixpoint of $s$. We keep removing the first element of
583: $s$ until we reach the unique constraint containing $y$. The new $s'$
584: formed starts with the unique constraint containing $y$ and has the
585: same fixpoint as $s$. Thus, Theorem~\ref{modSolve} is proved.
586: \end{proof}
587:
588: This theorem shows that a complex constraint of the form $E(x_1,
589: \ldots, x_n) \leq 0$ can be made
590: relationally box consistent by using a modification of GPA that is
591: more efficient without affecting the quality of the result.
592:
593: The result obtained from
594: Theorem~\ref{modSolve} is usually better than
595: backward evaluation \cite{bggp99}. The following
596: example illustrates that.
597:
598: Let us consider the following system.
599: \begin{eqnarray}
600: x_1 / x_2 & \leq & 0 \nonumber \\
601: x_1 \in [-1,1] & & x_2 \in [-1,1] \nonumber
602: \end{eqnarray}
603: Using the decomposition described in section~\ref{arch},
604: we generate the following CSP.
605: \begin{eqnarray}
606: y & \leq & 0 \nonumber\\
607: x_1 / x_2 & = &y \nonumber\\
608: x_1 \in [-1,1], & x_2 \in [-1,1], & y \in [-\infty,+\infty] \nonumber
609: \end{eqnarray}
610:
611: Applying the GPA described in Theorem~\ref{modSolve} gives the
612: fixpoint $[-1,1] \times [-1,1] \times [-\infty,-1]$. The result
613: obtained from interval arithmetic backward evaluation is $[-1,1] \times
614: [-1,1] \times [-\infty, 0]$.
615:
616: Pseudo-code for the PSI algorithm is given in Figure~\ref{PSIAlg}.
617:
618: \begin{figure}
619: \begin{tabbing}
620: put only \textbf{peripheral} constraints into the active set $A$\\
621: while \=( $A \neq \emptyset$) $\{$\\
622: \>choose a constraint $C$ from the active set $A$\\
623: \>apply the DRO associated with $C$\\
624: \> if one of the domains is empty then stop\\
625: \>add to $A$ all constraints involving variables whose
626: domains have changed, if any\\
627: \>remove $C$ from $A$\\
628: $\}$
629: \end{tabbing}
630: \caption{
631: \label{PSIAlg}
632: Pseudo-code for Propagation by Selective Initialization.
633: }
634: \end{figure}
635:
636: In certain situations (fully described in \cite{mdmo03}),
637: Theorem~\ref{modSolveStrong}, stated below, can be used instead
638: of Theorem~\ref{modSolve}.
639:
640: In addition to the assumptions of Theorem~\ref{modSolve},
641: we suppose that the expression $E$ has no multiple occurrences
642: of any variable.
643:
644: \begin{theorem}
645: \label{modSolveStrong}
646: Suppose the domain for $y$ is changed to a proper subset of it.
647: Suppose the unique constraint containing $y$ is placed in the active
648: set as only element. Then GPA terminates after having activated the
649: DRO of each constraint at most once.
650:
651: Moreover, the result is the same as when the active set would have been
652: initialized to contain all constraints.
653: \end{theorem}
654:
655: This theorem is based on the fact that once the fixpoint is obtained,
656: reducing the domain of one variable may cause the other domains
657: to be reduced but not itself. As shown in
658: \cite{mdmo03}, this is true when DROs
659: have certain properties. For example, one could allow domains
660: to be the union of disjoint intervals, as in
661: the systems of Hyv{\"o}nen or Havens \cite{hyvo94,hssjv92}.
662: But when DROs are those described in this paper, reducing the domain of a
663: variable can affect its own domain as shown in the example above. Even
664: though $[-1,1] \times [-1,1] \times [-\infty,+\infty]$ is a fixpoint
665: of the CSP
666: \begin{eqnarray}
667: x_1 / x_2 & = &y \nonumber\\
668: x_1 \in [-1,1], & x_2 \in [-1,1], & y \in [-\infty,+\infty] \nonumber
669: \end{eqnarray}
670: reducing the domain of $y$ to $[-\infty,0]$ leads to a further
671: reduced domain of $y$ that is equal to $[-\infty,-1]$.
672:
673: \section{Conclusion}
674: In this paper, we presented a slight modification to propagation to
675: get the same or better results than structured
676: propagation. Such a modification is used in a box-consistency
677: algorithm to solve systems of non-linear inequalities but
678: it can also be used when solving other CSPs obtained by translating complex
679: expressions.
680: In fact, most CSPs of practical importance seem to be derived from complex
681: expressions.
682:
683: \section*{Acknowledgments}
684: We acknowledge generous support by the
685: University of Victoria, the Natural Science and Engineering Research
686: Council NSERC, the Centrum voor Wiskunde en Informatica CWI, and the
687: Nederlandse Organisatie voor Wetenschappelijk Onderzoek NWO.
688: %\bibliography{sample}
689: %\bibliographystyle{plain}
690: %\bibliography{article,book,collection,proceedings,techreport,thesis,unpublished,misc}
691:
692: \begin{thebibliography}{10}
693:
694: \bibitem{aptEssence}
695: K.R. Apt.
696: \newblock The essence of constraint propagation.
697: \newblock {\em Theoretical Computer Science}, 221(1-2):179--210, 1999.
698:
699: \bibitem{rthpra01}
700: Roman Bartak.
701: \newblock Theory and practice of constraint propagation.
702: \newblock In {\em Proceedings of the 3rd Workshop on Constraint Programming in
703: Decision and Control (CPDC 2001)}, pages 7--14. J. Figwer(Editor), 2001.
704:
705: \bibitem{bmcv94}
706: F.~Benhamou, D.~McAllester, and P.~Van Hentenryck.
707: \newblock {CLP}({I}ntervals) revisited.
708: \newblock In {\em Logic Programming: Proc. 1994 International Symposium}, pages
709: 124--138, 1994.
710:
711: \bibitem{bggp99}
712: Fr\'ed\'eric Benhamou, Fr\'ed\'eric Goualard, Laurent Granvilliers, and
713: Jean-Fran\c{c}ois Puget.
714: \newblock Revising hull and box consistency.
715: \newblock In {\em Proceedings of the 16th International Conference on Logic
716: Programming}, pages 230--244. MIT Press, 1999.
717:
718: \bibitem{BNR88}
719: BNR.
720: \newblock {BNR} {P}rolog user guide and reference manual.
721: \newblock Version 3.1 for Macintosh, 1988.
722:
723: \bibitem{hssjv92}
724: W.S. Havens, S.~Sidebottom, G.~Sidebottom, J.~Jones, and R.~Ovans.
725: \newblock Echidna: A constraint logic programming shell.
726: \newblock Technical report, Simon Fraser University, Canada, 1992.
727:
728: \bibitem{vhlmyd97}
729: Pascal~Van Hentenryck, Laurent Michel, and Yves Deville.
730: \newblock {\em Numerica: A Modeling Language for Global Optimization}.
731: \newblock MIT Press, 1997.
732:
733: \bibitem{hyvo94}
734: E.~Hyv\"onen.
735: \newblock Constraint reasoning based on interval arithmetic: The tolerance
736: propagation approach.
737: \newblock {\em Artificial Intelligence}, 58:71--112, 1992.
738:
739: \bibitem{mrgn87a}
740: A.P. Morgan.
741: \newblock {\em Solving Polynomial Systems Using Continuation for Scientific and
742: Engineering Problems}.
743: \newblock Prentice-Hall, 1987.
744:
745: \bibitem{vnmd97}
746: M.H. van Emden.
747: \newblock Value constraints in the {CLP} {S}cheme.
748: \newblock {\em Constraints}, 2:163--183, 1997.
749:
750: \bibitem{vnmdn01b}
751: M.H. van Emden.
752: \newblock Computing functional and relational box consistency by structured
753: propagation in atomic constraint systems.
754: \newblock In {\em Proc. 6th Annual Workshop of the ERCIM Working Group on
755: Constraints; deposited at CoRR}, 2001.
756:
757: \bibitem{mdmo03}
758: M.H. van Emden and B.~Moa.
759: \newblock Enhancing constraint propagation by selective initialization.
760: \newblock In preparation, 2003.
761:
762: \end{thebibliography}
763: \end{document}
764: