<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Maintaining alternative values in constraint-based con guration</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Caroline Becker</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Helene Fargier</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>IRIT, University</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Constraint programming techniques are widely used to model and solve interactive decision problems, an especially con guration problems. In this type of application, the con gurable product is described by means of a set of constraint bearing on the con guration variables. The user then interactively solves the CSP by assigning (and possibly, relaxing) the con guration variables according to her preferences. The aim of the system is then to keep the domains of the other variables consistent with these choices. Since maintaining of the global inverse consistency is generally not tractable, the domains are instead ltered according to some level of local consistency, e.g. arc-consistency. In the present work, we aim at o ering a more convenient interaction by providing the user with possible alternative values for each of the already assigned variables - i.e. the values that could replace the current one without leading to the violation of some constraint. We thus present the new concept of alternative domains in a (possibly) partially assigned CSP. We propose a propagation algorithm that computes all the alternative domains in a single step. Its worst case complexity is comparable with the one of the naive algorithm that would run a full propagation for each variable, but its experimental e ciency is much better.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The Constraint Satisfaction Problem (CSP) formalism o ers
a powerful framework for representing a great variety of
problems, e.g. routing problems, resource allocation, frequency
assignment, con guration problems, etc. The main task
addressed by the algorithms is the determination of the
consistency of the CSP and/or the search for an (optimal) solution,
and this is a di cult task: determining whether a CSP is
consistent is an NP-complete request. In the CSP community,
the main research stream thus addresses this question, either
directly (looking for e cient complete algorithms) or getting
around (studying the polynomial subclasses or proposing
incomplete algorithms).</p>
      <p>
        But these algorithms do not help solving decision support
problems that are interactive in essence. For such problems,
the user herself is in charge of the choice of values for the
variables and the role of the system is not to solve a CSP,
but to help the user in this task. Constraint-based product
con guration [
        <xref ref-type="bibr" rid="ref12 ref14 ref18 ref19 ref20">14, 18, 12, 19, 20</xref>
        ] is a typical example of such
problems: a con gurable product is de ned by a nite set of
Toulouse
      </p>
      <p>III,</p>
      <p>France,
email:
components, options, or more generally by a set of attributes,
the values of which have to be chosen by the user. These
values must satisfy a nite set of con guration constraints
that encode the feasibility of the product, the compatibility
between components, their availability, etc.</p>
      <p>
        Several extensions of the CSP paradigm have been
proposed in order to handle the constraints-based de nition of a
catalog or a range of products, and more speci cally the
definition of con gurable products. These extensions have been
motivated by di culties and characteristics that are speci c
to the modeling and the handling of catalogs of con gurable
products. Dynamic CSPs [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], for instance suit the problems
where the existence of some optional variables depends on
the value of another variable. Other extensions proposed by
the CSP community include composite CSPs [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], interactive
      </p>
    </sec>
    <sec id="sec-2">
      <title>CSPs [10], hypothesis CSPs [1], generative constraint satis</title>
      <p>
        faction [
        <xref ref-type="bibr" rid="ref19 ref7">19, 7</xref>
        ], etc.
      </p>
      <p>In this article, we do not deal with such representation
problems: we assume that the product range is speci ed by a
classical CSP. Instead, our work focuses on the human-computer
interaction. When con guring a product, the user speci es her
requirements by interactively giving values to variables. Each
time a new choice is made, the domains of the variables must
be pruned so as to ensure that the values available for the
further variables can lead to a feasible product (i.e., a product
satisfying all the initial con guration constraints): the aim of
the system is to keep the domains of the other variables
consistent with these choices. Since the maintaining of the global
inverse consistency is generally not tractable, the domains are
rather ltered according to some level of local consistency, e.g.
arc-consistency. In the present paper, we propose to make this
interaction more user-friendly by showing not only (locally)
consistent domains, but also what we call the alternative
domains of the assigned variables, i.e. the values that could
replace the one of the assigned variable without leading to the
violation of some constraint.</p>
    </sec>
    <sec id="sec-3">
      <title>The structure of the present article is as follows: the prob</title>
      <p>lematics of alternative domains is described in the next
Section. Section 3 then develop the basis of our algorithm. Our
rst experimental results are shown in Section 4. Proofs are
gathered in Appendix.
2</p>
      <sec id="sec-3-1">
        <title>Background and Problematics</title>
        <p>A CSP is classically de ned by a triplet (X ; D; C) where X =
fx1; : : : ; xmg is a nite set of m variables, each xi taking its
values in a nite domain D(xi), and a nite set of constraints
C. We note D = Qjn=1 D(xj ). An assignment t of a set of
variable Y X is an element of the cartesian product of the
domains of these variables; for any xj 2 Y we denote by t[xj ]
the value assigned to xj in t.</p>
        <sec id="sec-3-1-1">
          <title>A constraint C in C involves a set vars(C) X and can be</title>
          <p>viewed as a function from the set of assignments of vars(C)
to f&gt;; ?g: C(t) = &gt; i t satis es the constraint; for any xj in
vars(C) and any v in its domain, we say that an assignment t
of vars(C) is a support of this value (more precisely, of (xj ; v)
on C) i t[xj ] = v and t satis es C.</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>An assignment t of X is a solution of the CSP i it satis es</title>
          <p>all the constraints. If such a solution exists, the CSP is said
to be consistent, otherwise it is inconsistent.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Formally, a con gurable product is represented as a CSP</title>
      <p>
        (X ; D; C) and the current choices of the user by a set of couples
(xi; v) where xi is a variable in X and v the value assigned to
this variable. Following [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the problem can be represented
by an Assumption-based CSP (A-CSP).
      </p>
      <p>De nition 1 (A-CSP) An A-CSP is a 4-uple (X ; D; C; H)
where (X ; D; C) is a CSP and H a nite set of constraints on
variables of X .</p>
      <sec id="sec-4-1">
        <title>In con guration, H represents the set of current user</title>
        <p>choices, i.e. assignments of the variables: we suppose in the
sequel of the paper that all the restrictions in H bear with
different variables and restrict their domain to a unique value2;
we will denote by hi = (xi v) the restriction from H on xi,
if it exists.</p>
        <p>After each choice, the system lters the variables'
domains, ideally leaving only the values compatible with
current choices. Since such a computation is intractable in the
general case, a weaker level of consistency is ensured in real
applications, generally arc-consistency. Recall that a CSP is
said to be arc consistent in the general sense (GAC) i , for
any variable xj 2 X and any value v in its domain, for any
constraint C bearing on xj , there exists an assignment t of
the variables of C in their domains such that t is a support of
(xj ; v). The role of an arc consistency algorithm is to remove
from the domains the values that do not have any support so
as to compute a CSP that is equivalent to the original one
(i.e. having the same set of solution) and that is arc
consistent; this problem is called the closure by arc consistency of
the original one.</p>
        <p>
          Other, more powerful, levels of local consistency can be
ensured, e.g. Path Inverse Consistency [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], Singleton Arc
Consistency [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], k-inverse consistency [
          <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
          ]. In the following de
nitions, we do not make any assumption on the level of local
consistency that is ensured. We simply consider that, after
each choice, an algorithm is called that ensures some level l
of local consistency - i.e. that computes the closure by l
consistency of the original problem. We call the current domain
of a variable its domain in this closure.
        </p>
        <p>De nition 2 (Current domain of a variable) Let l be a
level of local consistency and P = (X ; D; C; H) an A-CSP.
The current domain according to l of a variable xi is its
2 Actually, the de nitions and results could be set in a more
general framework and capture any type of restriction; the meaning
of alternative value when the restrictions in H are not unary is
nevertheless questionable, hence our assumption.
domain in the closure by l-consistency of (X ; D; C [ H) .</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>We can now formally de ne the notion of alternative domain of an assigned variable as the current domain that it would have if the user would take this assignment back:</title>
      <p>De nition 3 (Alternative domain)
Let l be a level of local consistency and P = (X ; D; C; H)
an A-CSP. The alternative domain of a variable xi
according to l is its domain in the closure by l-consistency of the
l
CSP(X ; D; C [ H n fhig). We write it Dalt(xi).</p>
      <p>A value v is thus an alternative value for xi either if it
belongs to the current domain of xi (it is in particular the case
when xi is assigned to v), or if (i) xi is assigned another value
than v and (ii) the single relaxation of this assignment would
make v l-consistent. For instance, if xi is the last assigned
variable, all the values that were in the domain of xi just
before its assignment are alternative values.</p>
      <p>Example 1 Consider the CSP X = fx1; x2; x3g; D = D1
D2 D3 = f1; 2; 3; 4g3; C = fAlldif f (x1; x2; x3)g ; initially,
H = ; and the current domains of the three variables are
DC (x1) = DC (x2) = DC (x3) = f1; 2; 3; 4g. In this example,
we suppose that that arc consistency is maintained.
Let theuser rst assign value 1 to x1. We get H = f(x1 = 1)g
; then DC (x1) = f1g and arc consistency removes value 1
from the current domains of x2 and x3: DC (x2) = DC (x3) =
f2; 3; 4g. At this step, x1 is the only assigned variable and has
three alternative values, 2, 3 and 4.</p>
      <p>Suppose that the user then assigns value 4 to x2, i.e. H =
f(x1 = 1); (x2 = 4)g ; arc consistency, removes 4 from the
current domains of x2 and x3: DC (x2) = DC (x3) = f2; 3g
while DC (x1) = f1g and DC (x2) = f4g . x1 has only two
alternative values left : 2 and 3; 4 is not alternative anymore
since it does not belong to the closure by arc consistency of the
CSP &lt; X = fx1; x2; x3g; D = D1 D2 D3 = f1; 2; 3; 4g3; C =
fAlldif f (x1; x2; x3)[fx2 = 4gg &gt;. x2 has also two alternative
values, 2 and 3 (see Table 1).</p>
      <p>x1
x2
x3
1
?
2
3
4
?</p>
      <p>
        The notion of alternative domain is orthogonal to the
notion of removal's explanation, such as proposed in PaLM [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]:
explanations are a way to explain the pruning of the domains
and aim at proposing a strategy of restoration of some value
for an unassigned variable by the relaxation of a (minimal)
subset of user's choices. On the contrary, the alternative
domain of a variable provides a way to change the value of an
assigned variable without any modi cation of the other user
choices.
      </p>
      <p>
        The notion of alternative domain can be compared to the
concept of fault tolerant solution [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. A fault tolerant
solution is actually a solution such as all the variables have a
non-empty alternative domain: if one of the current value in
the assignment is made unavailable for any reason, a solution
can still be found by choosing a value from its alternative
domain - this value is by de nition compatible with the other
choices. The notion has been generalized by Hebrard et al.
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] under the name "super-solutions". The main di erence
between the notion of fault tolerant solutions and the notion
of alternative domains is that fault tolerant solutions deal
with complete assignments while alternative domains
suggests restoration values for partial assignments also. It should
also be noticed that the two notions target di erent practical
goals: when refereing to a super-solution, the one in looking
for some, but not all, robust (and complete ) solutions - there
is indeed a potentially exponential number of fault tolerant
solutions. When computing alternative domains, we are
looking for all the alternative values, and this even during the
search, when the assignments are partial.
3
      </p>
      <sec id="sec-5-1">
        <title>Computing alternative domains</title>
        <p>When n variables are assigned, a naive way of computing the
alternative domains of these variables is to make n + 1 copies
of the CSP: a reference CSP P0 (where all the n variables
are assigned), and n CSP Pi where each Pi has exactly the
same assignments than P0, with the exception of the
assignment of variable xi. Each Pi is ltered by l-consistency. The
alternative domain of variable xi is obviously the domain of
xi in the arc consistent closure of Pi. This method does not
require much space but does a lot of redundant computations.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>It will be the reference point from our method, which follows the opposite philosophy: memorizing information in order to avoid a duplicate work.</title>
      <p>3.1</p>
      <sec id="sec-6-1">
        <title>Removals and su cient justi cations</title>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>The main idea of our approach is to maintain, for each value</title>
      <p>removed by the ltering algorithm, a vector of boolean ags,
one ag for each hi 2 H. The ag on hi must be true if and
only if the single relaxation of the user's choice hi will lead
to have the value back in the domain of its variable. Let us
formalize:
De nition 4 (Removal, invalid tuple)
Let P = (X ; D; C; H) be an A-CSP and P l the closure of
(X ; D; C [ H) by some level of local consistency l.
A removal w.r.t. a level l of local consistency is a pair (xj ; v),
xj 2 X ; v 2 D(xj ) such that v does not belong to the domain
of xj in P l
We write Rl the set of removals of P w.r.t. l.</p>
      <p>Let C a constraint in C and t an assignment of vars(C)
satisfying C. t is said to be invalid w.r.t. l i there exists
xj 2 vars(C) such that t[xj ] does not belong to domain of xj
in P l; otherwise, it is said to be valid w.r.t. l.</p>
    </sec>
    <sec id="sec-8">
      <title>To improve readability, a removal (xj ; v) will often be written</title>
      <p>(xj 6= v), and we will omit to mention level l to which the
removal refers when not ambiguous.</p>
      <p>De nition 5 (Su cient Justi cation of a removal)
Let P = (X ; Dlt;hCe; Hse)t obef Pa n0sAre-CmSoPva,l laaccolervdeilngoftololc.al
consistency, and R</p>
      <p>An user choice hi 2 H is said to be an l-su cient justi
cation of a removal (xj 6= v) 2 Rl if and only if v belongs to the
domain of xj in the l-consistent closure of (X ; D; C [Hnfhig).</p>
      <p>By extension, for any xj in X and any v in D(xj ), hi 2 H
is said to be an l-su cient justi cation of v for xj if and only
if v belongs to the domain of xj in the l-consistent closure of
(X ; D; C [ H n fhig).</p>
    </sec>
    <sec id="sec-9">
      <title>For instance, if the propagation of the last assignment leads</title>
      <p>to the removal of the value v in the domain of x, this
assignment is a su cient justi cation of x 6= v. By extension, any
hi is a su cient justi cation of a value that does belongs to
the current domain of its variable.</p>
    </sec>
    <sec id="sec-10">
      <title>Example 1 (cont') If we go back to example 1, once x1</title>
      <p>and x2 are assigned, H contains two assumptions: h1 = (x1 =
1) , and h2 = (x2 = 4).</p>
    </sec>
    <sec id="sec-11">
      <title>All the values deleted from the domain of x1 (resp. x2), have</title>
      <p>h1 (resp. h2) as a (sole) su cient justi cation.</p>
    </sec>
    <sec id="sec-12">
      <title>Arc consistency has removed values 1 and 4 from the domains</title>
      <p>of x2 and x3. h1 is a su cent justi cation for the removals
(x2 6= 1) and (x3 6= 1), and h2 a su cient justi cation of
(x2 6= 4) and (x3 6= 4).</p>
    </sec>
    <sec id="sec-13">
      <title>By convention, all the values that are still in the current do</title>
      <p>mains of their variables receive both h1 and h2 as a su cient
justi cations.</p>
    </sec>
    <sec id="sec-14">
      <title>Example 2 A removal may have several su cient justi cations, as shown by the following example. Consider the CSP</title>
      <p>X = fx1; x2; x3; x4g; D = D1 D2 D3 D4 = f1; 2; 3g4;
C = fx1 6= x2; x3 6= x2; x4 6= x2)g. Value 2 for x1 has two
supports on x2 : 1 and 3. Suppose that the user has assigned
value 1 to x3 (h3) and value 3 to x4 (h4); in other terms,
H = f(x3 = 1); (x4 = 3)g. h3 forbidds the rst support
of x1 = 2 and h4 forbids its second support ; value 2 is
thus removed by arc consistency from the current domain
of x1: DC (x1) = f1; 3g and this removal has two su cient
justi cations: h3 and h4.</p>
    </sec>
    <sec id="sec-15">
      <title>Of course, a value belongs v to the alternative domain of</title>
      <p>an assigned variable xi i hi is a su cient justi cation of the
removal (xi 6= v):
Proposition 6 Let P = (X ; D; C; H) be an A-CSP, l a level
of local consistency.</p>
      <p>For any xi 2 X , any v 2 D(xi), v belongs to the alternative
domain of xi i either v belongs to the domain of xi in the
closure by l consistency of P = (X ; D; C [H) or (xi 6= v) 2 Rl
and hi is a su cient justi cation of (xi 6= v).</p>
      <p>The notion of su cient justi cation is extended to tuples
as follows:
removals
t1
?
?
t2
?
?
t3
?
fh1g
fh2g
fh2; h4g
t4
?
?
;
De nition 7 (Su cient justi cation of a tuple)
Let P = (X ; D; C; H) be an A-CSP, l a level of local
consistency, C a constraint in C and t an assignment of vars(C)
satisfying C.</p>
      <p>An user choice hi 2 H is said to be an l- su cient justi
cation for t if and only if, for each xj 2 vars(t), t[xj ] belongs
to the domain of xj in the closure by l consistency of the CSP
(X ; D; C [ H n fhig).</p>
      <p>Example 1 (cont') If we go back to example 1, once
x1 and x2 have been assigned, tupple (3; 2; 4) is not valid
anymore and has one su cient justi cation, h1 (it is enough
to relax x1 = 1 to make this tupple valid again); remark
that tupple (4; 2; 1), that is also invalid, has no su cient
justi cation (the relaxation of the two choices is necessary to
make it valid again).</p>
    </sec>
    <sec id="sec-16">
      <title>Our algorithm is based on the fact that an assignment hi</title>
      <p>is an l-su cient justi cation for the tuple t if and only if, for
each xj involved by the tuple, either t[xj ] is in the current
domain of xj or hi is a su cient justi cation of the removal
(xj 6= t[xj ]). Formally, let us call the con ict set of t the set
of removals that make it invalid:
De nition 8 (Con ict set)
The con ict set of a tuple t w.r.t. some level of l
consistency is the subset of Rl de ned by: CS(t) = f(xi 6= v) 2
Rl s. t. t[xi] = vg.</p>
    </sec>
    <sec id="sec-17">
      <title>Of course, a tuple is invalid if and only if it has a non-empty con ict set.</title>
      <p>Proposition 9 hi is an l-su cient justi cation of a tuple
t if and only it is an l-su cient justi cation of each of the
removals in its con ict set w.r.t. l.</p>
    </sec>
    <sec id="sec-18">
      <title>Finally, it can easily be shown that, when the level local consistency to maintain is generalized arc consistency:</title>
      <p>Proposition 10 hi is a su cient justi cation w.r.t. Arc
consistency (GAC) for a removal (x 6= v) i , for each constraint
C bearing on x, there exists a tuple t support of (x = v) on C
such that hi is GAC-su cient justi cation of t.</p>
      <p>
        Similar properties can be established for other levels of local
consistency based on the notion of support, typically for k
inverse consistency [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]3
3 A CSP is (1; k) consistent i , for each variable x and each value
v in D(x), for each set V of k additional variables, x = v has a
support on V, i.e. there exists an assignment t of fxg [ V such
that for any C 2 C with vars(C) fxg [ V, t satis es C
Proposition 11
      </p>
      <p>hi 2 H is a (1; k)-su cient justi cation of (x 6= v) 2 R(1;k)
i , for each set V of k variables there exists a support t of
x = v on V such as hi is a (1; k)-su cient justi cation of t.
3.2</p>
      <sec id="sec-18-1">
        <title>An algorithm of maintenance of the</title>
        <p>alternative domains w.r.t. Arc</p>
      </sec>
      <sec id="sec-18-2">
        <title>Consistency</title>
      </sec>
    </sec>
    <sec id="sec-19">
      <title>In our application, interactive con guration, the constraint</title>
      <p>to be taken into account are mostly table constraints and the
level of consistency referred to is Generalized Arc Consistency.</p>
    </sec>
    <sec id="sec-20">
      <title>We thus propose to maintain the alternative domain upon</title>
      <p>
        the assignment of a variable using an extension of GAC4 [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
Our algorithm propagates not only value removals, but also
justi cations: for each removal (xi 6= v), we maintain a vector
f(xi6=v) of n boolean ags, one for each choice in H, such that
f(x6=v)(hi) = True if and only if hi is a su cient justi cation
of (xi 6= v). According to Proposition 10, f(x6=v) depends on
the justi cations of the tuples that support (x; v). Hence, we
keep, for each tuple t, a bit vector ft such as, for each hi,
ft[hi] is true i hi is a su cient justi cation of t. Intuitively
(see Table 2 for an example), for the user choice hi to be
a su cient justi cation for a removal (x 6= v) provoked by
constraint C, it is needed that the relaxation of hi makes at
least one support t of (x = v) on C valid again, i.e. that all
the elements in the con ict set of t have hi as a su cient
justi cation (this is the meaning of Proposition 9). In other
words, ft is the intersection of the f(xj6=w) ags of all the
removals (xj 6= w) in the con ict set of t. Formally:
Proposition 12
(X ; D; C) is the original CSP, that is supposed arc
consistent;
for any constraint C 2 C, T able(c) is the set of assignments
of vars(c) that satisfy it. We moreover the tuples involved
in the tables are valid (i.e. T able(c) is a subset of the
cartesian product of the domains of the variables its bears on.
      </p>
    </sec>
    <sec id="sec-21">
      <title>Dc(xi) is the current domain of xi</title>
      <p>Sxi;v;C is the set of supports of (xi; v) on C and</p>
    </sec>
    <sec id="sec-22">
      <title>Cpt(xi; v; C) is the number of supports of (xi; v) on C.</title>
      <p>for any tuple t, ft is its vector of justi cations; for any
removal (xi 6= v) f(xi6=v) is its vector of justi cations; for
any removal (xi 6= v) and any constraint C bearing on xi,
f(xi6=v;C) is the vector of justi cation of (xi 6= v) on C.</p>
      <p>The di erence with GAC4 is that a removal (x 6= v) must
be propagated non only when it is created, but for each change
in its vector of justi cations. Since the updating of the vectors
of justi cation is monotonic (a hi might go from being
sufcient to not, but not the other way around), the algorithm
terminates. More precisely, instead of entering just once in
Q, each removal can enter in the queue n times at most (n
being the number of hi in H), i.e.as much as the number of
possible changes in a vector of justi cations. The worst case
complexity is thus bounded by O(nedk) with e the number of
constraints, m the number of variables, n the maximal
number of assumptions (typically, n = m), d the maximum size
of the domains and k the maximum arity of constraints. It is
thus the same complexity as the GAC-4 based naive method:
n:O(e:dk). With the important di erence that in the naive
method, GAC-4 is called exactly n times while n is a worst
case bound for justi cation-based algorithm.</p>
    </sec>
    <sec id="sec-23">
      <title>Concerning space complexity, GAC4 memorizes the sup</title>
      <p>port Si;v;C for each xi , each value v in its domain and each
constraint C bearing on xi; Let say that this structure is in
O(T ) ( T is actually proportional to the space taken by valid
tuples in constraint tables). Our algorithm also maintains, for
each tuple t, a vector of n ags, meaning a O(T:n) space. For
each removal and each constraint bearing on the variable of
the removal, we also keep a vector of n boolean ags. Since
the number of removals is bounded by the number of
variable/value pairs (xi; v) in the problem, the algorithm involves
in the worst case as many boolean vectors as the number of</p>
    </sec>
    <sec id="sec-24">
      <title>Si;v;C sets used by GAC4; Hence a global a spatial consump</title>
      <p>tion bounded by O(n:T ).</p>
      <p>Procedure Initialize((X ; D; C):CSP; n: integer)
/* (X ; D; C) is the original CSP assumed to be arc consistent */
/* All the tuples are supposed to be valid */
/* n is the maximal number of assumptions to be considered */
begin
foreach C 2 C do
foreach xi 2 vars(C), v 2 D(xi) do</p>
      <p>Cpt(xi; v; C) := 0;
end
end</p>
      <p>Si;v;C = ;
end
foreach t 2 T able(C) do
ft = Truen;
valid(t) = True;
CS(t) = Falsen;
foreach xi 2 vars(C) do</p>
      <p>Cpt(xi; t[xi]; C) + +;</p>
      <p>Add t to Si;t[xi];C
end
end</p>
    </sec>
    <sec id="sec-25">
      <title>Algorithm 1: Initialization</title>
      <sec id="sec-25-1">
        <title>Procedure Propagate( (xk; w): assumption; (X ; D; C): the</title>
        <p>initial CSP; H: the past assumptions; Dc: the current
domains);
Add (xk; w) to H;
Q := ;;
/* The removal of the other values in the current domain of xk is
due to hk */
foreach u 6= w 2 Dc(xk) do
f(xk6=u) Falsem;
f(xk6=u)[hk] True;
end
Add (xk 6= u) to Q;
while Q 6= ; do</p>
        <p>Choose and remove a (xi 6= v) from Q;
if v 2 Dc(xi) then</p>
      </sec>
    </sec>
    <sec id="sec-26">
      <title>Remove v from Dc(xi);</title>
      <p>end
foreach C s.t. xi 2 vars(C) and each tuple t in
Si;v;C do</p>
      <p>M em ft;
ft ft ^ f(xi6=v);
if valid(t) then
foreach xj 2 vars(t) s.t. j 6= i do</p>
      <p>Cpt(xj; t[xj]; C) ;
if Cpt(xj; t[xj]; C) == 0 then
f(xj6=t[xj]);C Falsem /* init; will be
computed later */ ;
Add (xj 6= t[xj]) to Q;
if t[xj] 2 Dc(xj) then</p>
      <p>f(xj6=t[xj]) Truem /* init */ ;
end
end
end
valid(t) = f alse;</p>
      <p>end
end
if M em! = ft /* A justif. of t is not su cient
anymore */ then
foreach xj 2 vars(t) s.t. j 6= i do
mem0 = f(xj6=t[xj]);
f(xj6=t[xj]);C = f(xj6=t[xj]);C _ ft;
fxj6=t[xj] = fxj6=t[xj] ^ fxj6=t[xj];C ;
if mem0 6= f(xj6=t[xj]) then</p>
      <p>Add (xj 6= t[xj]) to Q;
end
end
end</p>
      <p>end
end
end
foreach hi 2 H do</p>
      <p>Dalt(xi) = ;; foreach v 2 Dxi do
if f(xi 6= v)[hi] then</p>
      <p>Add v to Dalt(xi)
end
Algorithm 2: Propagation of decision hk = (xk
w)</p>
      <sec id="sec-26-1">
        <title>First experimental results</title>
      </sec>
    </sec>
    <sec id="sec-27">
      <title>We have tested this algorithm on an industrial prob</title>
      <p>lem of con guration. It involves 32 variables of domain
of size 2 to 10, 35 binary constraints. The product to
con gure is a blowing machine, which blows bottles for
di erent matters. The benchark can be found at url
ftp://ftp.irit.fr/pub/IRIT/ADRIA/PapersFargier/Config/souffleuse.xml.</p>
      <p>The protocol simulates 1000 sessions of con gurations as
follows. First, a sample of 1000 consistent complete
assignments is randomly red. For each of then, the corresponding
session is simulated by assigning the variables following a
random (uniform) order. After each assignment, we measure the
cpu time needed to make the current problem arc-consistent
and to compute the alternative domains of all the already
assigned variables are computed. The whole protocol is
applied by both the justi cation-based algorithm described in
the previous Section and the naive method (that works on as
may copies of the original CSP as the number of user choices
in H, as decribed in introduction of Section 3 ) ; for the shake
of rigor, the two algorithms play on the same assignments and
the same assignment orders.</p>
      <p>Figure 1 presents the result of these experiments. On the
x-axis is the number of the assignment in the sequence; the
y-axis is logarithmic and indicates the mean cpu time need
for the naive method (plain line, with rounds) and for the
justi cation-based algorithm dotted line, with squares.</p>
      <p>The results are quite good: our algorithm is faster as soon
as more than 5 variables are assigned, i.e.when more than</p>
    </sec>
    <sec id="sec-28">
      <title>5 alternative domains are to be computed. As expected, the</title>
      <p>time required by the naive algorithm grows linearly with the
number of variables, while our algorithm has stable
computation time. These rst results have obviously to be con rmed
by more experiments on bigger con guration problems.
5</p>
      <sec id="sec-28-1">
        <title>Conclusion</title>
      </sec>
    </sec>
    <sec id="sec-29">
      <title>In this work, we have coined the new concept of the alternative</title>
      <p>domain of a variable with respect to a local consistency level
and proposed an extension of GAC4 algorithm as a way to
compute the alternative domains when maintaining General</p>
    </sec>
    <sec id="sec-30">
      <title>Arc Consistency on problems involving table constraints.</title>
    </sec>
    <sec id="sec-31">
      <title>Contrarily to the naive method that applies the propaga</title>
      <p>tion algorithm as many times as the number of alternative
domains to be computed, our approach keeps limited justi
cations of the removals. Tested on two industrial benchmarks,
this method quickly outperforms the naive method.</p>
      <p>The main limitation of our method is obviously its space
consumption; the extra space consumption depends directly
of the number of variables for which we want to compute
the alternative domain. This being said, it should be kept in
mind that for practical purposes the system is not asked to
display all the alternative domains; the human user has with
a limited mental capacity and it is not obvious that she can or
even wants to see a lot of alternative domains at a glance. In a
con guration application for instance, the user looks at only
a small number of variable simultaneously, typically the ones
involved in the subcomponent currently being con gured.</p>
      <p>The concepts we have coined are close to the notion of value
restoration. In the current work, we focused on the
computation of alternative domains; an alternative value is a forbidden
value that can be restored by the sole relaxation of the
assignment of its variable. But more generally any value having at
least one su cient justi cation can be restored by the
relaxation of only one assignment. For each value in the domain of
an assigned variable, the user knows whether she can change
her choice to this value without modifying the other choices
this is the notion alternative domain. But the user also knows
something about the values that have been ltered from the
domains of the unassigned variables: the justi cation vector
of such a value provides her with the set of , previous choices
(on other variables) she could relax in order to make the value
available again. Hence the potential use of the algorithm
proposed by this paper to provide the user with alternative values
in a wider sense, and more generally to support the task of
interactive relaxation by providing easily restorable values.</p>
      <p>
        This work has a huge potential for developments and
perspectives. Firstly, our algorithm obviously needs to be
improved, for instance with a lazy implementation, and our
experiments must be completed. Secondly, we should think
about the extension of the maintenance of alternative domain
in CSP with general constraints, and not just in table
constraints ; such an algorithm is not too di cult to conceive for
CSPs involving binary constraints only, but the task seems
much more tricky for general constraints. Finally, we should
be able to consider the whole interaction; for the moment, we
only considered the assignment of a value to a variable: we
need to study the relaxation of choices also. This adaptation
might mean an hybridizing with the maintenance algorithms
of propagation/depropagation in dynamic CSP[
        <xref ref-type="bibr" rid="ref2 ref3 ref6">2, 3, 6</xref>
        ].
      </p>
      <sec id="sec-31-1">
        <title>ACKNOWLEDGEMENTS</title>
      </sec>
    </sec>
    <sec id="sec-32">
      <title>This work is partially funded by the ANR project BR4CP (ANR-11-BS02-008)</title>
      <p>A</p>
      <sec id="sec-32-1">
        <title>Proofs</title>
        <p>[Proof of Proposition 9]
Of course, the proposition holds when t is valid (it has an
empty con ict set). Let us examine the case of an invalid
tuple.</p>
        <p>) Let hi be l-su cient justi cation of an invalid tuple
t and suppose that there exists a removal (x 6= v) in the
con ict set of t such that hi is not a su cient justi cation of
(x 6= v).</p>
        <p>We write Pil the l-consistent closure of (X ; D; C [ H n fhig).</p>
      </sec>
    </sec>
    <sec id="sec-33">
      <title>Since hi is an l-su cient justi cation of t, by de nition, t is</title>
      <p>valid in Pil. Since hi is also not a su cient justi cation of
(x 6= v), v is not in the domain of x in Pil; t is thus invalid in</p>
      <sec id="sec-33-1">
        <title>Pil, which is a contradiction.</title>
        <p>( Reciprocally, let hi be an l-su cient justi cation of
all the removals in the con ict set of t. For each of these
(xj 6= vj ), vj is by de nition in the domain of xj in Pil.
Thus, t is a valid tuple in Pil - by de nition of the notion of
justi cation, hi is thus an l-su cient justi cation of t. 2
[Proof of Proposition 10]
) Let hi be a GAC su cient justi cation of a removal
(x 6= v) . Suppose that there exits a constraint C bearing on
x such that none of the supports of x = v on C admits hi
as a su cient justi cation. This means that these tuples are
not valid in the arc consistent closure of (X ; D; C [ H n fhig)
(denoted PiGAC ). Thus v has no support on C in PiGAC : it
does not belongs to the domain of x in PiGAC ; hi is thus not
a su cient justi cation of (x 6= v) .</p>
        <p>( Reciprocally, consider an assumption hi and suppose
that 8C bearing x, 9t support of x = v such that hi is a
GAC su cient justi cation of t . This means that, for any
constraint bearing on x there exists a support t of x = v valid
in PiGAC ; v thus belongs to the domain of x in PiGAC - by
de nition, this meant that hi is a GAC-su cient justi cation
of (x 6= v). 2
[Proof of Proposition 11]
8(x1; :::; xk); 9(v1; :::; vk) a support of x = v such that hi is a
(1; k)-su cient justi cation of (v1; :::; vk)</p>
        <p>, 8(x1; :::; xk); 9(v1; :::; vk) support of x = v such that any
of the vj belongs to the domain of its variable in the closure
by (1; k)-consistency of (X ; D; C [ H n fhig)</p>
        <p>, v belongs to the domain of x the closure by (1;
k)consistency of (X ; D; C [ H n fhig) (de nition of the 1; k
consistency)
, hi is a justi cation (1; k)-su cient of x 6= v. 2
[Proof of Proposition 12]</p>
      </sec>
    </sec>
    <sec id="sec-34">
      <title>According to Proposition 10, when GAC is ensured</title>
      <p>C;x2vars(C) t2Support(x;v;C)
ft[hi]
For any hi, any x 2 X and any v 2 Dx. I.e.:</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1] Jer^ome Amilhastre, Helene Fargier, and Pierre Marquis, `
          <article-title>Consistency restoration and explanations in dynamic csps application to con guration'</article-title>
          ,
          <source>Arti cial Intelligence</source>
          ,
          <volume>135</volume>
          (
          <issue>1-2</issue>
          ),
          <volume>199</volume>
          {
          <fpage>234</fpage>
          , (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Christian</given-names>
            <surname>Bessiere</surname>
          </string-name>
          , `
          <article-title>Arc-consistency for non-binary dynamic csps'</article-title>
          ,
          <source>in Proceedings of ECAI'92</source>
          , pp.
          <volume>23</volume>
          {
          <fpage>27</fpage>
          , (
          <year>1992</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Romuald</given-names>
            <surname>Debruyne</surname>
          </string-name>
          , `
          <article-title>Arc-consistency in dynamic csps is no more prohibitive'</article-title>
          ,
          <source>in Proceedings of ICTAI'96</source>
          , pp.
          <volume>299</volume>
          {
          <fpage>307</fpage>
          , (
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Romuald</given-names>
            <surname>Debruyne</surname>
          </string-name>
          , `
          <article-title>A property of path inverse consistency leading to an optimal pic algorithm'</article-title>
          ,
          <source>in Proceedings of ECAI'2000</source>
          , pp.
          <volume>88</volume>
          {
          <fpage>92</fpage>
          , (
          <year>2000</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Romuald</given-names>
            <surname>Debruyne</surname>
          </string-name>
          and
          <string-name>
            <given-names>Christian</given-names>
            <surname>Bessiere</surname>
          </string-name>
          , `
          <article-title>Some practicable ltering techniques for the constraint satisfaction problem'</article-title>
          ,
          <source>in Proceedings of IJCAI'97</source>
          , pp.
          <volume>412</volume>
          {
          <fpage>417</fpage>
          , (
          <year>1997</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Romuald</given-names>
            <surname>Debruyne</surname>
          </string-name>
          , Gerard Ferrand, Narendra Jussien, Willy Lesaint, Samir Ouis, and Alexandre Tessier, `
          <article-title>Correctness of constraint retraction algorithms'</article-title>
          ,
          <source>in Proceedings of FLAIRS'03</source>
          , pp.
          <volume>172</volume>
          {
          <fpage>176</fpage>
          , (
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Fleischanderl</surname>
          </string-name>
          , Gerhard Friedrich, Alois Haselbock, Herwig Schreiner, and Markus Stumptner, `
          <article-title>Con guring large systems using generative constraint satisfaction'</article-title>
          ,
          <source>IEEE Intelligent Systems</source>
          ,
          <volume>13</volume>
          (
          <issue>4</issue>
          ),
          <volume>59</volume>
          {
          <fpage>68</fpage>
          , (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Eugene</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Freuder</surname>
          </string-name>
          , `
          <article-title>A su cient condition for backtrackbounded search'</article-title>
          ,
          <source>Journal of the ACM</source>
          ,
          <volume>32</volume>
          (
          <issue>4</issue>
          ),
          <volume>755</volume>
          {
          <fpage>761</fpage>
          , (
          <year>1985</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Eugene</surname>
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Freuder</surname>
          </string-name>
          and
          <string-name>
            <surname>Charles D. Elfe</surname>
          </string-name>
          , `
          <article-title>Neighborhood inverse consistency preprocessing'</article-title>
          ,
          <source>in Proceedings of AAAI'96</source>
          , pp.
          <volume>202</volume>
          {
          <fpage>208</fpage>
          , (
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Ester</given-names>
            <surname>Gelle</surname>
          </string-name>
          and Rainer Weigel, `
          <article-title>Interactive con guration using constraint satisfaction techniques'</article-title>
          ,
          <source>in Proceedings of PACT-96</source>
          , pp.
          <volume>37</volume>
          {
          <fpage>44</fpage>
          , (
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Emmanuel</surname>
            <given-names>Hebrard</given-names>
          </string-name>
          , Brahim Hnich, and Toby Walsh, `
          <article-title>Super solutions in constraint programming'</article-title>
          ,
          <source>in Proceedings of CPAIO'04</source>
          , pp.
          <volume>157</volume>
          {
          <fpage>172</fpage>
          , (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Daniel</given-names>
            <surname>Mailharro</surname>
          </string-name>
          , `
          <article-title>A classi cation and constraint-based framework for con guration', Arti cial Intelligence for Engineering Design, Analysis</article-title>
          and Manufacturing,
          <volume>12</volume>
          , 383{
          <fpage>397</fpage>
          , (
          <year>September 1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>Sanjay</given-names>
            <surname>Mittal</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Falkenhainer</surname>
          </string-name>
          , `
          <article-title>Dynamic constraint satisfaction problems'</article-title>
          ,
          <source>in Proceedings of AAAI'90</source>
          , pp.
          <volume>25</volume>
          {
          <fpage>32</fpage>
          , (
          <year>1990</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Sanjay</given-names>
            <surname>Mittal</surname>
          </string-name>
          and Felix Frayman, `
          <article-title>Towards a generic model of con guraton tasks'</article-title>
          ,
          <source>in Proceedings of the IJCAI'89</source>
          , pp.
          <volume>1395</volume>
          {
          <fpage>1401</fpage>
          , (
          <year>1989</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Roger</given-names>
            <surname>Mohr</surname>
          </string-name>
          and Gerald Masini, `
          <article-title>Good old discrete relaxation'</article-title>
          ,
          <source>in Proceedings of the ECAI'88</source>
          , pp.
          <volume>651</volume>
          {
          <fpage>656</fpage>
          , (
          <year>1988</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Samir</surname>
            <given-names>Ouis</given-names>
          </string-name>
          , Narendra Jussien, and Olivier Lhomme, `
          <article-title>Explications conviviales pour la programmation par contraintes'</article-title>
          , in Actes de JFPLC, pp.
          <volume>105</volume>
          {
          <fpage>118</fpage>
          , (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Daniel</given-names>
            <surname>Sabin</surname>
          </string-name>
          and Eugene C. Freuder, `
          <article-title>Con guration as composite constraint satisfaction'</article-title>
          ,
          <source>in AI and Manufacturing Research Planning Workshop</source>
          , pp.
          <volume>153</volume>
          {
          <fpage>161</fpage>
          , (
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Daniel</given-names>
            <surname>Sabin</surname>
          </string-name>
          and Rainer Weigel, `
          <article-title>Product con guration frameworks | a survey'</article-title>
          ,
          <source>IEEE Intelligent Systems</source>
          ,
          <volume>13</volume>
          (
          <issue>4</issue>
          ),
          <volume>42</volume>
          {
          <fpage>49</fpage>
          , (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Markus</surname>
            <given-names>Stumptner</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Gerhard E.</given-names>
            <surname>Friedrich</surname>
          </string-name>
          , and Alois Haselbock, `
          <article-title>Generative constraint-based con guration of large technical systems'</article-title>
          ,
          <source>AI EDAM</source>
          ,
          <volume>12</volume>
          (
          <issue>04</issue>
          ),
          <volume>307</volume>
          {
          <fpage>320</fpage>
          , (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>Junker</surname>
            <given-names>Ulrich</given-names>
          </string-name>
          , `Con guration',
          <source>in Handbook of Constraint Programming</source>
          ,
          <volume>837</volume>
          {
          <fpage>874</fpage>
          ,
          <string-name>
            <surname>Elsevier</surname>
            <given-names>Science</given-names>
          </string-name>
          , (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>Rainer</given-names>
            <surname>Weigel</surname>
          </string-name>
          and
          <string-name>
            <given-names>Christian</given-names>
            <surname>Bliek</surname>
          </string-name>
          , `
          <article-title>On reformulation of constraint satisfaction problems'</article-title>
          ,
          <source>in Proceedings of ECAI'98</source>
          , pp.
          <volume>254</volume>
          {
          <fpage>258</fpage>
          , (
          <year>1998</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>