Document not found! Please try again

Workshop on Modelling and Solving Problems with Constraints

4 downloads 48398 Views 3MB Size Report
Aug 22, 2004 - Adaptive Consistency AdC is a well-known representative of the decom- position methods. ..... removal of the values in S when an initial AC call has already been executed, ...... job-shop problem) and others may not. ...... involved in the piece is made present (unless already present), and sent home if this is.
Brahim Hnich and Toby Walsh (Editors)

Workshop on Modelling and Solving Problems with Constraints

August 22, 2004

Held in conjunction with the 16th European Conference on Artificial Intelligence (ECAI 2004)

1

Preface Many companies have scheduling, assignment, supply chain and other problems that could be solved with a constraint programming (CP) toolkit. There would be a greater uptake of these tools by industry, especially by small to medium sized enterprises, if the expertise needed to model and solve problems as constraint programs could be reduced. Modelling has been an active research area for a number of years. However, one major problem is that effective modelling often requires trying alternate models and selecting a model and a solver that efficiently solve the problem. Both of these tasks are still an art due to the combinatorial number of choices. In addition, problems are often over-constrained and the user has preferences for which constraints to relax. Finally, whilst much work in algorithm development is for satisfaction problems, many problems met in practice are naturally optimization problems. When given a real-world application, one has to take two major, and closely related decisions: how to model the considered problem, and how to solve the proposed model. Problem modelling cannot be separated from problem solving. Many modelling decisions have a direct impact on the kind of techniques that can be used by the solving method. This ”Workshop on Modelling and Solving Problems with Constraints” provides a forum for researchers who share these goals. The papers in these proceedings present research into many aspects of modelling and solving problems with constraints. This includes non-binary constraints, propagation algorithm, search, reasoning under uncertainty, extensions to the classical framework, and a number of applications. This volume contains 14 papers (of which 11 are to be presented as talks at the workshop). We wish to thank all the authors who submitted papers; our invited speaker; the members of our panel; the members of the programme committee, and the additional reviewers for their help.

Brahim Hnich and Toby Walsh Programme Chairs

2

Program Committee Nicolas Beldiceanu, Ecole des Mines de Nantes, France Christian Bessiere, LIRMM-CNRS, France Mats Carlsson, SICS, Sweden Brahim Hnich, 4C, University College Cork, Ireland Ian P. Gent, University of St. Andrews, UK Jimmy Lee, The Chinese University of Hong Kong, Hong Kong SAR, P.R. China Pedro Meseguer, Institut d’Investigaci´o en Intellig´encia Artificial (IIIA), Spain Ian Miguel, University of York, United Kingdom Michela Milano, DEIS - Universit di Bologna, Italy Jean-Charles Regin, ILOG, France Barbara Smith, University of Huddersfield, United Kingdom Peter Stuckey, University of Melbourne, Astralia Mark Wallace, Monash University, Australia Toby Walsh, 4C, University College Cork, Ireland

Additional Reviewers Chiu Wo Choi, The Chinese University of Hong Kong, Hong Kong SAR, P.R. China Marc von Dongen, University College Cork, Ireland Cormac Gebruers, 4C, University College Cork, Ireland Emmanuel Hebrard, 4C, University College Cork, Ireland Y.C. Law, The Chinese University of Hong Kong, Hong Kong SAR, P.R. China Chavalit Likitvivatanavong, 4C, University College Cork, Ireland Steve Prestwich, University College Cork, Ireland Evgeny Selensky, 4C, University College Cork, Ireland Richard Wallace, 4C, University College Cork, Ireland

3

Sponsoring Organizations CoLogNET, coordinated by Francesca Rossi. Science Foundation Ireland

4

Table of Contents Non-binary constraints and propagation algorithms Adaptive consistency with capacity constraints Javier Larosa and Emma Rollon 8 Theoretical analysis of singleton arc consistency Christian Bessiere and Romauld Debruyne 20

Search Measuring search trees Christian Bessiere, Bruno Zanuttini, and Cesar Fernandez 31 An empirical investigation of value ordering for finding all solutions Barbara Smith and Paula Sturdy 41 Full dynamic interchangeability with forward checking and arc consistency Steve Prestwich 55

Uncertainty Super Solutions for Combinatorial Auctions Alan Holland and Barry OSullivan 85 Modeling uncertain dynamical systems and solving behavioural constraints using probabilistic constraint nets Robert St-Aubin and Alan K. Mackworth 70

Extensions Constrained CP-nets Steve Prestwich, Francesca Rossi, Kristen Brent Venable, and Toby Walsh 101 Solving over-constrained problem with MAX-SAT algorithms Josep Argelich and filip Manya 116 On geometric CSPs with (near)-linear domains and max distance constraints T. K. Satish Kumar 125

5

Applications Towards constraint-based school timetabling Michael Marte 140 Solving the rehearsal problem with planning and model checking Peter Gregory, Alice Miller, and Patrick Prosser 157 Flexible generalized vickrey auctions using constraint programming Alan Holland and Barry OSullivan 172 On generators of random quasigroup problems Roman Bart´ ak 184

6

Non-binary constraints and propagation algorithms

7

Adaptive Consistency with Capacity Constraints Javier Larrosa and Emma Roll´on

?

Universitat Politecnica de Catalunya, Barcelona, Spain, [email protected], [email protected]

Abstract. Capacity constraints are used to bound the use of resources shared by different objects. They arise in a variety of domains such as scheduling and resource allocation problems. Often times they have large arities. Thus, the resulting problems have large induced width which makes decomposition methods infeasible. In this paper we show how to adapt the Adaptive Consistency algorithm to explicitly deal with capacity constraints. In the new algorithm, capacity constraints do not contribute to the complexity of the algorithm by means of their (presumably large) scope, but by means of their number and the arrangement of their scopes. As a result, exponentially expensive problems with classical Adaptive Consistency may become polynomial with the new algorithm.

1

INTRODUCTION

Constraint satisfaction problems (CSP) involve the assignment of domain values to a set of variables, subject to a set of constraints [5, 1]. Many combinatorial problems arising in a variety of domains can be naturally expressed as CSPs. Therefore, effective solving methods for CSPs are of great practical interest. An important class of algorithms for CSP solving are the so-called decomposition methods [7] (also called join-tree and tree-clustering [10]). In the CSP framework, it is usual to think of constraints as black boxes in which the only legal operation is to check if a tuple is permitted. Such approach, which facilitates the development of general algorithms, is arguably one of the key factors in the progress of the area in the last decades. However, sometimes it may be useful to exploit the semantics of the constraints. This is especially true for non-binary constraints where even the most simple operations (e.g. enforcing arc consistency) can be exponentially expensive. Precisely, a popular line of work in the area consists on finding specialized arc-consistency algorithms for particular non-binary constraints.1 In this paper we have the same motivation but in a different context. We consider Adaptive Consistency (AdC) [6], a well known decomposition algorithm for CSP that is based in dynamic programming. It is known that AdC, as well as other decomposition methods, cannot be used in problems with large arity constraints because of its exponential space complexity. However, we show that ? 1

The first author is supported by the REPLI project TIC-2002-04470-C03. This research is conducted under the name of global constraints.

some special type of non-binary constraints can be effectively handled by the algorithm. We consider capacity constraints, which are used to bound the use of finite resources. They occur in a number of applications such as scheduling or flow problems [3]. We introduce a refinement of AdC which deals explicitly with capacity constraints using state-variables. In the new algorithm, it is not the arity of capacity constraints what contributes to the complexity, but their number and the arrangement of their scopes. The application of dynamic programming in problems with capacity constraints has been studied for a long time in the context of so-called knapsack problems [9] and our algorithm applies essentially the same principles. In addition, the idea of introducing state variables to deal with capacity constraints in non-serial dynamic programming (see [2] for basic definitions) has been already suggested in [8]. The contributions of this paper beyond this previous work are: the detailed definition of the algorithm and a finer analysis of its complexity. The structure of the paper is as follows. In Section 2 we provide some notation and preliminary definitions. In Section 3 we introduce a basic form of the new algorithm. In Section 4 we refine the algorithm and analyze its complexity. Finally, in Section 5 we give some conclusions and point out some future lines of work.

2 2.1

PRELIMINARIES Tuples and Relations

Let X = (x1 , . . . , xn ) be an ordered set of variables. Each variable xi is associated with a finite domain Di of potential values. The assignment (i.e, instantiation) of variable xi with v ∈ Di is noted (xi ← v). A tuple is an ordered set of assignments to different variables (xi1 ← vi1 , . . . , xik ← vik ). The set of variables assigned by a tuple t, noted var(t), is called its scope. The size of var(t) is the arity of t. When the scope is clear by the context, we omit the variables and express the tuple as a sequence of domain values vi1 . . . vik . We focus on three basic operations over tuples: The projection of t over A ⊆ var(t), noted t[A] is a sub-tuple of t containing only the instantiation of variables in A. Let t and s be two tuples having the same instantiations to the common variables (i.e, t[var(t) ∩ var(s)] = s[var(t) ∩ var(s)]). Their union, noted t ∪ s, is a new tuple which contains the assignments of both t and s. Their intersection, noted t ∩ s, is the sub-tuple that is common to both t and s. Projecting a tuple t over the empty set t[∅] produces the empty tuple λ. A relation R over S ⊆ X is a set of tuples t such that var(t) = S. The set of variables S is the scope of R and is noted var(R). The size of var(R) is the arity of the relation. We are interested in two operations over relations. The join of two relations R and Q, noted R ./ Q, is defined as {t = r ∪ s| r ∈ R, s ∈ Q}. Projecting variable xi out of R, noted R ↓xi is a new relation defined as {t| ∃v ∈ Di (t ∪ (xi ← v)) ∈ R}. We make the usual assumption that checking whether a tuple is in a relation or not has cost O(1).

Observe that projecting out the only variable of a non-empty unary relation does not produce an empty relation but a relation of arity zero which contains a the empty tuple λ. 2.2

Constraint Satisfaction Problems

A constraint satisfaction problem (CSP) is a triplet P = (X , D, R) which consists of a finite set of variables X , with respective domains D and a set of constrains R. Constraints are relations denoting the variables’ simultaneous legal value assignments. We say that a tuple t satisfies a constraint R, noted SAT(t, R), if var(R) ⊆ var(t) and t[var(R)] ∈ R. A solution of a CSP is an instantiation of all its variables that satisfies all the constraints. In a CSP, the usual task of interest is to find a solution or prove that there is none. Solving a CSP is in general NP-complete. 2.3

Capacity constraints

Capacity constraints arise in problems where some variables represent the potential uses of shared resources. A capacity constraint Ci = (ri , Ki ) with scope var(Ci ) ⊆ X bounds the use of a resource. It is defined by a resource consumption function ri and the resource availability Ki . Let v be a domain value of xj ∈ var(Ci ), then ri (v) is the number of units of the resource that v consumes. An assignment t of all variables in var(Ci ) satisfies the constraint if P v∈t ri (v) ≤ Ki . 2.4

Graph concepts

A CSP can be represented by its constraint graph G = (V, E), which contains one node per variable and one arc connecting any pair of nodes whose variables are included in the scope of some constraint. Let o be an ordering of V . The width of node i subject to o, noted w(o, i) is the number of adjacent of i which are before i in o. The width of G subject to o, noted w(o), is the maximum width among the nodes. The induced graph G∗ (o) is computed as follows: Nodes are processed in reverse order, according to o. When processing node i, edges are added as needed in order to make a clique with all its adjacent which are still unprocessed. The width of the induced graph is called the induced width and is noted w∗ (o) [5]. Example 1 Consider a problem with four variables (x1 , x2 , x3 , x4 ), three values per domain Di = {a, b, c} and three constraints (R =”x2 and x4 must be different”, S =”x2 and x3 must be equal”, Q =”x1 and x2 must be equal”). The problem has several solutions. Two of them are: aaab and cccb. Figure 1.a depicts its constraint graph G. The induced graph G∗ (o) along ordering o = (x1 , x2 , x3 , x4 ) is the same, since no new edges are added. The induced width w∗ (o) is 1. The induced graph G∗ (o) along ordering o = (x4 , x3 , x2 , x1 )

X4

X3

X4

X3

X2

X2

X1

X1

a)

b)

Fig. 1. Two constraint graphs

has a new edge between x3 and x4 , added when processing x2 . The induced width w∗ (o) is 2, because when processing x2 it has two still-unprocessed adjacent nodes (x3 and x4 ). Consider now that we add to the problem three capacity constraints, whose parameters are detailed in the following table: a b c Ki var(Ci ) C1 1 4 3 14 x1 , x2 , x3 , x4 C2 6 5 5 10 x2 , x4 C3 6 4 5 10 x2 , x3 The assignment aaab is not a solution anymore, because it does not satisfy C3 . The assignment cccb remains being a solution. Figure 1.b depicts the new constraint graph, taking into account the capacity constraints. The graph is a clique because C1 has all the variables in its scope. No matter what ordering among variables is used, the induced width is 3. 2.5

Adaptive consistency

Algorithms for CSP can be roughly divided into search and decomposition methods. Adaptive Consistency AdC is a well-known representative of the decomposition methods. It solves a CSP by a sequence of problem reductions.2 At each step, one variable is eliminated by replacing it with a new constraint that summarizes its effect. Figure 2 contains an algorithmic description of AdC. It assumes the lexicographical ordering o = (x1 , x2 , . . . , xn ). It works in two phases. The first phase performs the elimination of the variables in reverse order xn , xn−1 , . . . , x1 . The elimination of xi is performed as follows: First, all constraints having xi in their scope are recorded in Bi , the so-called bucket of xi . Next, a new relation Ri is computed by joining all relations in Bi and subsequently projecting out xi . The new relation Ri replaces the bucket Bi in the set of constraints. Note that, by construction, Ri does not contain xi in its scope. Besides, all constraints referring to xi were put into the bucket. Therefore, after the replacement, all reference to xi has disappeared from the current set of constraints R. If Ri is empty at any 2

AdC is an instantiation of a more general algorithm called Bucket Elimination [4, 2]

iteration, the original problem has no solution, and AdC returns NIL. If all variables are successfully eliminated, the problem has at least one solution, which is retrieved in the second phase. The second phase considers variables in the order given by o (i.e, the opposite order in which they were eliminated). Each variable xi is assigned with an arbitrary value v ∈ Di consistent with previous assignments (i.e, t = ((x1 ← v1 ), . . . , (xi−1 ← vi−1 ))) and bucket Bi . At least, one such value must exist, because by construction t satisfies Ri = (1R∈Bi R) ↓xi . The time and space complexity of BE is exponential in the problem induced width w∗ (o). The correctness of AdC is based in the fact that, after the elimination of xi , any assignment to x1 , . . . , xi−1 which satisfies R can be successfully extended to the remaining variables xi , . . . , xn . function AdC(X , D, R) 1. for each i = n . . . 1 do 2. Bi := {R ∈ R | xi ∈ var(R)}; 3. Ri := (1R∈Bi R) ↓xi ; 4. if Ri = ∅ then return NIL; 5. R := R ∪ {Ri } − Bi ; 6. endfor 7. t := λ 8. for each i = 1 . . . n do 9. select v ∈ Di s.t. SAT(t ∪ (xi ← v), 1R∈Bi R); 10. t := t ∪ (xi ← v) 11. endfor return t; endfunction

Fig. 2. Adaptive Consistency. X , D, R is the CSP instance to be solved. It returns a solution t (NIL if there is none).

3

Adapting AdC to Deal with Capacity Constraints

Capacity constraints with large scopes produce large sub-cliques in constraint graphs which renders AdC infeasible. Fortunately, it is possible to circumvent this problem by dealing explicitly with this type of constraints. The idea is that we remove the set of capacity constraints from the input of the algorithm and add a set of state-variables which keep track through the variable elimination process of the amount of resources that have been consumed. Consider a CSP P = (X , D, R ∪ C) where the set of constraints is partitioned into general constraints R and capacity constraints C = {C1 , . . . , Ce }. We introduce a set Y = (y1 , . . . , ye ) of state-variables. There is a variable yi for each

capacity constraint Ci . Variable yi will be used to remember the number of units of resource i that have been consumed before reaching the current state. Thus, the domain of yi is the set {0, 1, . . . , Ki }. We will use y to denote an instantiation of the state variables. y ≤ y 0 is the usual partial order. y + y 0 is the usual component-by-component sum. We extend standard relations adding to each tuple an assignment to the state-variables. Thus, relation R is a set of pairs (t, y). The scope of R, var(R) is the subset of X to which tuples assign values. The intuition behind (t, y) is that y indicates the amount of the resource used in the history of t. More precisely, y indicates the resource consumption of those values that have been projected out of t. We say that (t, y) dominates (t0 , y 0 ) if t = t0 and y ≤ y 0 . The intuition is that (t, y) is better than (t0 , y 0 ) because both represent the same assignment but (t, y) has more availability of the resource. As we will see next, by construction, extended relations never have pairs of elements such that one dominates another. Standard operations over relations are extended as follows: Let R, Q be two extended relations. Their join R ./ Q is defined as, {(t, y)| t = t0 ∪ t00 , y = y 0 + y 00 , (t0 , y 0 ) ∈ R, (t00 , y 00 ) ∈ Q, y ≤ (K1 , · · · , Ke ), nondominated(t, y)} The idea is that the new relation accumulates the resource that has been independently used by the two relations. Projecting a variable xi out of R, noted R ↓xi is {(t, y)| (t ∪ (xi ← v), y 0 ) ∈ R, y ≤ (K1 , · · · , Ke ), nondominated(t, y)} where yj = yj0 + rj (v) if xi ∈ var(Cj ), and yj = yj0 otherwise. This operation accumulates over y the amount of the resource that is used by the value that is eliminated. Observe that projecting out the only variable of a unary relation produces either the empty set or a set of (λ, y) pairs. After the extension of the basic definitions, the extension of AdC is quite direct. The new algorithm, AdC-CC, is given in Figure 3. We discuss the main differences. First of all, capacity constraints must be explicitely given in the set C, so that they can be explicitly processed. Besides, constraints in R must be trivially augmented by replacing their tuples t by pairs (t, (0, · · · , 0)). The first phase works exactly like in standard AdC, with the only exception that augmented relations are used, instead of simple ones. Let (t, y) be an element of the augmented relation Ri computed during the elimination of xi . By construction, tuple t can be consistently extended to the eliminated variables xi , xi+1 , . . . , xn with a consumption of the resources expressed by y. The second phase is also very similar to standard AdC. Tuple t is extended from the empty set to a complete assignment, by considering one variable at each step. Variable P q contains the resources P left by the values already assigned by t (i.e, q = (K1 − v∈t r1 (v), . . . , Ke − v∈t re (v))). Thus, initially, t = λ and q = (K1 , . . . , Ke ). We say that (t, q) satisfies a constraint R, noted SAT(t, q, R), if var(R) ⊆ var(t) and there is a y 0 such that (t[var(R)], y 0 ) ∈ R and y 0 ≤ q.

function AdC-CC(X , D, R ∪ C) 1. for each i = n . . . 1 do 2. Bi := {R ∈ R | xi ∈ var(R)}; 3. Ri := (1R∈Bi R) ↓xi ; 4. if Ri = ∅ then return NIL; 5. R := R ∪ {Ri } − Bi ; 6. endfor 7. t := λ; q := (K1 , . . . , Ke ); 8. for each i = 1 . . . n do 9. select v ∈ Di s.t. SAT((t ∪ (xi ← v), q − (r1 (v), . . . , re (v))), 1R∈Bi R); 10. t := t ∪ (xi ← v); q := q − (r1 (v), . . . , re (v)); 11. endfor return t; endfunction

Fig. 3. Adaptive Consistency with Capacity Constraints. X , D, R ∪ C is the CSP instance to be solved, where C is a set of e capacity constraints. It returns a solution t (NIL if there is none).

In words, there is a tuple in R consistent with t which can be extended to a complete assignment using the resources left by t. Tuple t is augmented to one new variable step by step. When extending t to variable xi , a satisfying value v is selected. Value v must produce a consistent extension with respect to the relevant constraints but, in addition, it must left sufficient resources for the remaining variables. Such fact is encoded in line 9. Example 2 Consider the problem instance of Example 1 with three general constraints and three capacity constraints. The trace of the algorithm under lexicographical ordering is: – Input: the algorithm receives the three trivially extended constraints R = {(ab, (0, 0, 0)), (ac, (0, 0, 0)), (ba, (0, 0, 0)), (bc, (0, 0, 0)), (ca, (0, 0, 0)), (cb, (0, 0, 0))} S = {(aa, (0, 0, 0)), (bb, (0, 0, 0)), (cc, (0, 0, 0))} Q = {(aa, (0, 0, 0)), (bb, (0, 0, 0), (cc, (0, 0, 0))} – Elimination of x4 : B4 = {R} Projecting x4 out of R produces, R ↓ x4 = {(a, (3, 5, 0)), (b, (1, 6, 0)), (b, (3, 5, 0)), (c, (1, 6, 0)), (c, (4, 5, 0))} Note that (a, (4, 5, 0)) is not a valid assignment of the projection as it is dominated by (a, (3, 5, 0)).

– Elimination of x3 : B3 = {S} Projecting x3 out of S produces, S ↓ x3 = {(a, (1, 0, 6)), (b, (4, 0, 4)), (c, (3, 0, 5))} – Elimination of x2 : B2 = {R ↓ x4 , S ↓ x3 , Q} The join of the relations is, R ↓ x4 ./ S ↓ x3 ./ Q = = {(aa, (4, 5, 6)), (bb, (5, 6, 4)), (bb, (7, 5, 4)), (cc(4, 6, 5)), (cc, (7, 5, 5))} Projecting x2 out of it produces, (R ↓ x4 ./ S ↓ x3 ./ Q) ↓ x2 = {(b, (11, 10, 8)), (c, (10, 10, 10))} – Elimination of x1 : B1 = {R ↓ x4 ./ S ↓ x3 ./ Q) ↓ x2 } Projecting x1 out of it produces, {(λ, (13, 10, 10))} Note that {(λ, (15, 10, 8))} is not a valid solution as its first resource consumption is higher than the resource availability. Since the resulting relation is not empty, the problem has a solution which can be retrieved as follows: – Initially, t = λ, and q = (14, 10, 10) – Variable x1 assignment: There are three values for x1 , t = (x1 ← a), q = (13, 10, 10) t = (x1 ← b), q = (10, 10, 10) t = (x1 ← c), q = (11, 10, 10) Only value c satisfies the join of relations in B1 ({(b, (11, 10, 8)), (c, (10, 10, 10))}), so t is updated to (x1 ← c) and q to (11, 10, 10). – Variable x2 assignment: There are three values for x2 , t = (x1 ← c, x2 ← a), q = (10, 4, 4) t = (x1 ← c, x2 ← b), q = (7, 5, 6) t = (x1 ← c, x2 ← c), q = (8, 5, 5) Only value c satisfies the join of relations in B2 {(aa, (4, 5, 6)), (bb, (5, 6, 4)), (bb, (7, 5, 4)), (cc(4, 6, 5)), (cc, (7, 5, 5))} so t is updated to (x1 ← c, x2 ← c) and q to (8, 5, 5).

– Variable x3 assignment: There are three values for x3 , t = (x1 ← c, x2 ← c, x3 ← a), q = (7, 5, −1) t = (x1 ← c, x2 ← c, x3 ← b), q = (4, 5, 1) t = (x1 ← c, x2 ← c, x3 ← c), q = (5, 5, 0) Only value c satisfies the join of relations in B3 ({(aa, (0, 0, 0)), (bb, (0, 0, 0)), (cc, (0, 0, 0))}), so t is updated to (x1 ← c, x2 ← c, x3 ← c) and q to (5, 5, 0). – Variable x4 assignment: There are three values for x4 , t = (x1 ← c, x2 ← c, x3 ← c, x4 ← a), q = (4, −1, 0) t = (x1 ← c, x2 ← c, x3 ← c, x4 ← b), q = (1, 0, 0) t = (x1 ← c, x2 ← c, x3 ← c, x4 ← c), q = (2, 0, 0) Only value b satisfies the join of relations in B4 {(ab, (0, 0, 0)), (ac, (0, 0, 0)), (ba, (0, 0, 0)), (bc, (0, 0, 0)), (ca, (0, 0, 0)), (cb, (0, 0, 0))} so t is updated to (x1 ← c, x2 ← c, x3 ← c, x4 ← b) and q to (1, 0, 0). Therefore, one solution is (x1 ← c, x2 ← c, x3 ← c, x4 ← b). The following theorem establishes the complexity of the algorithm. Observe that the mentioned induced width refers to the constraint graph without the capacity constraints. Theorem 1. The new algorithm is time and space O(exp(w∗ (o) + e − 1)), where o is the variable ordering used, w∗ (o) is the corresponding constraint graph induced width (disregarding capacity constraints) and e is the number of capacity constraints. Proof 1 Let R be an arbitrary extended relation. Observe that its cardinality is |R| = O(exp(|var(R)| + e − 1)) because: there are O(exp(|var(R)|) different instantiations of the problem variables and, for each instantiation, there may be up to O(exp(e − 1)) undominated instantiations of the state variables. Since the arity of the largest relation that the algorithm needs to process is bounded by O(w∗ ), the complexity clearly holds. To illustrate the potential of the algorithm consider a problem with a single capacity constraint including all the variables in its scope. Suppose that the problem constraint graph disregarding the capacity constraint is a tree. The complexity of standard AdC is O(exp(n)) because the scope of the capacity constraint must be considered in the constraint graph, which becomes a clique. However, the complexity of the new algorithm is O(exp(1)) because trees have induced width w∗ (o) = 1 and e = 1.

4

Refining the Algorithm

The algorithm presented in the previous Section has an important source of inefficiency: the additional complexity given by state variables may be unnecessarily propagated along the whole algorithm. The following example illustrates this situation. Example 3 Consider a problem with n variables and common domains Di = {v1 , . . . , vd }. Suppose that xn appears in the scope of three constraints: one dummy constraint R between xn and xn−1 which permits all the pairs of assignments (i.e, universal constraint) and two dummy unary capacity constraints with the same bound K1 = K2 = d + 1 and resource consumption functions r1 (vj ) = j and r2 (vj ) = d − j + 1. The elimination of xn from R produces constraint Rn = {(v1 , (1, d)), (v1 , (2, d − 1)), . . . , (v1 , (d, 1)), (v2 , (1, d)), (v2 , (2, d − 1)), . . . , (v2 , (d, 1)), ... (vd , (1, d)), (vd , (2, d − 1)), . . . , (vd , (d, 1))} Observe that Rn has d2 elements: d different tuples, each one repeated d times (one time for each different configuration of the state variables). After the elimination of xn the capacity constraints do not play any role in the solving process (they will never be modified again) because their scope has already been processed. However, they will increase the size of new relations by a factor of d and, consequently, the complexity of the algorithm. Each capacity constraints may unnecessarily add a multiplicative factor to the algorithm complexity if its state variable is propagate further than necessary. To circumvent such situation we must be able to identify at which point a state variable stops being useful in order to deactivate it. Given a CSP, an ordering o of its nodes and its induced graph G∗ (o), H(o, i) is a set of nodes. Node i always belongs to H(o, i). The remaining nodes are computed processing the nodes of the induced graph G∗ (o) in reverse order. When processing node i, its H(o, i) is added to H(o, j) where j is the closer, but still unprocessed adjacent of i. Intuitively, H(o, i) contains the indices of the variables with information sent to bucket Bi . When the scope of a capacity constraint Cj is completely included in H(o, i), it means that Cj has been completely processed. All tuples in the relation Ri have satisfied the capacity constraint. Thus, it is useless to propagate the information given by yj . Grounding a relation Ri , GR(Ri ), is the operation of setting to 0 all the state-variables that need not to be propagated. It is defined as, GR(Ri ) = {(t, y)| (t, y 0 ) ∈ Ri , nondominated(t, y)} where y is defined as follows: if var(Cj ) ⊆ H(o, i) then yj = 0, else yj = yj0 .

Grounding relation Rn after the elimination of xn in the problem of Example 3 would produce, {(v1 , (0, 0)), (v2 , (0, 0)), . . . , (vd , (0, 0))} Since duplicated elements are not kept, the relation constains d elements. With the new definitions, the refinement of the algorithm is direct. Respect the description of AdC given in Figure 3, only one new line must be inserted, 3.5 Ri := GR(Ri ); which performs the deactivation of unnecessary state-variables. Using H(o, i), it is possible to characterize the number of active state variables after the elimination of variable xi as, z(o, i) = |{Cj | var(Cj ) ∩ H(o, i), var(Cj ) 6⊆ H(o, i)}| Therefore, relation Ri , computed during the elimination of variable xi , has arity w∗ (o, i). Besides, there are z(o, i) active state variables. Therefore, the cardinality of Ri is O(exp(w∗ (o, i) + z(o, i) − 1)). The largest relation computed by the algorithm is the one that maximizes such expression. Thus, let wz(o) be maxi {w∗ (o, i) + z(o, i)}. It characterizes the complexity of the algorithm. Theorem 2. The complexity of the refined algorithm is O(exp(wz(o) − 1)) The following example illustrates the potential of this refinement. Example 4 Consider a problem where the set of variables is X = {xi,j } (i, j = 1..N ) which form a bidimensional arrangement. Let o be the lexicographical ordering (i.e, variables are ordered from left to right and from bottom to top). Let R be a set of arbitrary constraints producing a constraint graph G and an induced width w∗ (o). Consider now a set of capacity constraints C such that there is one capacity constraint per row of variables and one per column. Since the number of capacity constraints is 2 · N , the algorithm AdC-CC presented in Figure 3 has complexity O(exp(w∗ (o) + 2 · N − 1)), while the refined algorithm has complexity O(exp(w∗ (o) + N − 1)). The reason being that, under the variable ordering o, row capacity constraints are processed sequentially, one at the time. Their effect in the algorithm complexity is never combined.

5

CONCLUSION AND FUTURE WORK

A naive application of adaptive consistency to problems with capacity constraints is infeasible due to the high time and space complexity of the algorithm. In this paper we have shown how to adapt AdC to efficiently handle large arity capacity constraints. The idea is not to handle them as generic constraints, but treat them explicitly, exploiting their semantics. This is achieved by means of state-variables which remember the consumption of resources at previous steps of the algorithm. Although this method has already been used in the past in the

context of so-called knapsack problems, we integrate it for the first time with AdC. Besides, we refine the algorithm to improve its complexity when dealing with non-overlapping capacity constraints. The extension of our ideas to the more general schemas of bucket elimination [4] or tree-decomposition [10] remains as future work, as well as the identification of other non-binary constraints for which similar techniques can be applied.

References 1. K. Apt. Principles of Constraint Programming. Cambridge University Press, Cambridge, 2003. 2. U. Bertele and F. Brioschi. Nonserial Dynamic Programming. Academic Press, 1972. 3. T.H. Cormen, C.E. Leiserson, and R.L. Rivest. Introduction to Algorithms. MIT Press, 1990. 4. R. Dechter. Bucket elimination: A unifying framework for reasoning. Artificial Intelligence, 113:41–85, 1999. 5. R. Dechter. Constraint Processing. Morgan Kaufmann, San Francisco, 2003. 6. R. Dechter and J. Pearl. Tree clustering for constraint networks. Artificial Intelligence, 38:353–366, 1989. 7. G. Gottlob, N. Leone, and F. Scarcello. A comparison of structural csp decomposition methods. Artificial Intelligence, 124(2):243–282, 2000. 8. J. Hooker. Logic-based Methods for Optimization. John Wiley and Sons, New York, 2000. 9. S. Martello and P. Toth. Knapsack Problems: Algorithms and Computer Implementations. John Wiley and Sons, 1990. 10. J. Pearl. Probabilistic Inference in Intelligent Systems. Networks of Plausible Inference. Morgan Kaufmann, San Mateo, CA, 1988.

Theoretical Analysis of Singleton Arc Consistency Christian Bessiere1 and Romuald Debruyne2 1

2

LIRMM-CNRS, 161 rue Ada F-34392 Montpellier Cedex 5 [email protected] ´ Ecole des Mines de Nantes, 4 rue Alfred Kastler, F-44307 Nantes Cedex 3 [email protected]

Abstract. Singleton arc consistency (SAC) is a local consistency that enhances the pruning capability of arc consistency by ensuring that the network can be made arc consistent after any assignment of a value to a variable. While some algorithms have been proposed in the literature to enforce SAC, a more in-depth theoretical analysis of this local consistency has never been published. In this paper, we give a lower bound to the time complexity of enforcing SAC, and we propose an algorithm that achieves this complexity, thus being optimal. We characterize some properties of SAC which are unusual for a local consistency. Based on some of these properties, we extend SAC to a more powerful local consistency that we compare to the existing local consistencies.

1

Introduction

Ensuring that a given local consistency does not lead to a failure when we enforce it after having assigned a variable to a value is a common idea in constraint solving. It has been applied (sometimes under the name ’shaving’) in constraint problems with numerical domains by limiting the assignments to bounds in the domains and ensuring that bounds consistency does not fail [11]. In SAT, it has been used as a way to compute more accurate heuristics for DPLL [9, 12]. Finally, in constraint satisfaction problems (CSPs), it has been proposed and studied under the name Singleton Arc Consistency (SAC) in [7]. In [15], some additional results on the pruning efficiency of SAC and an empirical study on using SAC during a preprocessing step were presented. Some nice properties give to SAC a real advantage over the other local consistencies enhancing the ubiquitous arc consistency. Its definition is much simpler than restricted path consistency [3], max-restricted-path consistency [6], or other exotic local consistencies, and its operational semantics can be understood by a non-completely-expert of the field. Enforcing it only removes values in domains, and thus does not change the structure of the problem, as opposed to path consistency [14], k-consistency [10], etc. Finally, implementing it can be done simply on top of any AC algorithm. Algorithms for SAC have been proposed in [7] and [1]. However, singleton arc consistency lacks a careful analysis of its theoretical properties.

In this paper, we study the complexity of enforcing SAC and then propose an algorithm enforcing SAC with that optimal worst-case time complexity. Afterwards, we characterize some of the basic properties that local consistencies usually satisfy, and SAC does not. We show that a slight change in the definition leads to a stronger level of consistency that we compare to existing ones.

2

Preliminaries

A finite constraint network P consists of a finite set of n variables X = {i, j, . . .}, a set of domains D = {Di , Dj , . . .}, where the domain Di is the finite set of values that variable i can take, and a set of constraints C = {c1 , . . . , cm }. Each constraint ci is defined by the ordered set var(ci ) of the variables it involves, and a set sol(ci ) of allowed combinations of values. An assignment of values to the variables in var(ci ) satisfies ci if it belongs to sol(ci ). A solution to a constraint network is an assignment of a value from its domain to each variable such that every constraint in the network is satisfied. We will use cij to refer to sol(c) when var(c) = (i, j). Φ(P ) denotes the network obtained after enforcing Φ-consistency on P . Definition 1 A constraint network P = (X, D, C) is said to be Φ-inconsistent iff Φ(P ) has some empty domains or empty constraints. Definition 2 A constraint network P = (X, D, C) is singleton arc consistent iff ∀i ∈ X, ∀a ∈ Di , the network P |i=a obtained by replacing Di by the singleton {a} is not arc inconsistent.

3

Complexity of SAC

Singleton arc consistency (SAC) was presented in [7]. In the same paper, a brute force algorithm for achieving SAC was proposed. Its time complexity is O(en2 d4 ). But it is not optimal. Theorem 1 The best time complexity we can expect from an algorithm enforcing SAC is in O(end3 ). Proof. Let P be a strongly path consistent network. Verifying if it is path consistent (PC) is in O(end3 ). For each pair of variables (i, j), we must check whether the triangles i, k, j with Ckj ∈ C are path consistent. (Checking the other triangles is useless.) Then, e · n triangles are checked for path consistency. Each such test is in O(d3 ), and is done only once since the network is already path consistent (by assumption). Thus the complexity is O(end3 ). Now, if we look at the PC algorithm given in [13], we see that this algorithm is nothing more than a SAC algorithm that removes a pair (a, b) from Cij each time a value (j, b) is found arc inconsistent in a subnetwork P |i=a ), and propagates the consequences. At the end of this process, P is path consistent. Now, by assumption, our network is already PC. Thus, applying the regular SAC (not removing the pairs) is sufficient to detect the path consistency of P . u t

4

An optimal algorithm for SAC

SAC1 [7] has no data structure storing on which values rely the SAC consistency of each value. After a value removal, SAC1 must check again the SAC consistency of all the other values. SAC2 [1] uses the fact that if we know that AC does not lead to a wipe out in P |i=a then the SAC consistency of (i, a) holds as long as all the values in AC(P |i = a) are in the domain. After the removal of a value (j, b), SAC2 checks again the SAC consistency of all the values (i, a) such that (j, b) was in AC(P |i=a ). This leads to a better average time complexity than SAC1 but the data structures of SAC2 are not sufficient to reach optimality since SAC2 may waste time redoing the enforcement of AC in P |i=a several times from scratch. Algorithm 1 is an algorithm that enforces SAC in O(end3 ), the lowest time complexity which can be expected (see Theorem 1). The idea behind such an optimal algorithm is that we don’t want to do and redo (potentially nd times) arc consistency from scratch for each subproblem P |j=b each time a value (i, a) is found SAC inconsistent. (Which represents n2 d2 potential arc consistency calls.) To avoid such costly repetitions of arc consistency calls, we duplicate the problem nd times, one for each value (i, a), so that we can benefit from the incrementality of arc consistency on each of them. An AC algorithm is called ’incremental’ when its complexity on a problem P is the same for a single call or for up to nd calls, where two consecutive calls differ only by the deletion of some values from P . The generic AC algorithms are all incremental. Algorithm 1 can be decomposed in several sequential steps. In the following, propagateAC(P, S) denotes the function that incrementally propagates the removal of the values in S when an initial AC call has already been executed, initializing the data structures required by the AC algorithm in use. First, after some basic initializations and making the problem arc consistent (line 1), the loop in line 2 duplicates nd times the arc consistent problem obtained in line 1, and propagates the removal of all the values different from a for i in each P |i=a , noted Pia (line 4). Each value corresponding to a failing AC test is put in the list Q for future propagation (the value is SAC inconsistent –line 6), while subproblems succesful for the AC phases are put in the PendingList for future update (line 5). Once this initialization phase has finished, we copy the list Q of removed values in all the local propagation lists Qia (line 7). The third main step concerns the AC propagation of the removal of values found SAC inconsistent (line 8). During the whole loop, a subproblem Pia in SacList is one which currently has propagated the removal of all SAC inconsistent values (that are put in the Qia lists). One in PendingList has its Qia non empty (except in the first execution of the loop if all values were SAC in the initialization phase). A subproblem Pia for which the AC propagation of Qia fails (line 10) is removed from the process, and (i, a) is put in all remaining Qjb lists for propagation.

Algorithm 1: The optimal SAC algorithm procedure SAC (P ); /* init phase */; 1 P ← AC(P ) ; Q ← ∅ ; SacList ← ∅ ; PendingList ← ∅; 2 foreach (Xi , a) ∈ D do 3 Pia ← P /* we copy the network and its data structures nd times */; 4 if propagateAC(Pia , Di \ {a}) then 5 PendingList ← PendingList ∪ {Pia }; 6

else Q ← Q ∪ {(i, a)};

12

/* propag phase */; foreach Pia ∈ PendingList do Qia ← Q; while PendingList 6= ∅ do pop Pia from PendingList; if propagateAC(Pia , Qia ) then SacList ← SacList ∪ {Pia }; else foreach Pjb ∈ SacList ∪ PendingList do Qjb ← Qjb ∪ {(i, a)}; if Pjb ∈ SacList then Pjb goes from SacList to PendingList;

13

foreach (i, a) ∈ D do if Pia 6∈ SAClist then Di ← Di \ {a};

7 8 9

10 11

When PendingList is empty, SacList contains all AC subproblems. A value (i, a) is SAC iff Pia ∈ SacList (line 13). Theorem 2 Algorithm 1 is a correct SAC algorithm with optimal time complexity. Proof. Correctness. Suppose a value a is removed from Di by Algorithm 1 while it should not. (i, a) is removed in line 13 only if Pia is not in SacList. If Pia was found arc inconsistent in the initialization phase (line 4), (i, a) would not be SAC. Thus, Pia passed in PendingList at least once. If it finally does not belong to SacList, this means that at some point in the process, Pia was arc inconsistent in line 9. Since by assumption, (i, a) should be in SAC(P), this means that at least one of the values removed from Pia and that caused its arc inconsistency was SAC. By induction, there is necessarily a value (j, b) that is the first incorrectly removed value. This value cannot exist since Pjb has been found arc inconsistent while only SAC inconsistent values had been removed from it. Thus, Algorithm 1 is sound. Completeness comes more directly. Thanks to the way SacList and PendingList are used in the while loop, we know that at the end of the loop, all Pia are arc consistent. Thus, the values remaining after the end of Algorithm 1 are necessarily SAC. Complexity. The complexity analysis is given for networks of binary constraints since the optimality proof was given for binary constraint networks only. But algorithm 1 works on constraints of any arity. Since any AC algorithm can

be used to implement our SAC algorithm, the space and time complexities will obviously depend on this choice. Let us first discuss the case where an optimal time algorithm such as AC-6 [4] or AC2001 [5] is used. Line 3 tells us that the space complexity will be nd times the complexity of the AC algorithm, namely O(end2 ). Regarding time complexity, the first loop copies the data structures and propagates arc consistency on each subproblem (line 4), two tasks which are respectively in nd · ed and nd · ed2 . The while loop (line 8) is more tricky to evaluate. Each subproblem can in the worst case be called nd times for arc consistency, and there are nd subproblems. But it would be false to conclude on a nd · nd · ed2 complexity since arc consistency is incremental for both AC-6 and AC2001. This means that the complexity of nd restrictions on them is still ed2 . Thus the total cost of arc consistency propagations is nd · ed2 . We have to add the cost of updating the lists in lines 11 and 12. In the worst case, each value is removed one by one, and thus, nd values are put in nd Q lists, leading to n2 d2 updates of SacList and PendingList. The total time complexity is thus O(end3 ), which is optimal. u t Remarks. We can remark that the Q lists contain values to be propagated. This is written like this because the AC algorithm chosen is not specified here, and value removal is the most accurate information we can have. If the AC algorithm chosen is AC-6, AC-7, or AC-4, the lists will be directly used like this. If it is AC-3 or AC2001, only the variables from which the domain has changed are necessary. This last information is trivially obtained from the list of removed values. We can also point out that if AC3 is used, we decrease the space complexity to O(n2 d2 ), but time complexity increases to O(end4 ) since AC3 is not optimal.

5

Properties and weaknesses of SAC

In this section we analyse some of the properties we can expect from a local consistency, and that SAC does not possess. The first strange behavior of SAC that we can observe is illustrated by Fig 1. On this constraint network, if we check the SAC consistency of the values in a lexicographic order, all the values preceding (l, a) are detected SAC consistent. However the deletion of the SAC inconsistent values (l, a) and (l, b) leads to the SAC inconsistency of (i, a) while none of the values in the neighbourhood of i become SAC inconsistent. Most of the filtering algorithms are based on the notion of support. To know whether a local consistency holds for a value (i, a), a local test is performed. The aim of this test is to identify a subnetwork Support(i, a) in the consistency graph that is sufficient to guarantee local consistency of (i, a). If such a subnetwork Support(i, a) is found, we are sure that the local consistency holds for (i, a) as long as Support(i, a) remains a subnetwork of the consistency graph. For arc consistency the subnetwork is a star composed of at least one allowed

m

a

n

a

b

b l d c b a

j

c

a

a

d

k

a c i

d

a

b a forbidden pair of values

Fig. 1. Inconsistency graph of a CSP where (i, a) becomes SAC inconsistent after the deletion of (l, a) and (l, b) while the values of j and k remain SAC consistent.

arc ((i, a), (j, b)) for each j linked to i. Let us introduce the SAC-NeighboringSupport of a value (i, a) as the subnetwork obtained by reducing AC(P |i=a ) to the neighborhood of i. Definition 3 (SAC-N-Support) Let (i, a) be a value of a constraint network P = (X, D, C). The SAC-N-Support of (i, a) is the set of values in the neighborhood of i arc consistent in P |i=a : SAC-N-Support(i, a)={(j, b) s.t. Cij ∈ C and (j, b) ∈ AC(P |i=a )}. Observation 1 Let D0 be the domain of SAC(P ) and (i, a) a value in P . SAC-N-Support(i, a) ⊆ D0 6⇒ (i, a) ∈ D0 Proof. See Fig. 1. SAC-N-Support(i, a)={(j, a), (j, c), (k, a), (k, d)} is included in SAC(P ), but once (l, a) and (l, b) are removed (because they are not SAC), (i, a) is no longer SAC. u t Observation 1 highlights that if AC(P |i=a ) 6= ∅ we cannot say that (i, a) will remain SAC consistent as long as all the values of SAC-N-Support(i, a) remain SAC consistent. So, the whole network AC(P |i=a ) supports (i, a), which leads to the following extended definition of SAC-support. Definition 4 (SAC-Support) Let (i, a) be a value of a constraint network P = (X, D, C). The SAC-Support of (i, a) is AC(P |i=a ). The second strange behavior of SAC is that conversely to other local consistencies, the supports are not “bidirectional”. The fact that a value (j, b) is not in the SAC-support of a value (i, a) does not imply that (i, a) is not in the SAC-support of (j, b). In Fig 2, (i, a) ∈ AC(P |j=a ) but (j, a) 6∈ AC(P |i=a ).

j

k

a

a

b

c

m a

b

c

b

i

a

a

b

c

c

a

l

b

a forbidden pair of values

Fig. 2. Inconsistency graph of a CSP where (i, a) and (j, a) are not mutually compatible or incompatible wrt SAC.

Observation 2 Let (i, a) and (j, b) be values in P . (j, b) ∈ SAC-Support(i, a) 6⇒ (i, a) ∈ SAC-Support(j, b) Proof. See Fig. 2 in which (i, a) ∈ AC(P |j=a ) while (j, a) 6∈ AC(P |i=a ). u t In fact, it is not required to enforce full arc consistency on P |i=a to know whether (i, a) is SAC consistent or not. Determining if AC can wipe out a domain in P |i=a is sufficient. So, we can use a lazy approach (like in lazy-AC7 [16]) to test the SAC consistency of the values. With a lazy approach, we obtain smaller subnetworks supporting the values. But these supports are still not bidirectional.

6

An extension of SAC

In the previous section, we gave two observations that prevent us from using classical constructions that lead to efficient local consistency algorithms. But observation 2 not only has negative consequences on the implementation of efficient SAC algorithms. It also shows a weakness in the pruning capability of SAC. If (j, b) does not belong to AC(P |i=a ), the SAC test on (j, b) could be done on a network from which (i, a) has been removed since we are guaranteed that (i, a) and (j, b) cannot belong to the same solution. Then, there would be more chances of wipe out when testing (j, b). This leads to a slightly modified definition of SAC. We obtain a stronger consistency level that we will compare to existing ones. Definition 5 (Singleton Propagated Arc Consistency) A constraint network P = (X, D, C) is singleton propagated arc consistant (SPAC) iff ∀i ∈ X, ∀a ∈ Di , AC(T ia ) 6= ∅, where T ia = (X, Dia , C), with Djia = {b ∈ Dj /(i, a) ∈ AC(P |j=b )} (So, Diia = {a}). This local consistency makes use of observation 2, which is close to what is done in 1-AC, the local consistency defined in [2]. Definition 6 (1-AC) A constraint network P = (X, D, C) is 1-AC iff:

n

c

m

a

b

c

b

j

a

a

b a

c

i

c b

l

b

c

b a

a

k

a

b

a forbidden pair of values

Fig. 3. Inconsistency graph of a 1-AC consistent CSP on which (i, a) is not SPAC.

– P is SAC, – ∀j ∈ X, ∀i ∈ X, ∀a ∈ Di , ∃b ∈ Dj such that a ∈ AC(P |j=b ). 1-AC and SPAC look very similar. Nevertheless, they are different, as we will next see by comparing them wrt the relation ’stronger than’ defined in [8]. Briefly, a local consistency Φ is stronger than another local consistency Φ0 if any constraint network which is Φ-consistent is also Φ0 -consistent. Consequently, any algorithm enforcing Φ removes at least all the values removed by an algorithm enforcing Φ0 . Φ is strictly stronger than Φ0 (denoted Φ  Φ0 ) if Φ is stronger than Φ0 and there exists a constraint network on which Φ0 holds and Φ does not. We first give a lower bound to the level of consistency ensured by SPAC. Property 1 SPAC is strictly stronger than 1-AC. Proof. Let (i, a) removed by 1-AC and not by SPAC. (i, a) is then such that ∃j/∀b ∈ Dj , (i, a) 6∈ AC(P |j=b ). SPAC will test AC(T ia ) with Djia = ∅. Therefore, (i, a) is removed by SPAC. Strictness is shown in Fig. 3. (i, a) is removed by SPAC and not by 1-AC. u t We now give an upper bound to the level of consistency ensured by SPAC. Following [8], strong path consistency, denoted AC(PC), and which consists in enforcing arc consistency after the network is made path consistent, is the tightest upper bound we can expect. Property 2 AC(PC) is strictly stronger than SPAC. Proof. Consider a SPAC inconsistent value (i, a) of a constraint network P . According to the definition of SPAC, the propagation of the deletion from P |i=a of all the values (j, b) such that (i, a) 6∈ AC(P |j=b ) leads AC to wipe out a domain Dk . In [13], McGregor enforces path consistency by removing all the pairs of values ((i, a), (j, b)) such that (i, a) is arc inconsistent in P |j=b . So, if we use this PC algorithm on P , all the pairs ((i, a), (j, b)) such that (i, a) 6∈ AC(P |j=b ) will be removed from P when the PC algorithm will check AC(P |i=a ). Therefore,

k

a

d

b

c

l c

b

d

a

a b

C j

c

b

d

a

m

e

a

b

c

a

b a forbidden pair of values

i

Fig. 4. Inconsistency graph of a SPAC consistent CSP on which strong path consistency removes (i, a).

AC will wipe out the domain Dk . For all c ∈ Dk , the pair of values ((i, a), (k, c)) will be removed by the PC algorithm leading to the arc inconsistency of (i, a). So, (i, a) is also strong path inconsistent. Strictness is shown in Fig. 4. (i, a) is removed by AC(PC) and not by SPAC. u t The proof of property 2 highlights the relations between SAC, SPAC and strong PC. We can easily obtain a SAC algorithm from a strong PC algorithm based on the algorithm of McGregor by not storing the pairs of values found path inconsistent. To test the SPAC consistency of a value (i, a) only the path inconsistency of the pairs involving (i, a) is considered. This explains that the filtering capability of SPAC is between those of SAC and strong PC. We can summarize the relations between SPAC and the other local consistencies by: AC(P C)  SP AC  1-AC  SAC. Obviously, for any local consistency Φ we can introduce the singleton propagated Φ consistency than will enhance the filtering capability of singleton Φ consistency in a similar way to SPAC enhancing SAC. Finally, we can point out that even if SPAC does not have the weakness of SAC on the bidirectionality of supports (Observation 2), it has other drawbacks. First, as in SAC, the support of a value (i, a) involves values in all the network, and not only in the neighborhood of i. (This can be observed on Fig. 1 since (i, a) becomes SPAC inconsistent after the deletion of (l, a) and (l, b) while the values of j and k remain SPAC consistent.) Second, we cannot use a lazy approach: AC has to be completely enforced on P |i=a to detect all the values SPAC inconsistent with (i, a). Third, for each value (i, a), the domain of AC(P |i=a ) has to be stored since the values (j, b) in this domain are the ones for which (i, a) can participate

to the support. This leads to an Ω(n2 d2 ) space complexity and SPAC is therefore as expensive in space as strong PC.

7

Summary and Conclusion

We have made a theoretical study of singleton arc consistency. We have proposed a SAC algorithm having optimal worst case time complexity. We have observed some bad behaviors of SAC. These observations have led us to conclude that SAC is definitely not as ’local’ as the other local consistencies, with some bad consequences on the way to efficiently enforce it. Another consequence is that we can enhance the pruning efficiency of SAC by changing its definition to avoid one of its observed drawbacks. The filtering capability of the new local consistency obtained is also studied.

References 1. R. Bart´ ak. A new algorithm for singleton arc consistency. In Proceedings FLAIRS’04, Miami Beach, Fl, 2004. AAAI Press. 2. H. Bennaceur and M.S. Affane. Partition-k-ac: an efficient filtering technique combining domain partition and arc consistency. In Proceedings CP’01, pages 560–564, Paphos, Cyprus, 2001. Short paper. 3. P. Berlandier. Improving domain filtering using restricted path consistency. In Proceedings IEEE-CAIA’95, 1995. 4. C. Bessi`ere. Arc-consistency and arc-consistency again. Artificial Intelligence, 65:179–190, 1994. 5. C. Bessi`ere and J.C. R´egin. Refining the basic constraint propagation algorithm. In Proceedings IJCAI’01, pages 309–315, Seattle WA, 2001. 6. R. Debruyne and C. Bessi`ere. From restricted path consistency to max-restricted path consistency. In Proceedings CP’97, pages 312–326, Linz, Austria, 1997. 7. R. Debruyne and C. Bessi`ere. Some practicable filtering techniques for the constraint satisfaction problem. In Proceedings IJCAI’97, Nagoya, Japan, 1997. 8. R. Debruyne and C. Bessi`ere. Domain filtering consistencies. Journal of Artificial Intelligence Research, 14:205–230, 2001. 9. J.W. Freeman. Improvements to propositional satisfiability search algorithms. PhD thesis, University of Pennsylvania, Philadelphia PA, 1995. 10. E.C. Freuder. Synthesizing constraint expressions. Communications of the ACM, 21(11):958–966, Nov 1978. 11. O. Lhomme. Consistency techniques for numeric csps. In Proceedings IJCAI’93, pages 232–238, Chambry, France, 1993. 12. C.M. Li and Ambulagan. Heuristics based on unit propagation for satisfiability problems. In Proceedings IJCAI’97, pages 366–371, Nagoya, Japan, 1997. 13. J.J. McGregor. Relational consistency algorithms and their application in finding subgraph and graph isomorphism. Information Science, 19:229–250, 1979. 14. U. Montanari. Networks of constraints: Fundamental properties and applications to picture processing. Information Science, 7:95–132, 1974. 15. P. Prosser, K. Stergiou, and T Walsh. Singleton consistencies. In Proceedings CP’00, pages 353–368, Singapore, 2000. 16. T. Schiex, J.C. R´egin, G. Verfaillie, and C. Gaspin. Lazy arc-consistency. In Proceedings AAAI’96, pages 216–221, Portland OR, 1996.

Search

30

Measuring Search Trees Christian Bessiere1 , Bruno Zanuttini2 , and C`esar Fern´ andez3 1

LIRMM-CNRS, Montpellier, France 2 GREYC, Caen, France 3 Univ. de Lleida, Lleida, Spain

Abstract. The SAT and CSP communities make a great use of search effort comparisons to assess the validity of an algorithm or a heuristic. There exist different ways of counting the size of a search tree developed by a procedure. However, they are seldomly defined, and their similarities/differences are not clear. This note aims at clarifying this issue. We formally define (some of) the existing measures and characterize the properties that we can expect from them. We show some weaknesses of the existing measures with respect to those properties. We propose the number of wrong decisions as a new way of measuring the search effort that is more accurate to effectively represent the effort an algorithm has devoted to the search. We show that this new way of measuring the search space behaves well with respect to the desired properties.

1

Introduction

In the satisfiability and constraint communities, we often need to compare the relative performance of different algorithms. There are different measures that can be used, and that have advantages and/or drawbacks. In the constraint community, the number of times a constraint has been checked as satisfied or not (constraint check ) has been used for a long time. It is considered as the basic operation all algorithms do. It has also some advantages such as being proportional to the quantity of information retrieved from the constraint network during the solving process. But it has shortcomings which are evident as soon as we use complex algorithms that perform other types of computation than just checking constraints. (AC-4 was an obvious example of an algorithm storing once and for all the constraint checks, and then working only with its data structure.) Another measure is the cpu time. It has the advantage of taking into account all the parts of the effort devoted to the solving process, but is affected by the quality of the implementation. This issue is particularly accurate when we want to compare the performance of an algorithm implemented on site with a “standard” one available on the web or in a market product. The two versions are not necessarily implemented with the same skills. The last measure, which is widely used, both in CSP and SAT solvers (at least in those using backtrack search), is the size of the search tree explored during the solving process. This size is often evaluated as the number of backtracks.

But, if we check what is called “number of backtracks” by different people, inside different solvers, or in different papers, it appears that this concept is rather fuzzy, and different ways of measuring the size of the search tree can be reported under this name. The goal of this note is to clarify our picture on those measures. We present them and provide a formal definition. We propose a new measure, the number of wrong decisions, that is more consistent with what is effectively done during the solving process of an NP-complete problem. We characterize properties that we can expect from a search measure. We show that all measures but ’wrong decisions’ fail on one of the properties.

2

Search Trees

We give some definitions that will permit to handle more formally the notion of a search tree. These definitions are based on a standard CSP understanding, but all the definitions hold for SAT, or any similar type of search. A search tree T is composed of nodes, arcs, and an ordering YvS 0 , so XS > XS 0 which establishes acyclicity. 2

5

Thus we can safely add the full set of ICs to any binary CSP; if it is solvable then not all solutions are excluded by the ICs. Next we show that approximately half of all substitutable solutions are excluded: Theorem 2. If a ≺v b and a is dynamically substitutable for value b with respect to assignments A, then an IC excludes solutions in which A ∪ {v = b}. Proof. Consider a solution S in which A ∪ {v = b}. Firstly, because S is a solution each constraint v 6= b ∨ Dvbk containing v 6= b is satisfied. But v = b therefore each Dvbk is true under S. Secondly, by dynamic substitutability each V dvak is also true by the same argument. Thirdly, because a ≺v b there is an IC Ivab : k Dvak → v 6= b. But Dvak is true and v 6= b is false so Ivab is violated. Therefore any solution in which A ∪ {v = b} is excluded by an IC. 2 As a consequence of theorem 2 we can show that: Theorem 3. ICs exploit full dynamic interchangeability for all possible search trees. Proof. Suppose values a and b are dynamically interchangeable for variable v under assignments A. Then a is dynamically substitutable for b and vice-versa. In any domain ordering ≺v either a ≺v b or b ≺v a. In the former case solutions with v = b are excluded, and in the latter case solutions with v = a are excluded. In both cases one of the solutions is excluded, so full dynamic interchangeability is exploited with respect to A. But A is an arbitrary set of variable assignments, so this is true at any point during backtrack search in any search tree (whatever variable and value ordering heuristics are used). 2 Note that we have not proved that only such solutions are excluded by ICs. However, by theorem 1 ICs cannot transform a solvable CSP into an unsolvable one, so adding them is safe. If they do exclude further solutions then all the better, but we suspect that they do not. Finally, space complexity. For a problem with n variables and d domain values there are only O(nd2 ) ICs. However, this can be improved by combining several ICs into a single constraint: 

Ivi = 

^

jv i



"

Ivij  = 

^ k

#



Dvik → 

^

jv i



v 6= j 

But each variable v takes exactly one value so it is true that  

^

jv i





v 6= j  ↔ ¬ 

_

jv i





v = j ↔ 

_

jv i



v = j

6

We can therefore write Ivi as ^ k

Dvik

!



→

_

jv i



v = j

Transforming this to conjunctive normal form and replacing terms ¬(w 6= i) by w = i yields disjunctions of equalities. We shall call these ICs in disjunctive form. For example in the colouring problem of Figure 1 the ICs IW,blue,red and IW,blue,white can be combined to an IC in disjunctive form IW,blue : X = blue ∨ Y = blue ∨ W = blue For a binary CSP there are only O(nd) ICs in disjunctive form, thus full interchangeability can be exploited by adding only a linear number of constraints. For a non-binary CSP the expansion to conjunctive normal form increases the space complexity; to combat this we can either pre-transform the CSP to a binary V CSP (which is always possible) or introduce auxiliary variable definitions for the ( k Dvik ) terms.

3 Application to SAT encoding To exploit ICs we need a constraint system that is able to express them. A convenient language is that of propositional satisfiability (SAT). The SAT problem is to determine whether a Boolean expression has a satisfying set of truth assignments. The problems are usually expressed in conjunctive normal form: a conjunction of clauses C 1 ∧C2 ∧. . . where each clause C is a disjunction of literals l1 ∨ l2 ∨ . . . and each literal l is either a Boolean variable v or its negation ¬v. A Boolean variable can be assigned the value true (T ) or false (F ). CSPs can be encoded as SAT problems in a variety of ways (and vice-versa) [28]. The most natural and widely-used encoding is the direct encoding. A SAT variable x vi is defined as true if and only if the CSP variable v has the domain value i assigned to it, where i and j denote values in dom(v) = {1, . . . , d}. The direct encoding consists of three sets of clauses. Each CSP variable must take at least one domain value, expressed by at-least-one (ALO) clauses: xv1 ∨ xv2 ∨ . . . ∨ xvd No CSP variable can take more than one domain value, expressed by at-most-one (AMO) clauses: x ¯vi ∨ x¯vj Conflicts are enumerated by conflict (CON) clauses: x ¯vi ∨ x¯wj (We consider only binary CSPs.) An alternative to the direct encoding is the support encoding, which encodes support instead of conflict [15, 21]. It consists of ALO, AMO

7

and support (SUP) clauses: if i1 . . . ik are the supporting values in the domain of CSP variable v for value j in the domain of CSP variable w, then add a support clause xvi1 ∨ . . . ∨ xvik ∨ x ¯wj The interest of this encoding is that unit propagation maintains arc consistency in the CSP, whereas on the direct encoding it maintains only forward checking. The encoding can be generalized to non-binary CSPs and other forms of consistency [7]. ICs in disjunctive form can be translated to SAT and added to a direct or support encoding of a CSP, for example an IC v = a ∨ w = a ∨ w = b corresponds to the clause xva ∨ xwa ∨ xwb . We shall also refer to such clauses as ICs, the direct encoding plus ICs as the interchangeability direct encoding, and the support encoding plus ICs as the interchangeability support encoding.

4 Experiments The new SAT-encodings provide a convenient, though indirect, way of testing the combination of ICs with forward checking and arc consistency. We shall compare the interchangeability direct (IDIR) and interchangeability support (ISUP) encodings with the usual direct (DIR) and support (SUP) encodings. We use Chaff [23], the first of the latest generation of fast SAT backtrackers that combines constraint propagation with a sophisticated dynamic variable ordering heuristic and nogood learning. A drawback with Chaff from our point of view is that it is deterministic, and therefore does not allow results to be averaged over multiple runs. However, it has been shown that such solvers can vary significantly in performance if SAT problems are randomly transformed, for example by permuting variable names or randomly selecting a variable and flipping all its occurrences in the problem. These transformations do not affect the solvability or hardness of a problem, and can be used to find average behaviour of a deterministic solver like Chaff. They are also used in SAT solver competitions; for details on them see [9]. We apply these transformations and take median figures over 100 runs. The binary CSPs we use are variations on vertex colouring. A graph G = (V, E) consists of a set V of vertices and a set E of edges between vertices. Two vertices connected by an edge are adjacent. In bandwidth colouring problems two adjacent vertices i and j cannot be assigned colours that are closer in value than a specified distance dij . The constraints are vi 6= ci ∨ vj 6= cj where i and j are adjacent and |ci − cj | < dij . The aim is to assign a colour to each vertex while respecting the constraints, given an allowed number K of colours. This problem can be modeled as a binary CSP in which each variable represents a vertex and each value a colour. The more well-known vertex colouring problem is a bandwidth colouring problem in which each d ij = 1, that is adjacent vertices cannot take the same colour. As a source of problems we use graphs taken from the Colouring Symposia of 2002–4.1 These benchmarks provide a publiclyavailable source of binary CSPs, and have the advantage that they are not designed specifically with interchangeability in mind. 1

http://mat.gsia.cmu.edu/COLOR04

8

Some experimental details. We use < for ≺v in all cases, choose K so that a proof of uncolourability takes a few seconds, and omit graphs for which no such K exists. We chose to use unsolvable problems because the effect of breaking symmetry on the search for a first solution is well-known to be unpredictable. Methods such as SBDS [2, 18] avoid this problem but adding constraints to a model does not, so measuring the search effort to find a solution would not be a meaningful way of evaluating the new encoding. Moreover interchangeability, like any symmetry breaking technique, can be used to improve proofs of unsatisfiability: if there is no solution containing v = a then there is also no solution containing v = b, if a and b are interchangeable. Finally, note that we could improve the results by adding symmetry-breaking constraints based on a large clique, or the constraints described in [16]. However, our aim is to compare encodings on a set of CSPs, not to obtain the best possible performance on these problems. Figure 3 shows the effect of ICs on forward checking search for pure vertex colouring problems. On such problems arc consistency is no more powerful than forward checking [7] so we compare only the DIR and IDIR encodings. In most cases the IDIR encoding gives better results, in terms of both the number of backtracks and CPU time 2 (in brackets). This shows that a variety of graph types contain dynamically interchangeable colours, that the IDIR encoding is a useful addition to known SAT encodings of CSPs, and indirectly that ICs can improve forward checking search. Figure 4 shows the effect of ICs on forward checking and arc consistent search for bandwidth colouring problems. The GEOM graphs are geometric graphs generated by randomly placing vertices in a unit square and basing adjacency on proximity. The GEOMb problems are denser than the GEOMa problems, which in turn are denser than the GEOM problems. Bandwidth colouring on such graphs is a reasonable model of the frequency allocation problem, so these problems have an interesting structure. In these experiments IDIR is sometimes beneficial and sometimes not. There are several cases in which IDIR requires less time but more backtracks than DIR, which is surprising as IDIR is DIR plus additional constraints. We conjecture that the cause is an unknown interaction with the internal workings of Chaff (perhaps its nogood learning). In contrast ISUP almost always gives better results than SUP, and is the best overall encoding. This indicates that ICs can also improve arc consistent search. These results are preliminary but indicate that at least some random and structured CSPs can benefit from ICs. Finally, a note on model sizes. The number of ICs is only linear in the size of the CSP, but it is relevant to ask how much difference they make to model size in practice. On vertex colouring the ICs increased the number of clauses by about 1%, but because they are large clauses they increased the total number of literals by about 55%. On bandwidth colouring the ICs increased the number of clauses in the support encoding by about 3% but the number of literals by about 22%. These increases are not excessive.

2

These do not include the time taken to encode the problems, but ICs do not significantly increase the encoding time.

9

5 Related work Since Freuder’s original interchangeability paper [14] there has been considerable research in this area of symmetry breaking. Weigel, Faltings & Choueiry [30] define context dependent interchangeability, which is weaker than full interchangeability and also intractable to fully compute, but they use approximation algorithms to partially exploit it. Haselb¨ock [19] defines a weakened form of neighborhood interchangeability with respect to certain constraints, in order to detect more local interchangeabilities. Choueiry & Noubir [12] define neighborhood partial interchangeability, which is weaker than neighborhood interchangeability but stronger than partial interchangeability. Choueiry & Davis [11] extend this to a dynamic version. Weigel & Faltings [29] combine neighborhood interchangeable values into single meta-values, and show that new interchangeabilities can emerge after the applying consistency processing, and also after combining variables into meta-variables. Beckwith, Choueiry & Zou [3] show that dynamic variable ordering remains an important heuristic when combined with neighborhood interchangeability. They also design a set of random benchmark problems with a controlled amount of interchangeability, whereas many algorithms are tested on pure random binary CSPs. Bowen & Likitvivatanavong [8] increase neighborhood interchangeability by splitting domain values into sub-values. Chmeiss & Sa¨ıs [10] define generalized neighborhood substitutability which is weaker than neighborhood substitutability. They show that it can be broken by adding a linear number of constraints but give no empirical results.3 Local interchangeability has been combined with both forward checking [4, 6] and arc consistency [19, 26]. In contrast to most approaches, van Hentenryck et al. [20] break full interchangeability and two related forms of interchangeability. For example in wreath-value interchangeability variables take values from a domain D1 × D2 such that values are interchangeable in D1 , and in D2 for fixed values of D1 ; this is a special form of dynamic interchangeability in which the assigned set of variables is {v 1 } where v1 is the variable with domain D1 . They break these symmetries in constant time and space using dedicated search algorithms. This approach has been generalized to arbitrary value symmetries by Roney-Dougal et al. [25]. Gent [16] describes a constraint to break symmetries arising from indistinguishable values, a concept related to interchangeability. However, these approaches assume that the user knows the symmetries of the problem in advance; ours requires no user knowledge, and breaks a weak form of interchangeability as well as a form of substitutability. To place our work in the context of other interchangeability research, Figure 2 shows a directed graph taken from [12] but extended to include our semi-exploitation of full dynamic substitutability, which we denote by DSS (dynamic semi-substitutability). In the graph FI denotes full interchangeability, KI K-interchangeability, NI neighborhood interchangeability, PI partial interchangeability, NPI neighborhood PI, NIc a form of PI defined on individual constraints, CDI context-dependent interchangeability (a form of dynamic neighborhood interchangeability), aCDI an approximate form of CDI that can be computed in polynomial time, FS full substitutability, and NS neighborhood substi3

There is clearly some commonality between their approach and ours, which we are unable to determine exactly.

10

tutability. An arrow from A to B denotes that B is a weaker form of interchangeability than A. The graph illustrates the relative weakness of DSS compared to most variants.

DSS

CDI

FI

KI

NI

PI

FS

aCDI

NPI

NS

NIc

Fig. 2. Relating various forms of interchangeability

6 Conclusion Several local versions of interchangeability and substitutability have previously been used to remove CSP domain values. We have shown that full dynamic interchangeability for arbitrary search trees can be statically exploited by adding a linear number of interchangeability constraints to a binary CSP, and that these also partially exploit full dynamic substitutability. An advantage of this approach is that it allows generic search algorithms to benefit from interchangeability and substitutability reasoning. Empirical results show that backtrack search with dynamic variable ordering, nogood learning, and both forward checking and arc consistent search, can be improved by interchangeability constraints. A side benefit of this work is the discovery of interesting new CSP-to-SAT encodings. Increasing the number of such encodings is of interest to SAT research because improved encodings aid the application of SAT techniques to combinatorial problems. There are potential drawbacks with our approach. Firstly, though it has the advantage of requiring no analysis, this means that we do not know whether the new constraints will have any effect other than adding an overhead. In experiments we did find some overhead, but overall the advantages outweighed the disadvantages. Secondly, by SAT-encoding CSPs we lose some problem structure. Some recent SAT solvers retain much of the problem structure [1, 27] so this may be less of a drawback than it appears. Thirdly, though we exploit a weaker form of interchangeability than most previous work, this is not guaranteed to yield better results. Whereas local forms of inter-

11

changeability can be used to remove values from variable domains, we add high-arity constraints to the model, which incurs an overhead. Nevertheless, the technique represents an advance in the use of interchangeability, and empirical results are promising. There are several interesting directions for future work. Firstly the application of interchangeability constraints to non-binary CSPs, for which it will probably be necessary either to transform to binary form or introduce auxiliary variables. Secondly their direct application to CSPs instead of via SAT encodings. Thirdly their generalization to CSPs expressed intensionally instead of extensionally. Fourthly the exploitation of other variants such as full dynamic substitutability and partial interchangeability. Finally, we intend to test the approach on more realistic problems such as frequency assignment.

Acknowledgments This work has received support from Science Foundation Ireland under Grant 00/PI.1/C075. Thanks to Gene Freuder and other 4C members for helpful discussions, and to the anonymous referees for useful comments.

References 1. C. Ans´otegui, J. Larrubia, F. Many`a. Boosting Chaff’s Performance by Incorporating CSP Heuristics. Ninth International Conference on Principles and Practice of Constraint Programming, Lecture Notes in Computer Science vol. 2833, Springer-Verlag, 2003, pp. 96–107. 2. R. Backofen, S. Will. Excluding Symmetries in Constraint-Based Search. Proceedings of the Fifth International Conference on Principles and Practice of Constraint Programming, Lecture Notes in Computer Science vol. 1713, Springer-Verlag, 1999, pp. 73–87. 3. A. M. Beckwith, B. Y. Choueiry, H. Zou. How the Level of Interchangeability Embedded in a Finite Constraint Satisfaction Problem Affects the Performance of Search. Fourteenth Australian Joint Conference on Artificial Intelligence, Lecture Notes in Artificial Intelligence vol. 2256, Adelaide, Australia, Springer Verlag, 2001, pp. 50–61. 4. A. Bellicha, M. Habib, M. C. Vilarem, C. Capelle, T. Kokeny. CSP Techniques Using Partial Orders on Domain Values. ECAI Workshop on Constraint Satisfaction Issues raised by Practical Applications, T. Schiex and C. Bessi`ere (eds.), Amsterdam, 1994. 5. B. Benhamou. Study of Symmetry in Constraint Satisfaction Problems. Principles and Practice of Constraint Programming, 1994. 6. B. W. Benson, E. C. Freuder. Interchangeability Preprocessing Can Improve Forward Checking. Tenth European Conference on Artificial Intelligence, Vienna, Austria, 1992, pp. 28–30. 7. C. Bessi`ere, E. Hebrard, T. Walsh. Local Consistencies in SAT. Sixth International Conference on Theory and Applications of Satisfiability Testing, Santa Margherita Ligure, Italy, 2003, pp. 400–407. 8. J. Bowen, C. Likitvivatanavong. Splitting the Atom: a New Approach to Neighbourhood Interchangeability in Constraint Satisfaction Problems. Poster, Eighteenth International Joint Conference on Artificial Intelligence, Acapulco, Mexico, 2003. 9. F. Brglez, X. Y. Li, M. F. Stallman. The Role of a Skeptic Agent in Testing and Benchmarking of SAT Algorithms. Fifth International Symposium on the Theory and Applications of Satisfiability Testing, University of Cincinnati, 2002, pp. 354–361. 10. A. Chmeiss, L, Sa¨ıs. About Neighborhood Substitutability in CSPs. Third International Workshop on Symmetry in Constraint Satisfaction Problems, Kinsale, Ireland, 2003, pp. 41– 45.

12 11. B. Y. Choueiry, A. M. Davis. Dynamic Bundling: Less Effort for More Solutions. 5th International Symposium on Abstraction, Reformulation and Approximation, Lecture Notes in Computer Science vol. 2371, Springer-Verlag, 2002, pp. 64–82. 12. B. Y. Choueiry, G. Noubir. On the Computation of Local Interchangeability in Discrete Constraint Satisfaction Problems. Fifteenth National Conference on Artificial Intelligence, Madison, WI, 1998. 13. T. Fahle, S. Schamberger, M. Sellman. Symmetry Breaking. Proceedings of the Seventh International Conference on Principles and Practices of Constraint Programming, Lecture Notes in Computer Science vol. 2239, Springer-Verlag, 2001, pp. 93–107. 14. E. C. Freuder. Eliminating Interchangeable Values in Constraint Satisfaction Problems. Ninth National Conference on Artificial Intelligence, Anaheim, CA, 1991, pp. 227–233. 15. I. P. Gent. Arc Consistency in SAT. Fifteenth European Conference on Artificial Intelligence, Lyons, France, 2002. 16. I. P. Gent. A Symmetry Breaking Constraint for Indistinguishable Values. Workshop on Symmetry in Constraint Satisfaction Problems, Paphos, Cyprus, 2001. 17. I. P. Gent, W. Harvey, T. Kelsey. Groups and Constraints: Symmetry Breaking During Search. Eighth International Conference on Principles and Practice of Constraint Programming, Lecture Notes in Computer Science vol. 2470, Springer-Verlag, 2002, pp. 415–430. 18. I. P. Gent, B. Smith. Symmetry Breaking During Search in Constraint Programming. Fourteenth European Conference on Artificial Intelligence, 2000, pp. 599–603. 19. A. Haselb¨ock. Exploiting Interchangeabilities in Constraint Satisfaction Problems. Thirteenth International Joint Conference on Artificial Intelligence, Chamb´ery, France, 1993, pp. 282–287. ˚ 20. P. van Hentenryck, M. Agren, P. Flener, J. Pearson. Tractable Symmetry Breaking for CSPs with Interchangeable Values. Eighteenth International Joint Conference on Artificial Intelligence, Acapulco, Mexico, 2003, pp. 277–282. 21. S. Kasif. On the Parallel Complexity of Discrete Relaxation in Constraint Satisfaction Networks. Artificial Intelligence vol. 45, Elsevier, 1990, pp. 275–286. 22. P. Meseguer, C. Torras. Exploiting Symmetries Within Constraint Satisfaction Search. Artificial Intelligence vol. 129 nos. 1–2, 2001, pp. 133–163. 23. M. Moskewicz, C. Madigan, Y. Zhao, L. Zhang, S. Malik. Chaff: Engineering an Efficient SAT Solver. Thirty Eighth Design Automation Conference, Las Vegas, 2001, pp. 530–535. 24. J.-F. Puget. On the Satisfiability of Symmetrical Constrained Satisfaction Problems. J. Komorowski, Z. W. Ras (eds.), Methodologies for Intelligent Systems, International Symposium on Methodologies for Intelligent Systems, Lecture Notes in Computer Science vol. 689, Springer-Verlag, 1993, pp. 350–361. 25. C. M. Roney-Dougal, I. P. Gent, T. W. Kelsey, S. A. Linton. Tractable Symmetry Breaking using Restricted Search Trees. Sixteenth European Conference on Artificial Intelligence, Valencia, Spain, 2004 (to appear). 26. M.-C. Silaghi, D. Sam-Haroud, B. Faltings. Ways of Maintaining Arc Consistency in Search Using the Cartesian Representation. New Trends in Constraints, Joint ERCIM/Compulog Net Workshop, Lecture Notes in Computer Science vol. 1865, Springer-Verlag, 2000, pp. 173–187. 27. C. Thiffault, F. Bacchus, T. Walsh. Solving Non-Clausal Formulas with DPLL Search. Seventh International Conference on Theory and Applications of Satisfiability Testing, 2004 (to appear). 28. T. Walsh. SAT v CSP. Sixth International Conference on Principles and Practice of Constraint Programming, Lecture Notes in Computer Science vol. 1894, Springer-Verlag, 2000, pp. 441–456. 29. R. Weigel, B. V. Faltings. Compiling Constraint Satisfaction Problems. Artificial Intelligence vol. 115, 1999, pp. 257–287.

13 30. R. Weigel, B. V. Faltings, B. Y. Choueiry. Context in Discrete Constraint Satisfaction Problems. Twelfth European Conference on Artificial Intelligence, Budapest, Hungary, 1996, pp. 205–209.

graph K DIR IDIR DSJC125.5 7 7368 (2.28) 5931 (1.98) DSJC125.9 7 2695 (0.72) 2602 (1.36) DSJC250.9 8 9442 (5.70) 10017 (8.48) mulsol.i.1 7 5667 (1.81) 2568 (1.04) mulsol.i.2 7 9055 (3.59) 2207 (0.79) mulsol.i.3 7 9598 (3.92) 2234 (0.84) mulsol.i.4 7 8073 (3.15) 2101 (0.80) mulsol.i.5 7 7388 (2.81) 2232 (0.84) zeroin.i.1 7 3648 (1.15) 3469 (1.60) zeroin.i.2 7 5497 (2.29) 3037 (1.27) zeroin.i.3 7 5337 (2.22) 3106 (1.36) anna 8 8196 (2.79) 9248 (3.83) david 8 5616 (1.47) 3469 (0.71) homer 8 7861 (3.08) 6850 (3.16) huck 8 5947 (1.73) 5904 (1.73) jean 8 5803 (1.42) 4259 (0.93) miles500 7 2834 (0.48) 7950 (6.88) miles750 8 8484 (3.82) 8805 (4.90) miles1000 8 20676 (20.68) 8260 (4.96) miles1500 8 33175 (43.45) 16907 (18.36) queen8 12 8 20785 (15.32) 9105 (3.86) queen9 9 8 12055 (5.33) 11842 (5.78) queen10 10 8 20256 (19.21) 13240 (9.10) myciel5 4 13152 (1.01) 5822 (1.00) myciel6 4 26212 (5.07) 11638 (3.95) myciel7 4 31565 (8.85) 16810 (9.87) school 7 4341 (1.33) 2989 (1.14)

Fig. 3. Results on vertex colouring problems

14

graph GEOM60 GEOM70 GEOM80 GEOM90 GEOM100 GEOM110 GEOM120 GEOM40a GEOM50a GEOM60a GEOM70a GEOM80a GEOM90a GEOM100a GEOM110a GEOM120a GEOM40b GEOM50b GEOM60b GEOM70b GEOM80b GEOM90b GEOM100b GEOM110b GEOM120b

K DIR IDIR SUP ISUP 32 5390 (0.75) 8282 (0.91) 2316 (0.74) 3200 (1.21) 35 12970 (3.08) 24628 (5.28) 7278 (5.78) 10037 (6.98) 32 10118 (6.84) 9828 (3.20) 3462 (5.39) 7599 (8.05) 31 7250 (3.27) 10948 (2.59) 2810 (4.20) 3977 (4.66) 31 10194 (8.33) 10087 (3.49) 2161 (4.33) 1577 (2.94) 31 9359 (5.73) 12483 (4.61) 1945 (3.98) 1238 (2.26) 31 7130 (4.88) 6157 (2.25) 2021 (5.38) 1128 (2.80) 32 7045 (2.22) 9575 (2.03) 3021 (2.26) 2618 (1.56) 30 8282 (4.39) 7811 (3.24) 1853 (3.36) 1339 (2.23) 30 9788 (5.00) 10035 (3.64) 2427 (5.99) 1124 (2.69) 30 5201 (2.95) 7055 (2.14) 2392 (5.36) 1680 (3.70) 30 5837 (3.55) 9587 (3.03) 1506 (3.94) 667 (1.74) 30 6238 (3.58) 5977 (2.18) 1554 (4.06) 655 (2.14) 28 4635 (1.62) 5308 (1.53) 1852 (6.57) 1218 (4.58) 28 6626 (3.21) 5902 (1.66) 1136 (3.62) 620 (2.49) 28 7078 (3.36) 5863 (1.63) 1869 (7.11) 731 (3.37) 32 5132 (2.31) 10087 (2.29) 2268 (2.01) 1855 (1.58) 29 3982 (1.21) 9874 (4.56) 3770 (5.91) 3126 (4.85) 30 4278 (1.40) 10272 (3.81) 1931 (3.50) 2203 (3.91) 27 2992 (0.45) 8092 (3.38) 1624 (3.27) 929 (2.24) 27 5882 (3.33) 9390 (4.91) 1607 (4.67) 830 (3.09) 27 4327 (1.42) 8271 (4.35) 818 (4.21) 551 (2.77) 27 4374 (1.23) 9043 (5.16) 1136 (6.19) 654 (3.68) 27 8581 (5.49) 11185 (12.85) 1375 (7.87) 515 (3.47) 29 8378 (4.95) 10941 (8.79) 1007 (7.62) 724 (5.60)

Fig. 4. Results on bandwidth colouring problems

Uncertainty

69

Modeling Uncertain Dynamical Systems and Solving Behavioural Constraints using Probabilistic Constraint Nets Robert St-Aubin and Alan K. Mackworth University of British Columbia {staubin,mack}@cs.ubc.ca

Abstract. Computer-controlled systems are becoming ubiquitous. Most of these systems exhibit uncertainty, rendering their behaviour somewhat unpredictable. For some systems, this unpredictability can be overlooked. However, for many systems, such as safety critical systems, the uncertainty arising can have dramatic effects. In order to handle such systems, we need a formal modeling framework and a methodology for analyzing them. In systems responding to users requests, for instance, an analysis could be performed to show that a time of service property is satisfied on average. We have developed Probabilistic Constraint Nets (PCN), a new framework that can handle a wide range of uncertainty, whether it be probabilistic, stochastic or non-deterministic. In PCN, we view probabilistic dynamical systems as online constraint-solvers for dynamic probabilistic constraints and requirements specification as global behavioural constraints on the systems. We present verification rules, which have been fully implemented, to perform automatic behavioural constraint verification. Finally, we demonstrate the utility of our framework by applying it to a simple robotic surveillance system.

1

Introduction and Motivation

Using constraints to model systems is a widely studied approach. This approach has lead to the fruitful constraint programming paradigm. However, despite the advances in the Constraint Satisfaction Problem (CSP) framework, one area that still remains to be explored in depth is the constraint-based design of dynamical systems. Dynamical systems cannot be handled in an offline approach, as is often the case for CSP, but rather should be seen as online constraint satisfying systems. Therefore, to model dynamical systems, we must move beyond the typical offline constraint satisfaction model and develop a paradigm where constraints are solved dynamically as the system evolves in time. One proposed solution, Constraint Nets (CN), was developed by Zhang and Mackworth [1, 2]. The approach describes a model for building deterministic hybrid intelligent systems as situated agents. However, real-time dynamical systems commonly behave unpredictably and thus often exhibit (structured) uncertainty. We have augmented the CN framework so that we can model, and reason about, stochastic constraint-based hybrid dynamical systems. We call this new framework the Probabilistic Constraint Nets (PCN) model [3, 4]. We provide, within PCN, a

Fig. 1. The structure of a constraint-based agent system

modeling environment based on arbitrary time and domain structures, making it suitable for modeling hybrid systems. The coupled relationship between the constraints on an agent and its (uncertain) environment is shown in detail in Fig. 1. As shown here, we consider three common ways in which the uncertainty components can enter a system: uncertain dynamics, sensor noise and external disturbance. We model an agent as composed of two distinct constraint-based modules: a body with its various sensors and actuators, and a controller which is the module that controls the behaviour of the agent. The body senses the uncertain environment and reports to the controller on the perceived state of the environment. In turn, the controller then sends appropriate control signals, based on the updates, to the actuators of the body to perform the required actions. These actions affect the state of the world, hence changing the agent’s environment. The constraints imposed on the system’s dynamics represent local behavioural constraints. However, to ensure that a certain system obeys global behavioural constraints, we have also developed a formal behavioural constraint language, average-timed ∀-automata, and a set of verification rules which enable us to perform global behavioural constraint satisfaction for properties of systems, such as safety, goal reachability and bounded time response [3, 4]. In the remainder of this paper, we will show that the solutions to PCN models are, in general, Markov processes. Moreover, for a class of systems where the uncertainty diminishes as the system reaches the equilibrium, we will show that a stochastic equivalent to the property of monotonicity of the convergence to the equilibrium can be characterized by stochastic Lyapunov functions. Based on ideas from Lyapunov stability, we will then introduce the global behavioural constraint modeling language, average-timed ∀-automata and briefly introduce the rules developed for constraint satisfaction. We will conclude with an application to a mobile robotic surveillance system.

2

Modeling Stochastic Constraints within PCN

Dynamical systems have requirements imposed on their dynamics. For instance, some given restrictions can stipulate how a mobile robot should roam around, or which laws of physics the system should obey. In addition, to define a system completely, one also needs to impose constraints on the system’s desired global behaviour such as: a mobile robot should not run into human beings when interacting in a human-populated environment. The set of constraints on the dynamics and the behaviour defines the dynamical system as a whole. In general, most constraint modeling frameworks fall short of being able to model these constraints in an efficient and sound manner. Moreover, with systems exhibiting uncertainty, the notion of stochastic constraints is usually beyond the capability of existing frameworks. To bridge the gap between such systems and available methodologies, we introduce a formal framework which allows the user to model uncertain dynamics as well as behavioural constraints. The PCN framework allows for a complete hybrid modeling approach, where one can model time and domains as either discrete, continuous or both, and uncertainty in many different forms: probabilistic as in a Markov Chain, or stochastic as with Brownian Motion and stochastic differential equations. The flexibility of our framework allows a designer to model a complex system while remaining under the umbrella of a single modeling language. Let us now introduce the basic syntax of PCN. 2.1

Syntax of PCN

Definition 21 (Probabilistic Constraint Nets) A probabilistic constraint net P CN is a tuple hLc, T p, T d, Cni, where Lc is a finite set of locations, each associated with a sort; T d is a finite set of labels of transductions, each with an output port and a set of input ports, and associated with a sort; T p is a finite set of labels of probabilistic transductions, each with an output port and a set of input ports, and associated with a sort. Each probabilistic transduction is associated with a given probability distribution. Cn is a set of connections between locations and ports of the same sort, with the restrictions that: (1) no location is isolated; (2) there is at most one output port connected to each location; (3) each port of a transduction connects to a unique location. A location can be regarded as a wire, a channel, a variable, or a memory location. Its value changes over time, whether it be based on a certain reference time, or on external events. We say that a location l is an output location of a transduction F if and only if it is connected to an output port of the transduction; otherwise l is an input location. A probabilistic constraint net is open if it possesses an input location, otherwise it is closed. A PCN can be represented by a bipartite graph where locations are depicted by circles, transductions by boxes (doubled boxes for probabilistic transductions) and connections by arcs. Individual PCN modules are denoted by rounded boxes. As a running example throughout this paper, we will consider a museum director who wants to use a fleet of mobile robots to survey the different exposition

Fig. 2. Dynamics of a mobile robot as a PCN

rooms in the museum. Each robot would offer surveillance in a given subset of the rooms, ensuring that the visitors do not damage, or steal, the art work. A precise continuous model of the (uncertain) dynamics of the mobile robot can easily be modeled in PCN, as shown in Fig. R t 2, where the double-boxed integral transduction represents an Itˆ o integral, t01 dWt , and Wt is a standard Wiener process. In this PCN model, the control inputs v and α dictate the velocity and the direction to the body of the mobile robot, whose position is defined by its (noisy) (x, y) location and its (noisy) orientation θ. 2.2

Topological Approach to Stochastic Dynamic Systems

The PCN framework is built upon the topological structure of time, domains, traces and transductions; each of which are basic elements of stochastic dynamic systems. Let us now present the elementary definitions. Time structures One important concept in the modeling of dynamical systems is the notion of time. Dynamical systems evolve over time, some in discrete increments while others do in continuous or event-based fashion. Since we are interested in modeling and analyzing systems with discrete and continuous components, we need to formalize time using abstract structures which capture the important aspects of time: linearity, metric and measure. A time structure, in general, can be considered as a linearly ordered set with a start time point, an associated metric for quantifying the distance between any two time points and a measure for estimating the duration of time. Formally, a time structure is a triple hT , d, µi, where – T is a linearly ordered set hT , ≤i with 0 as the least element,

– hT , di forms a metric space with d as a metric satisfying: ∀t0 ≤ t1 ≤ t2 , d(t0 , t2 ) = d(t0 , t1 ) + d(t1 , t2 ), – hT , d, µi forms a measure space with µ as a Borel measure. Although our definition of time structures is general, discrete or continuous time structures are most commonly used. 2.3

Domain structures

Similarly to time, we formalize domains as abstract structures. This approach allow us to uniformly define discrete as well as continuous domains. We consider two main types of domains: (1) a simple domain or, (2) a composite domain. A simple domain is a pair hA ∪ {⊥A }, dA i where A is a set, ⊥A 6∈ A means undefined, and dA is a metric on A. A composite domain is the product of a family of domains {hAi ∪ {⊥Ai }, dAi i}ni=1 . 2.4

Trace and event structures

A trace intuitively denotes changes of values over time, characterized by the set of input and output locations. Formally, a trace is a mapping v : T × Ω → A from time T to a domain A, where Ω is the event space of the system under study. Ω may be omitted when no ambiguity arises. For example if Xt (ω), ω ∈ Ω is a random variable defined on a proper probability space, T = R+ , and A = R, v1 = λt. cos(Xt (ω)) and v2 = λt.e−Xt (ω) are traces. An event trace is a trace with a Boolean domain. An event in an event trace is a transition from 0 to 1 or from 1 to 0. Any event trace generates a sample time structure which is semi-discrete and well-defined [1]. 2.5

Deterministic and Probabilistic Transductions

Deterministic transductions are causal mapping from input traces to output traces over time: F : AT1 1 → AT2 2 , where AT denotes a trace space. Transductions are activated either by a certain reference clock or by external events. By causal mapping we mean that the output at any time depends only on inputs up to that time, that is, the future cannot influence the present or the past. In order to model the uncertainty in systems, we introduce the notion of probabilistic transductions. A probabilistic transduction acts as a random number generator, following a given probability distribution. In practice, probabilistic transductions can be represented as discrete (e.g. Poisson, uniform) or continuous (Gaussian, exponential) probability distributions. Within PCN, we consider two distinct classes of transductions: primitive transductions and event-driven transductions. Primitive transduction are composed of two basic types of transductions: transliteration and delays. For a time structure T , a transliteration fT : AT1 1 → AT2 2 is the pointwise extension of the function f : A1 → A2 . Intuitively, transliterations can be seen as

a transformational process without internal state (memory). A simple example of a transliteration is a combinational circuit without delay. A delay on discrete time structure is a process where the output value at time t is the input value at time t − 1. The extensions to transport delays, i.e., delays on non-discrete time structures, is straightforward. Intuitively, delays can be seen as a unit memory. Note that although transliterations can be basic probabilistic transductions, delays are only well-defined as deterministic transductions.

3

Semantics of PCN

So far, we have introduced the syntactical structure of probabilistic constraint nets. However, although syntax is useful in creating a model, it does not provide a meaning to this model. Therefore, we need to provide a proper semantics for our modeling framework. As mentioned earlier, transductions are mappings from input traces to output traces. By observing the relationship between each transduction and its set of input/output locations, we can see that a PCN P denotes a set of equations o = F(i, o) where each function F corresponds to a transduction of P and each variables corresponds to a location in P. Hence, the semantics of the PCN P is the solution of the set of equations, which we denote [[P]]. Although the PCN framework allows for the modeling of almost any type of uncertainty, in order to guarantee that we obtain well defined systems at all times we need to impose some restrictions on the choice of uncertainty models. One such restriction is the non-Zeno property. This condition is necessary to prevent degenerate systems which produce an infinite number of transitions within a finite interval of time. Moreover, we will assume that when modeling systems with (stochastic) differential equations, the noise term is to be modeled via a Wiener process (Brownian motion). In fact, this is not really a restriction since the Wiener process is the only stochastic process, providing an adequate model of noise, which has continuous sample paths [5]. Example 1. To illustrate the difference between a deterministic system and a perturbed system, we compare in Fig. 3, the two dynamical systems with nominal component X˙ t = vcos(θ), representing the x position of the mobile robot in the museum surveillance example. For simplicity, we assume that the control signals v (velocity) and θ (direction) are constant. Fig. 3(a) show a noise-free system. In this case, we can see that the system is moving forward linearly, with slope vcos(θ). In Fig. 3(b) we show what happens for a system affected by a white noise. This system, although moving forward on average, moves unpredictably as its progress is retarded or advanced by the noise. We can show, under the assumptions of non-Zenoness and Brownian motion noise, that PCN models generate equations whose solutions are stochastic process, namely Markov processes. For PCN models on discrete or event-based time structure and with finite memory, it is straightforward to show that the generated processes will either be Markov chains or Markov processes, depending on

X position: no noise

90

80

80

70

70

60

60

50

50

40

40

30

30

20

20

10 0

X position: noisy

100

90

X(t)

X(t)

100

10

0

10

20

30

40

time

(a) Fig. 3:

50

60

70

80

0

0

10

20

30

40

time

50

60

70

80

(b) (a) ODE: X˙ t = vcos(θ); X0 = 0 (b) SDE: X˙ t = vcos(θ) + Nt ; X0 = 0

the nature of the domains of the locations of the models. The semantics of the PCN framework is related to the concept of labelled Markov Processes as introduced in [6]; however, those authors adopt a higher level modelling approach and focus on the notion of bisimulation for such models. To prove the result for continuous time structures, we need to use the following result on measurability of PCN components. Results are stated here without proof. Theorem 1. Let T a time structure and let F be the set of all transductions for a given PCN, then transliterations, transport delays and event-driven transductions in F are Borel-measurable. Furthermore, if T is discrete, then all transductions in F are Borel-measurable. Combining the result of Theorem 1 with the result arising from the wellknown Existence and Uniqueness Theorem for stochastic differential equations [7, 8], we obtain the main result of this section, which states that the solution of any PCN model of stochastic differential equations is a Markov process. Furthermore, with this result, we can show that if the transductions in F are time-invariant, then the resulting Markov process is also a stationary process [7]. Theorem 2 (PCN Semantics as Markov Process). Let P be a PCN model whose set of equations corresponds to dXt = f (t, Xt )dt + G(t, Xt )dWt , Xt0 = c, t0 ≤ t ≤ T < ∞,

(1)

where Wt is an Rm -valued Wiener process and c is a random variable independent of Wt − Wt0 for t ≥ t0 . If the Rd -valued function f (t, x) and the (d×m matrix)-valued function G(t, x) are defined and measurable on [t0 , T ]×Rd and have the following properties: (a) Lipschitz condition: ∃K > 0, a constant, such that ∀t ∈ [t0 , T ], x ∈ Rd , y ∈ Rd , |f (t, x) − f (t, y)| + |G(t, x) − G9t, y)| ≤ K|x − y|; (b) Restriction on growth: ∃C > 0, a constant, such that ∀t ∈ [t0 , T ] and x ∈ Rd |f (t, x)| + |G(t, x)| ≤ C(1 + |x|),

then [[P]] = Xt is the unique t-continuous solution of Equation 1. Moreover, [[P]] is a Markov process on [t0 , T ] whose initial probability distribution at the instant t0 is the distribution of c [7, 8]. Example 2 (Example 1 revisited). Since deterministic systems are special cases of stochastic systems, it is not surprising that the solution to the system of Fig. 3(a) is a Markov process. However, the lack of uncertainty in the dynamics yields, at each instant t, a probability distribution concentrated at value X0 + tvcos(θ), with zero variance. On the other hand the stochastic system of Fig. 3(b) has for solution a Markov process, which is in fact a Gauss-Markov process, with a Gaussian probability distribution of the form N (X0 + tvcos(θ), t). 3.1

Stability of Stochastic Dynamical Systems

An important notion of stability for stochastic systems is Lyapunov stability [9]. This type of stability can be obtained when dealing with systems whose uncertainty “dies down” as the system evolves in time. Such systems are very common in real life application. For example, remember the mobile robot whose actuators are noisy. The uncertainty induced by the actuators will affect the robot’s travel but this effect will gradually diminish as the robot’s speed approaches 0. Let us consider the general class of PCN inducing stochastic differential equations of the form of Equation 1, for which we assume, without loss of generality, that the unperturbed system has an equilibrium at x = 0. We can show that if the conditions: 1. the G ∈ F affecting the noise term satisfy the condition: R ∞ transductions 2 |G(s)| ds < ∞, t0 2. there exist a (Lyapunov) positive-definite function v(t, x), continuously differentiable with respect to t and twice continuously differentiable with respect to the components xi of x Pd ∂ ∂ + i=1 fi (t, x) ∂x + 3. Lv(t, x) ≤ 0, t ≥ t0 , 0 < |x| ≤ h, where L = ∂t i Pd Pd 2 ∂ 0 1/2 i=1 j=1 (G(t, x)G(t, x) )ij ∂xi ∂xj , are satisfied, then the equilibrium of Equation 1 is stochastically stable. Stochastic Lyapunov stability of a system Xt relies on the property that the distance, measured by v(t, Xt ), of Xt from the equilibrium does not increase on the average. This concept along with the notion of Lyapunov functions, are central to the behavioural constraint satisfaction method that we present in the next section.

4

Behavioural Constraints

Given the semantics presented above, the online satisfaction of the constraints on the dynamics of a stochastic dynamical system ensures that its behaviour is a stochastic process that is a solution to the set of equations it generates. Such constraint satisfaction does not, however, guarantee that the behaviour of

the system will satisfy global temporal constraints. For example, consider once again the dynamics of our mobile surveillance robot. Although the robot will travel according to the laws of motion, it does not guarantee that it won’t hit or hurt people during its travels. Such restrictions constitute global constraints on the behaviour of the system and cannot easily be represented within the PCN modeling language. Hence, we introduced a behavioural constraint language, average-timed ∀-automata, that allows us to represent global constraints on a system’s behaviour [3, 4]. Together with PCN, these two languages will specify the entire set of constraints on a stochastic dynamical system. Before formally discussing the notion of behavioural constraint satisfaction, it is necessary to discuss the relationship between stochastic dynamical systems and their behaviours. Intuitively, the behaviour of a stochastic dynamical system is the set of observable input/output traces of a given system. Let P(I, O) be a PCN module, where hI, Oi is the tuple of input and output locations of the module. Formally, an input/output pair hi, oi is an observable trace of P(I, O) iff ∃F ∈ (T d ∪ T p) such that o = F (i). We define the behaviour B of P(I, O) as the set of all observable traces. For the purpose of this paper, we will restrict ourselves to time-invariant Markovian behaviours over discrete-time structures. A generalization of this approach is available in [3]. Any discrete-time, time invariant, Markovian stochastic dynamical system corresponds to what we call a stochastic state transition system. A stochastic state transition system is a tuple hS, P, Θi where S is a set of states, P : S × S is an evolution kernel representing the transition probability distribution between two states; i.e., P(s1 , s2 ) is the probability of a transition occurring between s1 , s2 ∈ S, and Θ : S → [0, 1] represents the distribution of the initial state of the system. For any discrete time T , v : T → S is a trace of hS, P, Θi iff ∀t > 0, P(v(pre(t)), v(t)) > 0 and Θ(v(0)) > 0, where pre(t) is the time value preceding t. We will denote an allowed transition from v(pre(t)) to v(t) by v(pre(t)) ; v(t). A behaviour B corresponds to a stochastic state transition system hS, P, Θi iff B is equal to the set of all traces of hS, P, Θi. 4.1

∀-Automata

An important method for representing behavioural constraints (or requirements specification) of systems is ∀-automata or, more precisely, the languages accepted by a ∀-automata. This class of methods is well suited to the PCN framework since we can view traces as a generalization of infinite sequences. A desired property of the system (hence its traces) can be specified by an automaton; a trace of a system satisfies the behavioural constraints iff the associated automaton accepts the trace. ∀-automata was proposed in [10, 11] as a specification language for concurrent programs and deterministic dynamical systems, respectively. Formally, a ∀-automaton A is a quintuple hQ, R, S, e, ci where Q is a finite set of automaton states, R ⊆ Q is a set of recurrent states and S ⊆ Q is a set of stable states. With each q ∈ Q, we associate a state proposition e(q), which characterizes the entry condition under which the automaton may start its activity in q. With each pair (q, q 0 ) ∈ Q × Q, we associate a state proposition

A

A G

G

B E

(a)

E

(b)

E

E

(c)

Fig. 4. ∀-Automata Constraints: (a) goal achievement (b) safety (c) bounded response

c(q, q 0 ), which characterizes the transition condition under which the automaton may move from q to q 0 . R and S are generalizations of accepting states to the case of infinite inputs. We denote by B = Q − (R ∪ S) the set of non-accepting (bad) states. Let T be a discrete time structure, A be a domain and v : T → A be a trace. A run of A over v is a mapping r : T → Q such that (1) v(0) |= e(r(0)); and (2) for all t > 0, v(t) |= c(r(pre(t)), r(t)), where φ |= ψ denotes that φ satisfies ψ. If r is a run then let Inf (r) denote the set of automaton states which appears infinitely often in r. Let A be a ∀-automaton. A run r over A is defined to be accepting iff it satisfies at least one of the two conditions: 1. Inf (r) ∩ R 6= ∅; i.e., some of the states appearing infinitely many times in r belong to R, or 2. Inf (r) ⊆ S; i.e., all the states appearing infinitely many times in r belong to S. Essentially, the notion of acceptance of traces specifies that the system either always eventually returns to the set of recurrent states R or eventually remains forever within the stable set S. Formally, a ∀-automaton A accepts a trace v, written v |= A, iff all possible runs of A over v are accepting. Let us now consider some typical behavioural constraints for dynamical systems, where stable and recurrent states in Q are marked with 2 and 3, respectively. In Fig. 4(a) we represent a goal satisfaction constraint which accepts the traces of a system that will eventually always satisfy the goal condition G. Fig. 4(b) is a global safety constraint which states that an acceptable system should never satisfy the bad condition B. Fig. 4(c) is a constraint of bounded response. It states that whenever event E occurs, the response A will follow in bounded time. 4.2

Average-timed ∀-automata

Meaningful behavioural constraints on dynamical systems often include temporal components such as deadlines and real-time response. Since we are interested in solving behavioural constraints on stochastic systems, we usually cannot reason about satisfying a given time constraint perfectly. Rather, we need to reason

about satisfying time constraints on average and thus we proposed the notion of average-timed ∀-automata [3, 4]. Average-timed ∀-automata are ∀-automata augmented with timed automaton states and average time bounds An average-timed ∀-automaton ATA is a triple hA, T, τ i where A = hQ, R, S, e, ci is a ∀-automaton, T ⊆ Q is a set of average-timed automaton states denoted by a positive real number indicating its average time bound, and τ : T ∪ {bad} → R+ ∪ {∞} is an average timing function. A run r is accepting for ATA iff 1. r is accepting for A and 2. r satisfies the average time constraints. If I ⊆ T is an interval of T and q ∗ : I → Q is a segment of run r,Pwhere q ∗ = r|I , let µ(q ∗ ) denote the measure of q ∗ , i.e., µ(q ∗ ) = µ(I) = t∈I µ(t), since I is discrete. Let Sg(q) be the set of segments of consecutive q’s in r, i.e., q ∗ ∈ Sg(q) implies ∀t ∈ I, q ∗ (t) = q. The run r satisfies the local time constraint iff ∀q ∈ T, q ∗ ∈ Sg(q), E(µ(q ∗ )) ≤ τ (q). An average-timed ∀-automaton ATA accepts a trace v, written v |= ATA, iff all possible runs of ATA over v are accepting. As an example, Fig. 4(d) depicts the real-time response constraint which states that R will be reached within 30 time units of B.

5

Model-checking Approach to Constraint-Based Behaviour Verification

The formal behaviour verification method consists of a set of model-checking rules. The rules, which were introduced in [4, 3], are a generalization of the rules for deterministic dynamical systems [11]. Here we briefly summarize the verification rules and results for the simplest possible situation: discrete time and discrete domains. A generalization of the rules for arbitrary time and domains, and the proofs of the following results are available in [3]. Our verification method has three categories of rules: Invariance rules (I), Stability (Lyapunov-based) rules (S) and Average Timeliness rules (AT). Assume ATA is an average-timed ∀-automaton hA, T, τ i which represents the behavioural constraints for a stochastic state transition system hS, P, Θi. Moreover, let {ϕ}B{ψ} denotes the consecutive condition: ϕ(s) ∧ (s ; s0 ) → ψ(s0 ). (I) Invariance Rules We define the set of propositions {αq }q∈Q as a set of invariants for the behaviour B and specification A iff 1. Initiality: ∀q ∈ Q, Θ ∧ e(q) → αq , and 2. Consecution: ∀q, q 0 ∈ Q, {αq }B{c(q, q 0) → αq0 },

(S) Stability Rules Let {αq }q∈Q be a set of invariants for B and A as defined above. A set of partial functions {ρq }q∈Q is called a set of Lyapunov functions for B and A iff ρq : SB → R+ satisfies the following conditions: 1. Definedness: ∀q ∈ Q, αq → ∃w ∈ R+ , ρq = w, 2. Non-increase: ∀q ∈ S, q 0 ∈ Q, {αq ∧ ρq = w}B{c(q, q 0 ) → E(ρq0 ) ≤ w}, and 3. Decrease: ∃ > 0, ∀q ∈ B, ∃q 0 ∈ Q, {αq ∧ ρq = w}B{c(q, q 0 ) → ρq0 − w ≤ −}. (AT) Average-Timeliness Rules Let ATA = hA, T, τ i be an average-timed ∀-automaton. Assume, without any loss of generality, that time is encoded in the stochastic state transition system. We now define local timing functions, associated with the local average time bounds. Once again, let {αq }q∈Q be a set of invariants for B and A. A set of partial functions {γq }q∈T is called a set of local timing functions for B and ATA iff γq : SB → R+ satisfies the following conditions: – Boundedness: ∀q ∈ T, αq → λ ≤ γq ≤ τ (q). – Decrease: ∀q ∈ T, {αq ∧ γq = w ∧ E(λ) = l}B{c(q, q) → E(γq ) − w ≤ −l}. The following theorem stipulates that if we satisfy rules (I), (S) and (AT), then the behaviour verification is sound and complete. Theorem 3 (Verification Rules). For any state-based and time-invariant behaviour B with an infinite time structure and a complete average-timed ∀-automaton ATA, the verification rules are sound and complete; i.e., B |= ATA iff there exist a set of invariants, Lyapunov functions and local timing functions. The above rules, however, do not guarantee the existence of an automatic verification method. Nevertheless, for PCNs with finite domains we can fully automate the verification of an average-timed ∀-automata constraint on the behaviour. We have implemented an automatic verification algorithm which we apply to our robotic surveillance system in the next section. Details of the algorithm are omitted here but presented in [3].

6

Modeling and Analyzing a Robotic Surveillance System

To demonstrate the utility of our approach, we analyze a simple version of the museum surveillance task introduced earlier. For the sake of simplicity, we will, in this example, model a lone mobile robot surveying two of the museum rooms, trying to ensure that the many works of art are not being damaged or stolen by the visitors. We emphasize the behavioural constraint satisfaction problem, i.e., show that the safety of the work of art will be ensured. For a complex example of an hybrid elevator system where the modeling and the constraint satisfaction tasks are presented in detail, the reader is referred to [3]. In Fig. 5, we depict the environment in which the mobile surveillance robot (located on square 1) must operate. The environment is made up of two rooms, Regular Exposition and Main Showroom. We will assume that the limitations on

Fig. 5. Museum Environment in the Surveillance Task

the vision system of the robot are such that, the robot can only survey elements located in the same subdivision as itself. These subdivisions are numbered from 1 to 10 in Fig. 5. In addition, we will assume that the velocity of the robot is such that movement from one square to another takes constant time, δ = 3 minutes. Let us consider the scenario where the museum director is interested in ensuring that the main showroom (room 10 in Fig. 5) is surveyed regularly by the mobile robot. Specifically, the robot should come back to the main showroom every τ = 30 minutes, on the average. This behavioural constraint can be represented by the average-timed ∀-automaton of Fig. 6(a). In addition, the director decides to adopt the strategy for the dynamics that entails the robot to move clockwise (going from square 1 → 2 → 3 → 4 → 7 → 8 → 9 → 10 → 1 as shown in Fig. 5). However, the entrance to the main showroom can be obstructed (like it is the case in Fig. 5 where the entrance from square 9 to 10 is blocked by a visitor). In this case, the robot, rather than pushing the visitor aside, would simply change its trajectory and move toward square 6, then 1, and then resume a tour of the museum. We will assume that the robot can only enter the main showroom via square 9, the other access being reserved exclusively for exiting the main show room. One non-desirable situation is the one where visitors obstruct the entrance to the main showroom permanently. In this case, the robot would never access the room, hence never offering surveillance in that room. However, this situation is quite unlikely. Rather, a more realistic scenario would be that there is some probability, say p = 0.2, that the entrance is blocked at any given time. More complex models for uncertainty such as a Poisson process could be used to model the arrivals of visitors at the entrance door [3]. Given the dynamics of our system and the specification of the behavioural constraints, we can associate the behaviour of our system with the stochastic transition system shown in Fig. 6(b).

1

15 1

τ (B)=30

9

(8)

(9) 1−p

p

IR

18 1

IB

(7)

1

12

R

B

IR

(4)

(a)

0

(6)

(10)

1

21

IB

30

(3)

1

24

1

(2)

27 (1)

1 1

(b)

Fig. 6. Robotic Surveillance System: (a) Average-timed ∀-automata Behavioural Constraint; (b) Stochastic State Transition System of the Behaviour

The corresponding state space consists solely of the square on which the robot is located: S = {loc}. The evolution kernel P is very simple as most transitions are deterministic, except for the one leading to the main showroom, which is uncertain due to the possible presence of visitors blocking the entry. Nevertheless, the transition probability values are depicted beside the head of the arrows in Fig. 6(b). The verification rules presented previously require that we find invariants values, Lyapunov functions and timing functions: I: To find the set of invariants for the average-timed ∀-automata in Fig. 4(d), let us define IB : loc 6= 10 and IR : loc = 10. It is easy to see that IB and IR are invariants for states B and R, respectively. Note that S = ∅ in our example. In Fig. 6(b), bad states B are denoted by white nodes while the only recurrent state R is denoted by a filled node. S: Given the invariants constructed above, we define a set of Lyapunov functions ρ, whose value is the average number of transitions for reaching state R. It is easy to show that these Lyapunov functions satisfy the Stability rules. AT: Given the invariants and the Lyapunov functions, we need to choose a set of local timing functions γ. It is easy to show that a set of functions which corresponds to the average time to reach the recurrent state R satisfies the average-timeliness rules. The values of γ are shown for each state as the number in the state nodes in Fig. 6(b). Therefore, using the rules, we have shown that the average time for the surveillance robot to perform a round and come back to the main showroom is 30 ≤ 30 minutes, which satisfies the behavioural constraint. Note that this is not an absolute bound on the value. The completion time of an instance of the request may exceed 30 minutes. With our method, we can additionally obtain probability bounds on possible times of service. For our surveillance example we can show that the probability that the time for the mobile robot to return to main showroom be greater than 120 minutes is less than or equal to 0.075. This provides the museum director valuable additional knowledge about the safety of the surveillance system.

7

Conclusion

In this paper, we have provided the formal syntax and semantics for a useful framework, PCN, for constraint-based modeling of the dynamics and behaviours of systems exhibiting uncertainty. We show that the semantics lead to Markov processes, and in many cases to stable probabilities on the state space. The PCN framework abstracts the notions of time and domains for a general approach while allowing the user to model uncertainty of several different types. To allow the expression of constraints on both the dynamics and behaviours of systems, we provide two modeling languages: PCN and average-timed ∀-automata. PCN is based on a data-flow model and provides a graphical and modular representation which simplifies the task of modeling complex uncertain dynamical systems. Average-timed ∀-automata are non-deterministic automata augmented with average time bounds. Finally, we provide a set of rules, which in some cases can be fully automated, to verify the satisfaction of global behavioural constraints. We demonstrate the use of the method on a simple hybrid robotic system for surveillance. Future directions for this work include the modification of our behavioural constraint satisfaction methodology to allow for probabilistic satisfaction, that is, satisfying the constraints not on average but with a given probability threshold. In addition, we are also investigating the use of the stochastic Lyapunov stability method for performing control synthesis for PCN models.

References 1. Zhang, Y., Mackworth, A.K.: Constraint nets: a semantic model for hybrid systems. Journal of theoretical computer science 138 (1995) 211–239 2. Mackworth, A.K., Zhang, Y.: A formal approach to agent design: An overview of constraint-based agents. Constraints 8 (2003) 229–242 3. St-Aubin, R., Mackworth, A.K.: Constraint-based approach to modeling and verification of probabilistic hybrid systems. Technical Report TR-2004-05, University of British Columbia, www.cs.ubc.ca/spider/staubin/Papers/TR-04-05.pdf (2004) 4. St-Aubin, R., Mackworth, A.K.: Probabilistic constraint nets: A constraint-based approach to hybrid dynamical systems with uncertainty. (In: Submitted to CP04) 5. Knight, F.B.: Essentials of Brownian motion and diffusion. American Mathematical Society (1981) 6. Desharnais, J., Edalat, A., Panangaden, P.: Bisimulation for labeled markov processes. Information and Computation 2 (2002) 163–193 7. Arnold, L.: Stochastic Differential Equations: theory and applications. (1974) 8. Øksendal, B.: Stochastic Differential Equations: an introduction with applications. 4th edn. Springer (1995) 9. Khas’minskiy, R.Z.: Stability of systems of differential equations in the presence of random disturbances. Nauka Press, Moscow (1969) 10. Manna, Z., Pnueli, A.: Specification and verification of concurrent programs by ∀-automata. In: 14th Ann. ACM Symp. on Princ. of Progr. Lang. (1987) 1–12 11. Zhang, Y., Mackworth, A.K.: Specification and verification of hybrid dynamic systems by timed forall-automata. In Alur, R., Henzinger, T., Sontag, E., eds.: Hybrid Systems III. Verification and Control. Number 1066 in LNCS. SpringerVerlag (1996)

Super Solutions for Combinatorial Auctions ? Alan Holland and Barry O’Sullivan Cork Constraint Computation Centre Department of Computer Science, University College Cork, Ireland {a.holland,b.osullivan}@cs.ucc.ie

Abstract. Super solutions provide a framework for finding robust solutions to Constraint Satisfaction Problems [5, 3]. We present a novel application of super solutions to combinatorial auctions in which a bid may be disqualified or withdrawn after the winners are announced. We examine the effectiveness of super solutions in different auction scenarios that simulate economically motivated bidding patterns. We also analyze the drawbacks of this approach and motivate an extension to the framework that permits a more flexible and realistic approach for determining robust solutions.

1 Introduction Many auctions involve the sale of various distinct items in which bidders perceive complementarity or substitutability between them. When auctioning such items, the auctioneer typically packages them in such a way as to maximize the complementarities amongst them and then puts these packages up for auction. When selling a farm, for example, it may be sold as a single item or divided into separate packages such as the farmhouse, outhouses, sites overlooking the beach, arable and non-arable land. When deciding on how to package the sale, it is impossible to know for sure what packages would maximize revenue. Bidders may view the complementarities between items differently and as the size of the auction grows it quickly becomes impossible for the auctioneer to know how the items should be packaged. It is more economically efficient for the bidders to bid on combinations of items. Unfortunately the number of possible combinations of items of interest to each bidder grows exponentially as the number of items increases. The bids also need to be communicated to the auctioneer in a concise manner, which becomes increasingly difficult in large auctions. The objective is typically to maximize revenue when selling items in a forward auction and to minimize cost when procuring items in a reverse auction. We consider the scenario where optimum revenue is non-essential but a good robust solution is essential. A good solution is one whose revenue is within a percentage of the optimum. A good robust solution is a good solution for which we know that even if winning bids are withdrawn another good solution can be found. Robust solutions are desirable in ?

This work has received funding from Science Foundation Ireland (Grant Number 00/Pl.1/C075) and from Enterprise Ireland, Research Innovation Fund (Grant Number RIF2001-317).

scenarios where suppliers or customers are unreliable and a good solution needs to be found with minimal upset to other bidders. This paper is organized as follows. Section 2 introduces combinatorial auctions and describes the Winner Determination Problem. Section 3 presents super solutions and briefly discusses how they can be applied to combinatorial auctions. Section 4 outlines the experimental results achieved when finding super solutions with respect to various objectives one may wish to consider. It also tackles the optimization problems of finding a super solution with maximal robustness and revenue. Section 5 describes some of the limitations of super solutions and proposes an extension to the framework to overcome these difficulties. Some concluding remarks are made in Section 6.

2 Combinatorial Auctions Combinatorial auctions fall into two categories, forward and reverse. In a reverse auction the auctioneer is seeking to procure goods and therefore minimize cost. If it is possible to purchase more items than are strictly necessary, the problem is known as a Set Covering Problem. The buyer may choose to stipulate in the auction rules that no surplus items are to be purchased. With the introduction of this constraint this problem becomes a Set Partition Problem. In the remainder of this paper we focus our attention on forward auctions, where items are being sold and the objective is to maximize revenue. However, we will present our motivation for our interest in combinatorial auctions briefly below before considering forward auctions in more detail. 2.1 Motivation The popularity of online auctions has increased in recent years because the internet promises to promote competition, thereby increasing revenue for the auctioneer. In an auction, where items exhibit complementarities or substitutabilities there exists a phenomenon known as the exposure problem [8]. This occurs when bidders seek a certain set of items but do not want to end up with a subset of the items that they may find valueless. This encourages cautionary bidding tactics that result in depressed bidding. Combinatorial auctions may alleviate the exposure problem by permitting bids on an arbitrary combination of items that suits the bidders needs. In this manner such auctions improve efficiency where items exhibit complimentarities/substitutabilties for the bidders. Such auctions have been used in many real-world scenarios such as procurement for the Mars Corporation [6] and the sale of spectrum licences in America’s Federal Communications Commission (FCC) auctions. The London Transport Authority also operated a combinatorial auction in their procurement of bus services from private operators [9, 8]. The Chilean government have also adopted combinatorial auctions for the supply of school meals to children. In the latter case, the quality of suppliers was considered as well as the bid amount in deciding the winner and the system also ensured there was no monopoly in any individual region. The reported supply costs have fallen by 22% since the adoption of the program [2].

In auctions where complementarities or substitutabilities are exhibited between items, there is a compelling argument for the introduction of combinatorial bidding to improve overall efficiency. Their application is spreading to other areas such as Supply Chain Management [12] that also demand robust solutions. 2.2 Forward Auctions: The Set Packing Problem The auctioneer must determine the winner from all bids received. This is known as the Winner Determination Problem (WDP) and can be represented as a Set Packing Problem (SPP). In this case it is not necessary to sell all items in order to maximize revenue. The SPP can be formulated as follows. Let I be the set of items to be auctioned and V is a collection of subsets of I. Let xj = 1 if the j th set in V is a winning bid and cj signifies the amount of that bid. Also, let aij = 1 if the j th set in V contains i ∈ I. The problem can then be stated as follows: X max cj xj j∈V

s.t.

X

aij xj ≤ 1 ∀i ∈ I

j∈V

We have encoded the SPP as a CSP where variables represent bids and the domains have only two values, 0 and 1, representing failure and success respectively. We have assumed the notion of free disposal1 . Constraints between variables preclude the success of two bids containing the same item. The objective function is to maximize revenue and bid values are determined using a lookup table whose indices are variable-value pairs. An alternative formulation may include variables representing items whose domain consists of values representing the bids that include that item. Although when free disposal is assumed, not all items need to be assigned to bids so a null value is also included in the domain to indicate the item was unsold. Example 1. Consider a simple example where an auctioneer is selling two items and there are four interested parties, bidders x1 , x2 , x3 and x4 (Table 1). Bidders x1 and x2 are interested in the first and second items respectively, bidding $0.60million for the relevant item. Bidders x3 and x4 seek both items only and bid $1.15million and $1.10million for the pair but $0 for each item individually2 . The revenue maximizing solution for the auctioneer is to sell the items separately to x1 and x2 thus securing $1.2million. It is impossible for the auctioneer to know in advance whether combining the items in a single sale would be profitable or not. Combining both items in this case would have resulted in $0.05million of lost revenue, since the winning bid would have been for $1.15million rather than $1.2million. Instead combinatorial auctions allow the bidders decide on parcels of items that suit their needs thereby improving overall efficiency. 1

2

If the notion of free disposal is assumed, not all items need to be covered. In other words, there is no penalty for not selling some items. Such arbitrary complementarities amongst different bidders are often seen in property sales.

Table 1. Bids in Example 1 Items Bidders A x1 x2 x3 x4

0.60 0.00 0.00 0.00

B

AB

0.00 0.60 0.00 0.00

0.00 0.00 1.15 1.10

Example 1 may be encoded as a CSP by taking the four bids as variables with domains containing 0 and 1. Bids x1 and x3 cannot both succeed, since they both require item A, so a constraint is added precluding the assignment in which both variables take the value 1. Similarly, bid combinations x2 and x3 , x2 and x4 , and x3 and x4 cannot win simultaneously. Therefore, in this example the set of CSP variables, V , would be as follows: x1 , x2 , x3 and x4 whose domains are all {0, 1}. The constraints are x1 + x3 ≤ 1, x1 + x4 ≤ 1, x2 + x3 ≤ 1, x2 + x4 ≤ 1 and x3 + x4 ≤ 1. A lookup table, a[i][j], is used to determine the amounts corresponding to variable values and the objective P function, if we wish to optimize, is to maximize the sum of these amounts, max xi ∈V a[i][xi ].

3 Super Solutions & Combinatorial Auctions The purpose of finding super solutions is that if the solution changes slightly, another good solution may be found by changing a limited number of other variables. An (a,b)super solution is one in which at most a variables may lose their values and a repair solution may be found by changing at most b variables [5]. Only a particular set of variables in the solution may be subject to change and these are said to be members of the break-set. For each variable in the break-set, a repair-set is required that comprises the set of variables whose values may change to provide another solution. In an auction, for example, bids may be retracted so are included in the break set. However, if we also used variables to represent the items, these may not break if items may not be withdrawn from an auction after the winners are announced. Robust solutions are particularly desirable for combinatorial auctions, as opposed to single-unit auctions, because bid withdrawals/disqualifications can leave the auctioneer facing the exposure problem that is faced by bidders in single unit auctions. The exposure problem refers to the situation where bidders are left holding a set of items that are essentially valueless. Ideally this set of items would complement items associated with some of the successful bids so the solution may be repaired easily or the items are valued highly by another bidder. In the case of a single-unit auction the solution is inherently robust because if a bid is withdrawn then the second highest bid for that item is chosen as a repair. Example 2. Let us consider a simple example with two variables X and Y ∈ {0, 1}. There are three possible solutions h1, 1i, h0, 1i and h1, 0i. h1, 1i could be considered

a (1,0)-super solution because if either of the variables breaks we are still left with a solution after making 0 changes. However, solutions h1, 0i and h0, 1i may be regarded as (1,1)-super solutions because we can always repair one variable if necessary to form another solution. Similarly, some variables in the break set may not break depending on their value in the solution. Winning bids may be retracted, whilst retraction of losing bids is meaningless and has no effect on the solution. Super solutions need only be recorded for winning bids, hence assignments representing losing bids are said to have robust values. Robust values aid the search for super solutions because we do not have to worry about finding repair solutions for the possible failure of those variables. In an auction scenario, solution failure is only likely to occur when one or more successful bids are withdrawn or disqualified. Consider Example 1, the optimal solution is x1 = 1, x2 = 1, x3 = 0 and x4 = 0. There are two winning bids involved in this solution so we only need to worry about repair solutions for variables x1 and x2 . If x3 , for example, was withdrawn from the auction after the announcement of the winners, it would have no material effect on the solution. The WDP is an optimization problem that seeks to maximize revenue. Therefore, as well as being concerned with finding robust solutions, we also wish to find robust solutions with maximal revenue. The following example highlights this point. Example 3. Consider the auction given in Example 1, with the additional constraint that we require a robust solution and we are willing to compromise on revenue but only by 20%. To be more precise, a (1,1)-super solution that matches the revenue constraint is required. This means that if any winning bid in the solution is withdrawn, a repair solution with revenue within 20% of optimum is necessary. In this case, if we were to choose the optimum solution h1, 1, 0, 0i we would be in trouble if either of the bids were withdrawn. Say x1 was withdrawn or disqualified for some reason, the next best solution in terms of revenue is h0, 0, 1, 0i. However, two variables would need to be changed in order to find a repair, therefore the optimum solution is not a (1,1)-super solution. However, h0, 0, 1, 0i is a (1,1)-super solution because a repair h0, 0, 0, 1i exists. This repair is in itself a super solution, but is dominated in terms of revenue by the previous solution therefore not chosen. Therefore, the best outcome in this situation is to select the (1,1)-super solution h0, 0, 1, 0i, if we wish to find the maximal revenue for a robust solution within 20% of the optimum. It is possible to reformulate the model so that the the only solutions are super solutions [5, 3]. However, we use search because [5] provides evidence of its superior performance over reformulation. Finding super solutions can be computationally expensive [4] so a pure CP approach to the WDP that has an exponential search space does not scale very well. A hybrid approach incorporating OR techniques is required for larger auctions. Section 4 concentrates upon a fixed size of problem (20 items and 100 bids) and shows how (1,b)-super solutions are achievable for tighter revenue constraints in auctions with shorter bids3 . We refer the reader to [4] for a discussion on the difficulty of computing super solutions compared to straightforward CSPs. Some 3

Few items in each bid.

hybrid techniques that could aid the scalability of solving combinatorial auctions are briefly outlined also.

4 Experimental Results In this section we consider the effect of considering robustness in combinatorial auctions. We consider a number of aspects: finding (1,b)-super solutions, optimizing robustness and optimizing revenue. We used the Combinatorial Auction Test Suite (CATS) [7] to generate sample auction data. We generated sample auction problems in which there are 20 items for sale and 100 non-dominated bids4 that produce 100 CSP variables. We have examined smaller combinatorial auctions because a pure CP approach needs to be augmented with global constraints that incorporate OR techniques to increase pruning sufficiently so that thousands of bids may be examined. There are a number of ways to accelerate the search for super solutions in combinatorial auctions although this is not the focus of our work. Polynomial matching algorithms may be used in auctions whose bid length is very small, such as those for airport landing/take-off slots. Another technique may be to use an LP relaxation of the SPP to form an upper bound on potential revenue in sub-branches of the search tree. This is soluble in polynomial time and can therefore greatly improve performance. Such additional techniques, that are outlined in [10], can aid the scalability of a CP approach but our aim in these experiments is to focus upon the robustness of various auction distributions and consider the tradeoff between robustness and revenue. Our experiments use the EFC constraint solver [1] with additional super solution extensions developed by Hebrard et al [4, 5]. Twenty instances of each problem were used to generate average results. We used various distribution types that simulate different economically motivated auction scenarios. The regions-npv distribution is modelled on a scenario in which items are location dependent and complementarity is a function of the proximity of these items in 2-dimensional space, such as in a spectrum or real estate auction and valuations are distributed normally. In the arbitrary-npv distribution, complementarities may not be as universal as geographical adjacency with valuations being normally distributed again. Bidders view the complementarity of items slightly differently. The scheduling distribution simulates an auction for time slices on a resource in a distributed job-shop scheduling problem. The bids for this distribution type tend to be shorter, therefore there are a more combinations of possibly successful bids. This increases the difficulty of finding the optimal winner in the WDP but also increases the likelihood of being able to find a robust solution because of the increased availability of repair solutions. 4.1 Constraint Satisfaction In this experiment we first solve the auction optimally. This can be done using an efficient IP solver such as ILOG’s CPLEX package or CABOB[11]. We then stipulate a minimum percentage of optimum revenue that is acceptable and the maximum number of variables that can change, b, when forming a super solution. We then use the 4

The CATS flags included int prices with the bid alpha parameter set to 1000.

Arbitrary-npv Distribution 25 20 15 10 5

Time (secs) 30 25 20 15 10 5 0

1 0.8 0.6 0.4 0.2 0

94

0

Arbitrary-npv Distribution 1 0.8 0.6 0.4 0.2

Success Rate

1

2 b

3

4

5 80

82

84

(a) Running Time

96

98

92 90 88 86 Min % Revenue

0

1

2 b

3

4

5 80

82

84

98 96 94 92 90 88 86 Min % Revenue

(b) Success Rate

Fig. 1. arbitrary-npv distribution - finding a (1,b)-super solution.

constraint-based solver to search for a satisfactory super solution. An IP approach to establishing such robust solutions would be extremely difficult to implement. The results are presented in Figures 1,2 and 3. The contours on the horizontal plane of the graphs indicate the gradient of the surface in the graph. This helps illustrate the rates of fall-off in the running time and success rate for the different distributions, the success rate being the fraction of problems that have at least one super solution. It is evident from these contours that the scheduling distribution reaches a very high success rate with b = 1 and acceptable revenue of at least 90%, for example (Figure 3). The contours also help show where the peak running times are encountered for the various distributions. These figures indicate the increasing levels of complexity for the various distributions: the arbitrary-npv being the easiest and scheduling distribution being the hardest. We can surmise from these graphs that when the constraints are tight, (b is low and minimal revenue is high), that it is easy to find that there is no super solutions so running times are short. When constraints are very relaxed it is then easy to find a super solution. However, there is a phase transition area where the existence of a super solution is unpredictable and the running times are high. This peak in complexity is most clearly visible in Figure 3(a). The arbitrary-npv and regions-npv are evidently easier problems to solve. It is to be expected that running times increase with b because the search for a repair solution is longer. It can decrease in some instances when an increase in b results in many more solutions. We can estimate from Figures 1,2 and 3 that the hardest satisfaction problems for the various distributions occur when the success rate is approximately 75%. It is more difficult to solve auctions in which there are many short bids (involving a small number of items) optimally because there are fewer constraints between the bid variables and deeper traversal of the search tree is required. We are seeking a robust solution within a given percentage of optimal revenue such that if any successful bid is withdrawn, a repair solution that is also within the same percentage of the optimum can be found by changing at most b other variables. In Figures 1, 2 and 3 we varied b from 0

Regions-npv Distribution 20 15 10 5

Time (secs)

Regions-npv Distribution 1 0.8 0.6 0.4 0.2

Success Rate

25

1

20

0.8

15

0.6

10

0.4

5

0.2

0

0

92

0

1

2 b

3

4

5 80

82

84

94

96

98

90 88 86 Min % Revenue

0

1

2 b

(a) Running Time

3

4

5 80

82

84

98 96 94 92 90 88Min % Revenue 86

(b) Success Rate

Fig. 2. regions-npv distribution - finding a (1,b)-super solution.

Scheduling Distribution 150 100 50

Time (secs) 160 140 120 100 80 60 40 20

0

Scheduling Distribution 1 0.8 0.6 0.4 0.2

Success Rate 1 0.8 0.6 0.4 0.2 0

92

1

2 b

3

4

5 80

82

84

(a) Running Time

94

96

98

90 88 86 Min % Revenue

0

1

2 b

3

4

5 80

82

84

98 96 94 92 90 88 86 Min % Revenue

(b) Success Rate

Fig. 3. scheduling distribution - finding a (1,b)-super solution.

to 5 and accepted the first super solution found. We did not consider values of b greater than 5 because most of the auction solutions contain 5 or less winning bids. The arbitrary-npv distribution has long bids therefore few combinations of bids form valid solutions. This leads to fewer solutions and reduced time to solve. The regions-npv distribution has slightly shorter bids, therefore it is more difficult to solve than arbitrary-npv but easier than the scheduling distribution that has many short bids. The problem difficulty increases but the availability of robust solutions also increases because there are more possible repair solutions above the minimum threshold revenue. Figure 3(b) shows how the success rate for the scheduling distribution is better than for the arbitrary-npv and regions-npv distributions (see Figures 1(b) and 2(b) respectively). The increased availability of repair solutions accounts for the steeper contours towards 100% satisfiability in Figure 3(b).

4.2 Constraint Optimization In a real-life scenario an auctioneer may seek a robust solution but would like the best robust solution in terms of either robustness or revenue. We may then employ an anytime algorithm that searches for the optimal super solution with maximum revenue being the objective function. We use a branch and bound algorithm that finds super solutions and optimizes on either reparability in the case of an over-constrained problem or revenue when there are many super solutions that satisfy the given constraints. This can be regarded as an anytime algorithm that finds the best possible robust solution in a given time-frame. Our analysis focuses on two forms of optimization: 1. Optimizing Robustness: Intended for use in an over-constrained scenario in which there are no super-solutions. We seek a solution that contains a minimal number of irreparable variables. 2. Optimizing Revenue: Intended for use in an under-constrained scenario in which there are many super solutions. We seek the super-solution with maximal revenue. Optimizing Robustness A scenario may occur where there exists no (1,b)-super solution that satisfies the minimal revenue criterion. We may seek a solution that minimizes the number of irreparable variables in a super solution thus compromising b but maintaining the revenue constraint. Hebrard et al. [4] have developed a (1,b)- super Branch&Bound algorithm that will find a super solution with a minimal number of irreparable variables if no super solution satisfies the given value of b. Figure 4 shows how many variables in the super-solution will not provide a repair solution with at most b variable values being changed to form a new solution that supports the revenue constraint. These results show that easier distributions to solve are less supportive of robust solutions5 . When the revenue constraint on an auction with an arbitrary-npv distribution type is tight (95%) and few changes can be made to the solution (b ≤ 2) then there are typically 2-3 bids in the auction that will not provide a repair solution given those constraints on revenue and b. The regions-npv and scheduling auctions have shorter bids and denser solution spaces so it is possible to find super-solutions that support such tight constraints. Figure 5 compares the number of irreparable variables in the case of b = 0. Recall that a (1,0)-super solution is a solution in which if any winning bid is withdrawn, then the remaining winning bids still form a valid solution. This is only possible when there are many small winning bids whose value is less than that of the tolerable loss in potential revenue. This is a very tight constraint that is in fact unsatisfied by any of the sample auctions in our test-set. However, we can attempt to find a solution that minimizes the number of winning bids that do not satisfy this constraint, or irreparable variables. Figure 5 shows the increase in the minimum number of such variables as the constraint on minimum revenue is tightened. As this constraint is tightened, there is a trade-off against robustness. There are two principle factors governing the reparability of a solution, the number of winning bids and the number of possible repair solutions. The arbitrary-npv 5

Recall that auctions with long bids have fewer combinations of possible solutions so are easier to solve.

Arbitrary-npv Distribution 3 2 1

Average number of irreparable variables 3.5 3 2.5 2 1.5 1 0.5 0

1

Regions-npv Distribution 3 2 1

Average number of irreparable variables 3.5 3 2.5 2 1.5 1 0.5 0

2

3 b

4

5 80

82

84

98 96 94 92 90 88 86 Min % Revenue

1

2

(a) arbitrary-npv distribution

4

5 80

82

84

(b) regions-npv distribution

Scheduling Distribution 2.5 2 1.5 1 0.5

Average number of irreparable variables 3 2.5 2 1.5 1 0.5 0

1

3 b

98 96 94 92 90 88 86 Min % Revenue

2

3 b

4

5 80

82

84

98 96 94 92 90 88Min % Revenue 86

(c) scheduling distribution Fig. 4. Optimizing robustness.

distribution has fewer winning bids and fewer solutions so its reparability degrades rapidly. The regions-npv and scheduling auctions tend to have more available repair solutions therefore degrade more slowly as the revenue increases. The latter distribution has more winning bids participating in the solutions. This accounts for why more of those bids do not have repair solutions. Also, there are more solutions in this distribution hence the increase in minimal revenue leads to a lower slope in the number of irreparable variables.

Optimizing Revenue If there are many (1,b)-super solutions satisfying the revenue constraints then it is desirable to find the revenue-maximizing super solution. This a much more difficult problem than finding any super solution given a constraint on revenue. We have developed a branch and bound algorithm that returns the optimal supersolution in terms of an objective function. In our case we search for a super solution

Irreparable variables

4

Arbitrary-npv Distribution Regions-npv Distribution Scheduling Distribution

3

2

1 80

82

84

86 88 90 92 94 Min percentage revenue super solution

96

98

Fig. 5. Average number of irreparable variables in most robust solution (with b=0)

whose revenue is maximal whilst the constraints on the revenue for repair solutions remain the same6 . Figures 6(a), 6(b) and 6(c) show clearly that when we permit more variable changes, the expected increase in revenue of the optimal super solution increases significantly. Notice how optimization is far more difficult than satisfaction. This can clearly be seen by comparing the running times in Figure 7 with those in Figures 1, 2 and 3. We have restricted our analysis of the scheduling distribution to revenue greater than 90% because there are so many super solutions for revenue lower than this that optimization becomes extremely difficult. However, it is more difficult to see that as the constraint on acceptable revenue for repair solutions is tightened (minimum revenue for repair solutions increases) that in some cases this leads to a super solution of reduced optimal revenue. Note, however, that these graphs are averaged over those instances that proved satisfiable so as minimum revenue increases some problems became unsatisfiable therefore negating the decrease in revenue from satisfiable instances.

5 Extensions to Super Solutions Whilst the super solution framework provides an excellent framework for finding robust solutions, it is somewhat inflexible in some respects that are important to real-life applications. We have discovered some limitations in the approach when applied to combinatorial auctions. Firstly there is an underlying assumption that when a repair solution is created, the incurred cost of changing each variable’s value in the repair set is 6

An alternative approach may be to maximize the minimal revenue on the super solution and all repair solutions.

Arbitrary-npv Distribution 100 99 98 97 96 95 94

Average Revenue (% of optimal) 100 99 98 97 96 95 94 93

Regions-npv Distribution 100 99.5 99 98.5 98

Average Revenue (% of optimal) 100 99.5 99 98.5 98 97.5 98

1

2

3 b

4

5 80

82

84

96 94 92 90 88Min % Revenue 86

1

2

(a) arbitrary-npv distribution

4

5 80

82

84

(b) regions-npv distribution

Scheduling Distribution 100 99 98 97 96 95

Average Revenue (% of optimal) 100 99 98 97 96 95 94

1

3 b

98 96 94 92 90 88 86 Min % Revenue

2

3 b

92 4

98 96 94 Min % Revenue

5 90

(c) scheduling distribution Fig. 6. Average optimal revenue of satisfiable instances.

the same. In a real-world scenario, informing a losing bidder that they have now won because of the withdrawal/disqualification of a winning bid would typically incur less cost than informing a winning bidder that they have now lost. This can be seen as a disadvantage of the super solution framework and militates against its deployment in real-life scenarios. Calculation of the cost associated with changing the losing/winning status of any bid is in reality a more complex issue that may depend on several other factors. Testing the legality of a repair solution by measuring the cardinality of the repair set may be overly restrictive in many application domains. For example, the cost associated with changing the value of a variable in a solution may depend on its destination value. Consider a factory scheduling problem where variables represent machines and values correspond to states. The cost of changing the state of any machine depends on both the source and destination states. The cost of changing a variable may also depend on the variable that caused the break. For example, if a particular agent withdraws a bid from an auction, the auctioneer may favour rejection of the agent’s other successful bids rather than disturbing an

Arbitrary-npv Distribution 100 50

Time(secs) 140 120 100 80 60 40 20 0

1

Regions-npv Distribution 150 100 50

Time(secs) 160 140 120 100 80 60 40 20 0

2

3 b

4

5 80

82

84

98 96 94 92 90 88 86 Min % Revenue

1

2

3 b

(a) arbitrary-npv distribution

4

5 80

82

84

98 96 94 92 90 88 86 Min % Revenue

(b) regions-npv distribution

Scheduling Distribution 1.5e+003 1e+003 500

Time(secs) 2000 1800 1600 1400 1200 1000 800 600 400 200 0

1

2

3 b

92 4

98 96 94 Min % Revenue

5 90

(c) scheduling distribution Fig. 7. Average time to find the super solution of maximal revenue.

innocent party. The cost of a repair solution should therefore depend on the destination value and the breakage variable(s). Furthermore the cost of repair may also be a function of time. One possible approach is to extend the super solution framework to take account of the cost of repair. For example, we can use the concept of inertia as a metric for the cost of repair required to form an alternative solution. Previously the cardinality of the repair set was used to measure the cost of repair. We argue that changing some variables in a repair solution incurs less cost than others thereby motivating the introduction of a different metric for determining the legality of repair sets. We motivate this approach by using robust solutions to combinatorial auctions as an example application domain. Hebrard et al [4] also described how some variables may fail (such as machines in a job-shop problem) and others may not. If we generalize this approach so that there is a probability of failure associated with each variable value, we can then alter the criteria for repair solutions according to each individual potential break. The inertia of each

value may be viewed as a measure of its aversion to change, therefore can be used to determine the cost of repair in the repair solution. This extended feature of super solutions is motivated by the maintenance of robust solutions in combinatorial auctions. Agents’ bids may be regarded as variables and Hebrard et al’s (a,b)-super solution guarantees that an alternative solution may be found if a bids are retracted by changing at most b other variables. Maintaining a record of the reliability of assignments in the break set can help find repair solutions of lower inertia for values that are more likely to fail. All bids may not be viewed equally by the auctioneer and preferences may be shown for some agents. Eliminating a certain bid from the solution because of the retraction of another bid may incur varying costs for each bid, therefore the inertia associated with a value representing a winning bid reflects the unwillingness of the auctioneer to let that bid lose due to the actions of another. Losing bidders typically would not mind being told that their bid was now accepted due to a winning bid’s retraction so the inertia associated with such bids may be lower. This may be seen as a generalization of super solutions whose values of inertia are all 0 or 1. Furthermore, the break-set is regarded as the set of variables that may break, therefore the inertia of these variables values are all 1. Those variables not in the breakset have coefficients of inertia of 0 for all their values. The overall cost of repair required to move from one solution to another is a function of the inertia on all values that need to be changed. An example of such a function could be the sum of the inertial values although not exclusively so. Taking this approach further repairs may be made that restrict the impact on particular variables. In an auction scenario, we may wish that a repair solution does not impact too unfairly on any particular agent when another agent retracts a bid. The development of this extension to super solutions is our current topic of research.

6 Conclusion Combinatorial auctions are becoming and increasingly popular means of selling/procuring items because they provide enhanced economic efficiency over traditional single unit auctions. Super solutions offer a promising platform for developing robust solutions for such auctions that may leave the auctioneer with an exposure problem if bids are withdrawn or disqualified. We have demonstrated the computational feasibility of finding super solutions for economically-motivated auction problems and shown how an anytime algorithm may find the best possible super solution given a limited time frame. We outlined some hybrid techniques that may aid the scalability of super solutions for larger auctions. We also presented some limitations of the approach and suggested an extension to the framework. This extension incorporates a more flexible metric, termed inertia, for determining the legality of repair solutions and associating probabilities of failure to different variables. The introduction of weighted robustness of values complements this approach by allowing the construction of repair solutions of lower inertia for unreliable values. The development of this extension to super solutions is our current topic of research.

Acknowledgements We are very grateful to Emmanuel Hebrard and Brahim Hnich for their assistance.

References 1. Fahiem Bacchus and George Katsirelos. EFC constraint solver. http://www.cs.toronto.edu/˜gkatsi/efc/efc.html. 2. Rafael Epstein, Lysette Henr´ıquez, Jaime Catal´an, Gabriel Y. Weintraub, and Cristi´an Mart´ınez. A combinational auction improves school meals in Chile. Interfaces, 32(6):1– 14, 2002. 3. Matthew L. Ginsberg, Andrew J. Parkes, and Amitabha Roy. Supermodels and robustness. In AAAI/IAAI, pages 334–339, 1998. 4. Emmanuel Hebrand, Brahim Hnich, and Toby Walsh. Robust solutions for constraint satisfaction and optimization. In Proceedings of ECAI 2004. 5. Emmanuel Hebrard, Brahim Hnich, and Toby Walsh. Super solutions in constraint programming. In Proceedings of CP-AI-OR 2004, 2004. 6. Gail Hohner, John Rich, Ed Ng, Grant Reid, Andrew J. Davenport, Jayant R. Kalagnanam, Ho Soo Lee, and Chae An. Combinatorial and quantity-discount procurement auctions benefit mars, incorporated and its suppliers. Interfaces, 33(1):23–35, 2003. 7. Kevin Leyton-Brown, Mark Pearson, and Yoav Shoham. Towards a universal test suite for combinatorial auction algorithms. In ACM Conference on Electronic Commerce, pages 66– 76, 2000. 8. Paul Milgrom. Putting Auction Theory to Work. Cambridge, March 2004. 9. Martin Pesendorfer and Estelle Cantillon. Combination bidding in multi-unit auctions. Harvard Business School Working Draft, 2003. 10. Tuomas Sandholm. Algorithm for optimal winner determination in combinatorial auctions. Artificial Intelligence, 135(1-2):1–54, 2002. 11. Tuomas Sandholm, Subhash Suri, Andrew Gilpin, and David Levine. CABOB: A fast optimal algorithm for combinatorial auctions. In IJCAI, pages 1102–1108, 2001. 12. W.E. Walsh, M.P. Wellman, and F. Ygge. Combinatorial auctions for supply chain formation. In ACM Conference on Electronic Commerce, pages 260–269, 2000.

Extensions

100

Constrained CP-nets





Steve Prestwich , Francesca Rossi , Kristen Brent Venable , Toby Walsh 1: Cork Constraint Computation Centre, University College Cork, Ireland. Email: [email protected], [email protected] 2: Department of Pure and Applied Mathematics, University of Padova, Italy. Email: frossi,kvenable @math.unipd.it.





Abstract. We present a novel approach to deal with preferences expressed as a mixture of hard constraints, soft constraints, and CP-nets. We construct a set of hard constraints whose solutions are the optimal solutions of the set of preferences, where optimal is defined differently w.r.t. other approaches [2, 7]. The new definition of optimality introduced in this paper, allows us to avoid dominance testing (is one outcome better than another?) which is a very expensive operation often used when finding optimal solutions or testing optimality, while being reasonable and intuitive. We also show how hard constraints can sometimes eliminate cycles in the preference ordering. Finally, we extend this approach to deal with the preferences of multiple agents. This simple and elegant technique permits conventional constraint and SAT solvers to solve problems involving both preferences and constraints.

1 Introduction Preferences and constraints are ubiquitous in real-life scenarios. We often have hard constraints (as “I must be at the office before 9am”) as well as some preferences (as “I would prefer to be at the office around 8:30am” or “I would prefer to go to work by bicycle rather than by car”). Whilst formalisms to represent and reason about hard constraints are relatively stable, having been studied for over 20 years [5], preferences have not received as much attention until more recent times. Among the many existing approaches to represent preferences, we will consider CP-nets [6, 3], which is a qualitative approach where preferences are given by ordering outcomes (as in “I like meat over fish”) and soft constraints [1], which is a quantitative approach where preferences are given to each statement in absolute terms (as in “My preference for fish is 0.5 and for meat is 0.9”). It is easy to reason with hard and soft constraints at the same time, since hard constraints are just a special case of soft constraints. Much less is understood about reasoning with CP-nets and (hard or soft) constraints. One of our aims is to tackle this problem. We will define a structure called a constrained CP-net. This is just a CP-net plus a set of hard constraints. We will give a semantics for this structure (based on the original flipping semantics of CP-nets) which gives priority to the hard constraints. We will show how to obtain the optimal solutions of such a constrained CP-net by compiling the preferences into a set of hard constraints whose solutions are exactly the optimal solutions of the constrained CP-net. This allows us to test optimality in linear

time, even if the CP-net is not acyclic. Finding an optimal solution of a constrained CP net is NP-hard 1 (as it is in CP-nets and in hard constraints). Prior to this work, to test optimality of a CP-net plus a set of constraints, we had to find all solutions of the constraints (which is NP-hard) and then test if any of them dominate the solution in question [2]. Unfortunately dominance testing is not known to be in NP even for acyclic CP-nets, as we may have to explore chains of worsening flips that are exponentially long. By comparison, we do not need to perform dominance testing in our approach. Our semantics is also useful when the CP-net defines a preference ordering that contains cycles, since the hard constraints can eliminate these cycles. Lastly, since we compile preferences down into hard constraints, we can use standard constraint solving algorithms (or SAT algorithms if the variables have just two values) to reason about preferences and constraints, rather than develop special purpose algorithms for constrained CP-nets (as in [2]). We also consider when a CP-net is paired with a set of soft constraints, and when there are several CP-nets, and sets of hard or soft constraints. In all these cases, optimal solutions can be found by solving a set of hard or soft constraints, avoiding dominance testing.

2 Background 2.1

CP-nets

In many applications, it is natural to express preferences via generic qualitative (usually partial) preference relations over variable assignments. For example, it is often more intuitive to say “I prefer red wine to white wine”, rather than “Red wine has preference 0.7 and white wine has preference 0.4”. The former statement provides less information, but does not require careful selection of preference values. Moreover, we often wish to represent conditional preferences, as in “If it is meat, then I prefer red wine to white”. Qualitative and conditional preference statements are thus useful components of many applications. CP-nets [6, 3] are a graphical model for compactly representing conditional and qualitative preference relations. They exploit conditional preferential independence by structuring an agent’s preferences under the ceteris paribus assumption. Informally, CPnets are sets of conditional ceteris paribus (CP) preference statements. For instance, the statement “I prefer red wine to white wine if meat is served.” asserts that, given two meals that differ only in the kind of wine served and both containing meat, the meal with a red wine is preferable to the meal with a white wine. Many users’ preferences appear to be of this type. CP-nets bear some similarity to Bayesian networks. Both utilize directed graphs where each node stands for a domain variable, and assume a set of features with finite domains . For each feature , each user specifies a set of parent features that can affect her preferences over the values of . This defines a dependency graph in which each node has as its immediate predecessors. Given this structural information, the user explicitly specifies

    1

     

   

       

More precisely it is in FNP-hard, since it is not a decision problem. In the rest of the paper we will write NP meaning FNP when not related to decision problems.



     " $# " %&#  % '&()% *  &( % ,+.-  # -  /0( % * ! 0()% 1+ - # -2+.3 # 3 -2+ 3 # 3 2- )+6# 3 # 3 4 5 85  -  !7 3 !7 3 9% -3 9: % -3 -  % ; :(s ' * ¾ {(˜={=   ª Á o  ÃyÄJÅ]¾XÆ  Ì _ ¿ À Ê Ž  ²   Ë Ž S ² ˆ  1¾ $ ¡ (  { l   § Í* {f4B‘  {f4 Ž œ {> {ŸRB‘ Ž7²RˆŒ¾®(f{Z³ ¿_À § ªÁ o  ÃyÄnW{Å]¾ Æ= * {>B‘  {s¸ Ž2µ Ž Ž  ¶¿6À § ª Á o  ÃyÄJÅ]¾XÆ ­ Ž ) ²   8 Ž ” ² '  Œ¾ _ ¶ ( Ÿ { >   ŽS²¹{•Ž2Bµ ‘ {s7B‘ {s  2 Ž É µ ¢ ² O { 8   œ {d´ŽB‘ ²=' ¾ (¢{d  ®¿_À § ªÁ oÂFÃyÄnÅ]¾ Æ {d@B‘ {d´  Ž2µ Ž Ž Ž Ž — aIœ½Š o& œ œ>N  ÎÉÏ&Ð Ñ,Ò Î2Ó Ô Ò°ÑPÕ ÖØ× 

where is the subset of constraints in which involve variable 2 , and projects onto the variables in . The optimality constraints corresponding to are again . We can again show that this construction gives a new problem whose solutions are all the optimal outcomes of the constrained CP-net. Theorem 3. Given a constrained CP-net , an outcome is optimal for it is a satisfying assignment of the optimality constraints .

iff

Proof. ( ) Consider any outcome that is optimal. Suppose that does not satisfy . Clearly satisfies , since to be optimal it must be feasible (and undominated). Therefore must not satisfy some where preference statement in . Without loss of generality, let us consider the optimality constraints and corresponding to the preference statement . The only way an implication is not satisfied is when the hypothesis is true and the conclusion is false. Let us take the first implication: , and . In this situation, flipping from to would give us a new outcome such that and this would be an improvement according to . However, by doing so, we have to make sure that the constraints in containing or may now not be satisfied, since now is false. However, we also have that , meaning that if these constraints are satisfied. Hence, there is an improving flip to another feasible outcome . But was supposed to be undominated. Therefore satisfies the first of the two implications above. Let us now consider the second implication: , and . In this situation, flipping from to would give us a such that and this would be an improvement according new outcome to . However, by doing so, we have to make sure that the constraints in containing may now not be satisfied, since now is false. However, we also have that , meaning that if these constraints are satisfied. Hence, there is an improving flip to another feasible outcome . But was supposed to be undominated. Therefore satisfies the second implication above. Thus must satisfy all constraints where . Since it is also feasible, is a satisfying assignment of . 2

More precisely,

.

¸— ·

È—

Ž

(

Ž

) Consider any assignment which satisfies . Clearly it is feasible as includes . Suppose we perform an improving flip in . There are two cases. Suppose that the outcomes obtained by performing any improving flip are not feasible. Then such new outcomes do not dominate the old one in our semantics. Thus is optimal. Suppose, on the other hand, that there is at least one new outcome, obtained via an improving flip, which is feasible. Assume the flips passes from to . If this is an improving flip, without loss of generality, there must exist a statement in such that . By hypothesis, is a satisfying assignment of . Therefore = . Since and , and true is not allowed to imply false, cannot satisfy . But, as the new outcome, which contains , is feasible, such constraints have to be satisfied independent of how we set . Hence, . As this is a contradiction, this cannot be an improving flip to a feasible outcome. The satisfying assignment is therefore feasible and undominated. Notice that the construction for variables with more than two values in their domains is a generalization of the one for Boolean variables. That is, if and are over Boolean variables. Similar complexity results hold also now. However, while for Boolean variables one constraint is generated for each preference statement, now we generate as many constraints as the size of the domain minus 1. Therefore the optimality constraints corresponding to a constrained CP-net are , where is the domain of the variables. Testing optimality is still linear in the size of , if we assume bounded. Finding an optimal outcome as usual requires us to find a solution of the constraints in , which is NP-hard in the size of .

#R{f4  #Rº{¢— 4B‘G#   Ì(¹ˆ ¾ (f{Z?  &¿_À § ª Á oÂFÃyÄnÅu޳¾XÆ j ²   Œ¾ { %‰ ‡ Š ˆY  Y - V ŠuÝ Y Y : Y D/ L  hyÞ „  D/ Lu   aIœkŠuÛ h]Ü „  œ1ž]œ¢N O ß {  {k‘ ß  à à { à # à  à + {  #R{  #•{‘ à á+ {  #R{ # {k‘  { { {‘ {  # à {‘# à  {k‘ à à { # à {  # à  {  # à  { # à  {k‘ à {  R{  à {  à  {  àà ®+# à  ß

Suggest Documents