Narrowing a 2n-block of sortings in O(nlogn) - Alain Colmerauer

stating and solving problems of the job-shop scheduling type [4]. ... has at least one solution, it is sufficient to verify, after narrowing, that none of the .... possible to put terms of the n-tuple x in increasing order and thus to obtain an element ... Lemma 2 Let (I,s,J) be a finite correspondence in N with no restriction of type.
352KB taille 8 téléchargements 200 vues
Narrowing a 2n-block of sortings in O(n logn) No¨elle Bleuzen Guernalec and Alain Colmerauer1 Abstract Let D be a totally ordered set and n a positive integer. Call 2n-block a Cartesian product of 2n closed and possibly empty intervals of D. Let sort be the set of all 2n-tuples of elements of D of the form (x1 , . . . , xn , y1 , . . . , yn ), where (y1 , . . . , yn ) is the n-tuple obtained by sorting in increasing order the terms of the n-tuple (x1 , . . . , xn ). This paper is devoted to the study of an algorithm of complexity O(n logn), which, given a 2n-block P , computes, in the sense of inclusion, the smallest 2n-block containing the set sort ∩ P .

1

Introduction

A sortedness constraint expresses that an n-tuple (y1 , . . . , yn ) is equal to the n-tuple obtained by sorting in increasing order the terms of another n-tuple (x1 , . . . , xn ). We write it as (x1 , . . . , xn , y1 , . . . , yn ) ∈ sort . W.J. Older, F. Swinkels and M. van Emden introduced this constraint for elegantly stating and solving problems of the job-shop scheduling type [4]. More recently Jianyang Zhou [5, 6] has solved well known difficult job-shop scheduling problems by introducing a sortedness constraint with 3n variables: the n added integer variables being used for making explicit a permutation linking the xi s to the yi s. We are interested in narrowing a sortedness constraint, within intervals, of the form:   (x1 , . . . , xn , y1 , . . . , yn ) ∈ sort ∧  x1 ∈ A1 ∧ · · · ∧ xn ∈ An ∧  , y1 ∈ B1 ∧ · · · ∧ yn ∈ Bn where the Ai s and Bi s are closed intervals of the general domain of xi s and yi s. By “narrowing” we mean: substituting for intervals Ai and Bi the smallest intervals Xi and Yi , in the sense of inclusion, which do not modify the set of solutions of the constraint. It must be noted that, to decide if the constraint within intervals has at least one solution, it is sufficient to verify, after narrowing, that none of the new intervals is empty. As BNR-Prolog has taught us, this narrowing of constraint, within intervals, applies to any kind of elementary constraint and allows progress in the solving of a conjunction of constraints by narrowing, one after another, each elementary constraint, within intervals, until the intervals attached to the different variables reach a fixed point [3]. The purpose of this paper is to present and justify an algorithm for narrowing the sortedness constraint, within intervals, in O(n logn) elementary operations. It is organized in 10 parts. 1 Laboratoire d’Informatique de Marseille, ESA 6077, CNRS et Universit´ es de Provence et de la M´ editerran´ ee

1

Parts 1 and 2 are devoted to this introduction and to the notations. Parts 3 to 7, which are very technical, establish the necessary results for proving theorem 8. This theorem, which constitutes part 8, gives and justifies the main lines of the proposed algorithm. Part 9 details the algorithm with an example while establishing its complexity. Part 10 suggests perspectives for this work.

2

Notations and statement of the problem

Generally speaking, if (E, ) is an ordered set, composed of a set E and an order relation  over E, we call interval of (E, ) any subset of E, possibly empty, which is of the form {x ∈ D | a  x and x  b}, where a and b are any elements of E. The interval is written [a, b]. When the ordered set is (N, ≤), where N is the set of natural integers, we write i..j for [i, j]. An n-block of (E, ) is a subset of E n of the form A1 ×· · ·×An , where each Ai is an interval of (E, ). Let (D, ) be a given ordered set, where D has at least two elements and where  is a total order relation. We use ≺ to denote the relation obtained by removing all pairs of equal elements from . As an example of an ordered set, the set (R, ≤) of reals or the set (Z, ≤) of integers as well as the set (N, ≤) can be taken, with their natural orderings. Also let n be a given positive integer. We denote by P n the set of permutations of 1..n, that is to say the set of one-to-one mappings from 1..n onto 1..n. If x is an element of Dn we write x1 , . . . , xn the elements of D such that x = (x1 , . . . , xn ). If, for each i of 1..(n−1), we have xi  xi+1 then x is said to be increasing and if, for each i of 1..(n−1), we have xi+1  xi then x is said to be decreasing. If x is an element of Dn , then x ↑ denotes the increasing element y of Dn defined by y1 = x1 and yi = max (xi , yi−1 ), for each i in 2..n and x ↓ denotes the increasing element y of Dn defined by yn = xn and yi = min (xi , yi+1 ), for each i in 1..(n−1). If x and y are elements of Dm and Dn , then x · y denotes the element (x1 , . . . , xm , y1 , . . . , yn ) of Dm+n and if f is a mapping from 1..n into 1..n, then x ◦ f denotes the element (xf (1) , . . . , xf (n) ) of Dn . According to these notations, the sort relation is simply the subset of D2n : sort = {(x◦α) · x | α ∈ P n and x is an increasing element of Dn } The ordered set (Dn , n ) is naturally introduced by defining the partial order relation n as: x n y if and only if, for each i from 1..n, we have xi  yi . The intervals of (Dn , n ) will be called n-intervals. It must be noticed that the n-interval [a, b] is none other than the n-block [a1 , b1 ]×· · ·×[an , bn ]. In (Dn , n ) a set {x, y} of two elements does not always have a least and a greatest element but always has a greatest lower and a least upper bound, which are such that inf {x, y} = (min {x1 , y1 }, . . . , min {xn , yn }), sup {x, y} = (max {x1 , y1 }, . . . , max {xn , yn }) The problem, which is the object of this paper, can now be formulated as follows: 2

Problem Given a 2n-interval P , show that, in the sense of inclusion, the least 2n-interval Q which contains sort ∩ P always exist and give an efficient algorithm to compute Q. To express the computation of Q we need a final notation. Given a subset r of Dn and integers i, j such that 1 ≤ i ≤ j ≤ n we define projji (r) to be the set, projji (r) = {y ∈ D(j+1)−i | there exists x ∈ r with y = (xi , . . . , xj )} Throughout this paper we need to manipulate mappings f from subsets of N into subsets of N and, more generally, correspondences in N. By correspondence in N we mean a triplet of the form (I, s, J), where I and J are subsets of N and s is a subset of I×J representing any set of arrows from elements of I to elements of J. The correspondence is said to be finite if I and J are finite and the correspondence (I 0 , s0 , J 0 ) is said to be a restriction of the correspondence (I, s, J) if I 0 ⊆ I and J 0 ⊆ J and s0 = s ∩ (I 0 ×J 0 ). We say that a correspondence in N is of type (↓. &) if it is of the form ({i, i0 }, {(i, j), (i, j 0 ), (i0 , j)}, {j, j 0 }), with i < i0 and j < j 0 and is of type (.& . ) if it is of the form ({i}, {(i, j), (i, j 00 )}, {j, j 0 , j 00 }), with j < j 0 and j 0 < j 00 . With respect to mappings f from a set I into a set J, we adopt the usual conventions. We call graph of f and we write graph (f ) the set of ordered pairs (i, j) such that i ∈ I and j = f (i). If I 0 is a subset of I, we write f (I 0 ) for {f (i) | i ∈ I 0 }. If g is a mapping from J into K then g ◦ f denotes the mapping i 7→ g(f (i)) from I into K. If f is a one-to-one mapping from I onto J then f −1 denotes the one-to-one mapping f (i) 7→ i from J onto I. If I and J are subsets of N and if f and g are mappings from I into J, we write i,j f = g to signify that i and j are elements of I, that f (i) = g(j), that f (j) = g(i) and that f (k) = g(k) for all elements k of I − {i, j}. We write f  g to signify that i,j

there exist integers i, j such that f = g and i < j and g(i) < g(j). We terminate this part by a very useful property of the  relation. Property 1 If I and J are finite, there exists no infinite sequence of mappings from I to J which is of the form f1 , f2 , f3 , . . ., with fi−1  fi for each i > 1. P Proof.

Let i be an integer with i > 1. Let |fi | = p,q

k∈I

k×fi (k) and let {p, q}

be the set of the two integers such that fi−1 = fi and p < q. We have |fi | − |fi−1 | = (q − p)×(fi (q) − fi (p)) and thus |fi | − |fi−1 | > 0. The sequence |f1 |, |f2 |, |f3 |, . . . being strictly increasing, the sequence f1 , f2 , f3 , . . . is entirely composed of distinct terms and is thus finite, since also the set of possible terms is finite.

3

Preliminary results

Before confronting the heart of the problem, here are some preliminary results which are easy to understand. Property 2 If a, a0 , d, d0 are elements of Dn , the following equality holds: sort ∩ [a·d, a0 ·d0 ] = sort ∩ [a·(d ↑), a0 ·(d0 ↓)].

3

Lemma 1 Let a, a0 , e, e0 be elements of Dn with e and e0 increasing. If there exists a permutation α of 1..n such that the set [a, a0 ] ∩ [e◦α, e0 ◦α)] is not empty then the set sort ∩ [a · e, a0 · e0 ] is not empty. Proof. Let α be a permutation such that the set E = [a, a0 ] ∩ [e ◦ α, e0 ◦ α)] is not empty and let x be an element of E. If (j, k) is an ordered pair of indices, taken in 1..n, such that j < k and xk ≺ xj then, since e and e0 are increasing, the n-tuple obtained by exchanging xj and xk in x still belongs to E. By a sequence of such exchanges it is then possible to put terms of the n-tuple x in increasing order and thus to obtain an element of the set sort ∩ [a · e, a0 · e0 ]. Thus this set is not empty.

Theorem 1 Let [a·e, a0 ·e0 ] be a 2n-interval, with a, a0 , e and e0 being elements of Dn and e and e0 increasing. For each element i of 1..n, let Ii = {j ∈ 1..n | [ai , a0i ] ∩ [ej , e0j ]}. (1) The set Ii is an interval of (N, ≤). (2) If i and j are elements of 1..n such that the sets Ii and Ij are not empty then the following implication holds: a0i  a0j =⇒ max Ii ≤ max Ij . (3) When [e, e0 ] is not empty, the set Ii can be computed as follows: Let α, α0 be two permutations of 1..2n such that the sequences x = (a·e0 )◦α and x0 = (e·a0 )◦α0 are increasing and, for all pairs (k, l) of elements of 1..2n, satisfy the implication: xk = xl , α(k) < α(l) =⇒ k < l, and the implication: x0k = x0l , α0 (k) < α0 (l) =⇒ k < l. Let, for each i in 1..n, Ei = {j ∈ 1..2n | α−1 (i) < j and n < α(j)}, Ei0 = {j ∈ 1..2n | j < α0−1 (i+n) and α0 (j) ≤ n}. Then  if Ei = ∅ or Ei0 = ∅,  ∅, Ii =  (α(min Ei )−n) .. (α0 (max Ei0 )), otherwise.

Proof. The proof, which we do not detail, is based on the fact that, if [ai , a0i ] and [dj , d0j ] are non empty intervals, then [ai , a0i ] ∩ [dj , d0j ] is not empty if and only if we have together ai  d0j and dj  a0i and that, in this case, [ai , a0i ] ∩ [dj , d0j ] = [max {ai , dj }, min {a0i , d0j }]. To prove point (3), we use the fact that xk = aα(k) or xk = e0α(k)−n , depending on whether α(k) ≤ n or n < α(k) ≤ n, and the fact that x0k = e0α0 (k) or x0k = a0α0 (k)−n , depending on whether α0 (k) ≤ n or n < α0 (k) ≤ n.

4

The relation graphmin

We now introduce a subset of N2 which plays an important role in what is to follow. Definition 1 Let (I, s, J) be a finite correspondence in N. We denote by graphmin (I, s, J) the subset of s defined by  ∅, if µ(I, s, J) = ∅,    graphmin (I, s, J) = {(i, j)} ∪ graphmin (I 0 , s ∩ (I 0 ×J 0 ), J 0 ),    if µ(I, s, J) = {(i, j)} and I 0 = I−{i} and J 0 = J−{j}. 4

with    ∅, if I = ∅,    µ(I, s, J) = ∅, if I 6= ∅ and {j ∈ J | (min I, j) ∈ s} = ∅,      (min (I), min {j ∈ J | (min I, j) ∈ s}), in the other cases.

We notice that graphmin (I, s, J) is the graph of an injective mapping from a subset of I into J. The remainder of this part is devoted to establishing a theorem about graphmin (I, s, J). Lemma 2 Let (I, s, J) be a finite correspondence in N with no restriction of type (↓. &) and let F be the set of one-to-one mappings from I onto J, with graphs included in s. If F is not empty and if f is an element of F , for which there exists no element g of F with f  g, then graph (f ) = graphmin (I, s, J). Proof. Let f be an element of F for which there exists no element g of F with f  g and let m be the number of elements of I. If m = 1 then graph (f ) and graphmin (I, s, J) are equal to {min (I), min (J)} and thus equal. Let us form the hypothesis that the equality graph (f ) = graphmin (I, s, J) holds for m ≥ 1 and let us show that the equality holds for m + 1. If the set I has m + 1 elements then it is not empty and, since (min (I), f (min (I)) ∈ s, the set {j ∈ J | (min I, j) ∈ s} is not empty. So there exists an ordered pair (i, j) such that µ(I, s, J) = {(i, j)}, with i = min (I), and such that by letting I 0 = I −{i}, J 0 = J −{j} and s0 = s ∩ (I 0 ×J 0 ), we have graphmin (I, s, J) = {(i, j)} ∪ graphmin (I 0 , s0 , J 0 ).

(1)

Let us show that j = f (i). If it is not the case, there exists j 0 < j with (i, j 0 ) ∈ s. Since f is a one-to-one mapping from I onto J, let i0 = f −1 (j). Since i = min (I) we have i < i0 . Since i < i0 and j 0 < j and {(i, j), (i, j 0 ), (i0 , j 0 )} ⊆ s and no restriction of s is i,i0

of type (↓. &), we conclude that (i0 , j) ∈ s. Thus, by letting g = f , we have f  g and g ∈ F , which contradicts the way f has been chosen. Now let f 0 be the mapping into J such that graph (f 0 ) = graph (f )−{(i, f (i))} and let F 0 by the set of one-to-one mappings from I 0 onto J 0 , with graphs included in s. The mapping f 0 belongs to F 0 and, since there exists no element g of F such that f  g, there exists no element g 0 of F 0 such that f 0  g 0 . No restriction of the correspondence (I, s, J) being of type (↓. &), no restriction of the correspondence (I 0 , s0 , J 0 ) is of type (↓. &). By induction hypothesis, we have thus graph (f 0 ) = graphmin (I 0 , s0 , J 0 ), that is to say graphmin (I 0 , s0 , J 0 ) = graph (f ) − {(i, j)}. With equality (1), we conclude that graphmin (I, s, J) = graph (f ).

Theorem 2 (Property of graphmin) Let (I, s, J) be a finite correspondence in N with no restriction of type (↓. &) and let F be the set of one-to-one mappings from I onto J, with graphs included in s. If F is not empty then the mapping into J, the graph of which is graphmin (I, s, J), belongs to F and is the only element f of F for which there exists no element g of F such that f  g. Proof. Let F 0 be the set of elements f 0 of F for which there exists no element g of F with f 0  g. If F is not empty, according to property 1, it is possible to construct a finite and not extendable sequence e0 , e1 , . . . , em of elements of F such that ei−1  ei , for all i in 1..m, and thus em belongs to F 0 . The set F 0 being not empty, according to lemma 2, the graphs of all its elements are equal to graphmin (I, s, J).

5

5

Stable and shiftable subsets of indices

Throughout this part we suppose that s is a subset of (1..n)2 such that no restriction of the correspondence (1..n, s, 1..n) is of type (↓. &) or of type (.& . ) and such that graphmin (1..n, s, 1..n) is the graph of an element γ of P n . A non-empty subset J of 1..n is s-stable if all the sets of the form f −1 (J), with f ∈ P n and graph (f ) ⊆ s, are equal. The set J, as also, the strictly increasing sequence (k1 , . . . , km ) of its elements are s-shiftable if, for each i of 1..(m−1), we have (γ −1 (ki ), ki+1 ) ∈ s. We present now, under the form of a theorem, an algorithm for partitioning 1..n in s-stable and s-shiftable subsets. The juxtaposition of finite sequences of integers is written with a dot, the empty sequence is written ε and the set of the terms of a sequence x is written set (x). Theorem 3 (Partition in stable and shiftable subsets) If we apply as many times as possible one of the transformations which follow to the 4-tuple (1, ε, ∅, (1, . . . , n)), we obtain deterministically a final 4-tuple of the form (1, ε, E 0 , ε), where E 0 is a set which we write decomp (s). The elements of decomp (s) are s-stable and s-shiftable subsets of 1..n and form a partition of 1..n. 1. (1, x, E, y·z) −→ (2, x·y, E, z), if x, y, z are sequences of integers such that x·y is non-empty and is the longest possible s-shiftable sequence, 2a. (2, y, E, ε) −→ (1, ε, E ∪ {set (y)}, ε), if y is a non-empty sequence of integers, 2b. (2, x·y, E, z·z 0 ) −→ (1, x, E ∪ {set (y)}, z·z 0 ), if x, y, z, z 0 are sequences of integers such that z is of length 1, x · z is a s-shiftable sequence and y is the shortest possible non-empty sequence. Proof. The sequence of transformations apply on a current 4-tuple of the form (e, u, E, v) which has the six following properties: P 1 : u·v is a strictly increasing sequence of elements of 1..n, P 2 : E is a set of non-empty and disjoint subsets of 1..n, S P 3 : set (u·v) and e∈E e are disjoint subsets and their union is equal to 1..n, P 4 : if e = 2 then u is non-empty and is the longest s-shiftable prefix of u·v, P 5 : if e = 1 and v =  then u = ε, P 6 : if e = 1 and v = v 0 ·v 00 , with v 0 of length 1, then u·v 0 is s-shiftable. The properties P 1, P 2, P 3 hold for the initial 4-tuple and are preserved after each transformation. The property P 4 holds because of the form of transformation 1. The properties P 5, P 6 hold because of the form of the initial 4-tuple, the form of transformations 2a and 2b and the property P 4. Given the fact that transformation 1 requires that e = 1, that transformation 2a requires that e = 2 and v = ε and that transformation 2b requires that e = 2 and v 6= ε, the transformations are performed deterministically. In a sequence of transformations, the transformation 1 alternates with the transformation 2a or 2b. After applying the transformation 1, the length of the sequence v strictly decreases because of property P 6, while after applying the transformation 2a or 2b, it remains unchanged. The sequence of possible transformations is thus finite and leads to a final 4-tuple (e0 , u0 , E 0 , e0 ). If e0 is equal to 2 then, according to P 4, one of the transformations 2a or 2b is applicable. Thus e0 = 1. If v 0 is not equal to ε then, according to P 6,

6

the transformation 1 is applicable. Thus v 0 = ε and, according to P 5, we have u0 = ε. The final 4-tuple is thus indeed of the form (1, ε, E 0 , ε). From the form of the final 4-tuple and from properties P 2, P 3 we conclude that the elements of E 0 constitute a partition of 1..n. Given property P 4 and the form of the transformations 2a and 2b, each element of E 0 is s-shiftable. It remains only to be proven that each element of E 0 is s-stable. This property holds for the set E of the initial 4-tuple. Let us suppose that the property holds for the set E of the current 4-tuple (e, u, E, v) and let us show that it holds for the new set E of the 4-tuple obtained after applying a transformation. If we apply transformation number 1, the set E is not changed and thus the property still holds. If we apply transformation number 2a or 2b then, by referring to the definition of the transformations, it is sufficient to show that the set (y) is s-stable. Given property P 3, the fact that the union of two s-stable subsets is s-stables and the fact that the complement in 1..n of a s-stable subset is s-stable, we conclude that set (u·v) is s-stable. If we apply transformation number 2a, we have y = u · v and thus y is s-stable. If we apply transformation number 2b, let us suppose that y is not s-stable and let us show that we are led to a contradiction. There exists thus an element f of P n such that graph (f ) ⊆ s and f −1 (set (y)) 6= γ −1 (set (y)) and thus there exists i ∈ 1..n such that γ(i) ∈ set (y) and f (i) 6∈ set (y). Since set (u · v) is s-stable, set (x · y · z · z 0 ) is s-stable and thus we have f (i) ∈ set (x) or f (i) ∈ set (z·z 0 ). Let us examine each of these two cases. The unique term of z is written z¯ and we take into account, according to property P 1, that the sequence x·y·z·z 0 is strictly increasing. 1. f (i) ∈ set (x). The set set (x) being thus not empty, let i0 = γ −1 (max (set (x)). Since x·z is s-shiftable, we have (i0 , z¯) ∈ s. We have finally {(i, f (i)), (i0 , γ(i0 )), (i, γ(i)), (i0 , z¯)} ⊆ s with f (i) ≤ γ(i0 ) < γ(i) < z¯

(2)

and, since no restriction of (1..n, s, 1..n) is of type (.& . ), {(i, γ(i0 )), (i0 , γ(i))} ⊆ s.

(3)

0

It is not possible that i < i , since in that case from (3) and from (2) we conclude i,i0

that the element of P n defined by g = γ is such that γ  g and graph (g) ⊆ s, which according to theorem 2 is impossible. It is not possible that i0 = i, since γ(i0 ) and γ(i) are elements of disjoint sets, set (x) and set (y), and γ and f are elements of P n . It is not possible that i0 < i, since in that case, given the fact that no restriction of (1.n, s, 1..n) is of type (↓. &), from (3) and (2) we conclude that (i, z¯) ∈ s and then (γ(i), z¯) is s-shiftable, which contradicts the fact that y is the shortest possible sequence such that x·z is s-shiftable. 2. f (i) ∈ set (z · z 0 ). We have {(i, γ(i)), (i, f (i))} ⊆ s and, according to P 1, γ(i) < z¯ ≤ f (i). Since no restriction of (1..n, s, 1..n) is of type (.& . ) we conclude that (i, z¯) ∈ s and therefore that (γ(i), z¯) is s-shiftable, which contradicts the fact that y is the shortest possible sequence such that x·z is s-shiftable. This ends the proof.

This theorem allows us to introduce the mapping mapmin (s) and to establish as corollary its essential property. Definition 2 (mapmin) We denote by mapmin (s) the mapping from 1..n into 1..n : i 7→ min ({j ∈ Ki | (i, j) ∈ s}, where Ki is the class of γ(i) in decomp (s). Corollary 1 (Property of mapmin) By letting ϕ = mapmin (s), for each i of 1..n, we have ϕ(i) = min {f (i) | f ∈ P n and graph (f ) ⊆ s}.

7

Proof. Let i be any integer of 1..n and let Ki be the class of γ(i) in decomp (s). We know that Ki is a s-stable and s-shiftable subset of 1..n and, by definition, ϕ(i) = min ({j ∈ Ki | (i, j) ∈ s}. Let us show that there exists f ∈ P n , with graph (f ) ⊆ s, such that ϕ(i) = f (i). Let (k1 , . . . , km ) be the strictly ordered sequence of the elements of Ki , let (j1 , . . . , jm ) be the m-tuple (γ −1 (k1 ), . . . , γ −1 (km )) and let p and q be the elements of 1..m such that kp = ϕ(i) and kq = γ(i). Let f be the element of P n whose graph is (graph (γ) − {(jp , kp ), . . . , (jq , kq )}) ∪ {(jq , kp ), (jp , kp+1 ), . . . , (jq−1 , kq )}. By construction, we have, on the one hand, ϕ(i) = f (i) and, on the other hand, since {k1 , . . . , km } is s-shiftable, graph (f ) ⊆ s. Let g be an element of P n , with graph (g) ⊆ s. Let us show that ϕ(i) ≤ g(i). Since γ(i) ∈ Ki and since Ki is s-stable, we have g(i) ∈ Ki . Since also graph (g) ⊆ s, we have g(i) ∈ ({j ∈ Ki | (i, j) ∈ s} and thus ϕ(i) ≤ g(i).

6

Solving half of the problem

Throughout this part we suppose that r is a set of the form r = sort ∩ [b · e, b0 · e0 ] where b, b0 , e, e0 are elements of Dn such that b0 , e and e0 are increasing. We let s = {(i, j) ∈ (1..n)2 | [bi , b0 i ] ∩ [ej , e0 j ] 6= ∅} and γ be the mapping into 1..n, such that graph (γ) = graphmin (1..n, s, 1..n). Under these conditions and making use of theorems 1 and 2, we obtain without difficulty the lemmas which follow. Lemma 3 No restriction of the correspondence (1..n, s, 1..n) is of type (↓. &) or of type (.& ). . Lemma 4 If f and g are elements of P n , with graphs included in s and such that f  g, and if z is an element of Dn , the following implication holds: z n inf (b0 ◦f, e0 ) =⇒ z n inf (b0 ◦g, e0 ). Lemma 5 if γ ∈ P n then inf (b0 ◦γ −1 , e0 ) is an increasing element of Dn . We can now establish the two results of this part. Theorem 4 The following equivalence holds: r 6= ∅ ⇐⇒ γ ∈ P n . Proof. Let us suppose that r is not empty. Let us show that γ is a permutation of 1..n. There exists thus α ∈ P n and x ∈ Dn such that x is increasing, (x ◦ α) ∈ [b, b0 ] and x ∈ [e, e0 ]. Thus (x ◦ α) ∈ [b, b0 ] ∩ [e ◦ α, e0 ◦ α] and, for all i in 1..n, we have [bi , b0i ] ∩ [eα(i) , e0α(i) ] 6= ∅. It follows that graph (α) ⊆ s. According to property 1, it is possible to construct a finite non-extendable sequence f0 , f1 , . . . , fm of elements fi of P n such that f0 = α and fi−1  fi and graph (fi ) ⊆ s, for each i in 1..m. According to lemma 3 and theorem 2, we have graph (fm ) = graphmin (1..n, s, 1..n) and thus γ is a permutation of 1..n. If γ is a permutation of 1..n, for each i of 1..n, we have [bi , b0i ] ∩ [eγ(i) , e0γ(i) ] 6= ∅, that is to say [b, b0 ] ∩ [e◦γ, e0 ◦γ] 6= ∅ and so, according to lemma 1, the set r is not empty.

Theorem 5 Suppose γ ∈ P n and let ϕ = mapmin (s). The greatest element 0 −1 0 max (proj2n n+1 (r)) exists and is equal to inf (b ◦γ , e ) and, for each i in 1..n, the i least element min (proji (r)) exists and is equal to max (bi , eϕ(i) ). 8

Proof. Let y = inf (b0 ◦γ −1 , e0 ) and xi = max (bi , eϕ(i) ), for a given i in 1..n. Let us show that y ∈ proj2n n+1 (r). By definition of γ, for each i in 1..n, we have [bi , b0i ] ∩ [eγ(i) , e0γ(i) ] 6= ∅, thus [b ◦ γ −1 , b0 ◦ γ −1 ] ∩ [e, e0 ] 6= ∅ and y ∈ [b ◦ γ −1 , b0 ◦ γ −1 ] ∩ [e, e0 ]. Since then y◦γ ∈ [b, b0 ], y ∈ [e, e0 ] and, according to lemma 5, y is increasing, we conclude that y ∈ proj2n n+1 (r). n Let us suppose that z ∈ proj2n y. The element z n+1 (r) and let us show that z  is thus increasing, z ∈ [e, e0 ] and there exists α ∈ P n such that z ◦ α ∈ [b, b0 ]. Thus z ∈ [b ◦ α−1 , b0 ◦ α−1 ] ∩ [e, e0 ] and z n inf (e0 , b0 ◦ α−1 ) and graph (α) ⊆ s. According to property 1, it is possible to construct a finite non-extendable sequence f0 , f1 , . . . , fm of elements fi of P n such that f0 = α−1 and fi−1  fi and graph (fi ) ⊆ s, for each i in 1..m. According to lemma 3 and theorem 2, we have graph (fm ) = graphmin (1..n, s, 1..n) = graph (γ) and so, according to lemma 4, we have z n y. Taking into account what we have proved in the preceding paragraph, max (proj2n n+1 (r)) exists and is indeed equal to y. Let us show that xi ∈ projii (r). According to corollary 1, there exists f ∈ P n with graph (f ) ⊆ s and ϕ(i) = f (i). It follows that [b, b0 ] ∩ [e◦f, e0 ◦f ] 6= ∅ and thus, by letting w = sup (b, e ◦ f ) we have w ∈ [b, b0 ] and [w, w] ∩ [e ◦ f, e0 ◦ f ] 6= ∅. According to lemma 1, we have sort ∩ [w·e, w·e0 ] 6= ∅ and, given the fact that w ∈ [b, b0 ], we have wi ∈ projii (r). But wi = max (bi , ef (i) ) and f (i) = ϕ(i). Thus wi = xi and xi ∈ projii (r). Let us suppose that z ∈ projii (r) and let us show that xi  z. There exists thus α ∈ P n such that [b, b0 ] ∩ [e◦α, e0 ◦α] 6= ∅ and max (bi , eα(i) )  z. Therefore graph (α) ⊆ s. By corollary 1, ϕ(i) ≤ α(i), thus eϕ(i)  eα(i) , max (bi , eϕ(i) )  max (bi , eβ(i) ) and yi  z. Taking into account what we have proved in the preceding paragraph, min (projii (r)) exists and is indeed equal to xi , and this for each i in 1..n.

7

Solving the other half of the problem

In this part, we determine the “first half” of the sequence of least upper bounds and the “second half” of the sequence of greatest lower bounds of the studied 2ninterval. For this we establish results which are dual to those precedently used for determining the two “other halves” of these sequences. We suppose that r is a set of the form r = sort ∩ [c · e, c0 · e0 ] where c, c0 , e, e0 are elements of Dn such that b, e and e0 are increasing. We let s0 = {(i, j) ∈ (1..n)2 | [c(n+1)−i , c0 (n+1)−i ] ∩ [e(n+1)−j , e0 (n+1)−j ] 6= ∅} and γ 0 ,γ 00 be the mappings into 1..n, defined by graph (γ 0 ) = graphmin (1..n, s0 , 1..n), graph (γ 00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (γ 00 )}. If γ 0 ∈ P n , we also let ϕ0 ,ϕ00 be the mappings into 1..n, defined by ϕ0 = mapmin (s0 ), graph (ϕ00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (ϕ0 )}. Let us consider the ordered set (D, + ), where the order is defined by: a + b ⇐⇒ b  a. To each mathematical being ν defined implicitly with the relation , we associate the mathematical being ν + obtained by replacing  by the relation + . Thus we

9

have [a, b]+ = [b, a], inf + (E) = sup (E), min + (E) = max (E), etc. We have the equalities and the equivalence: s0 = {(i, j) ∈ (1..n) | [˜ c0i , c˜i ]+ ∩ [˜ e0j , e˜j ]+ } (4) x·y ∈ r ⇐⇒ x ˜ · y˜ ∈ sort + ∩ [c˜0 · e˜0 , c˜·˜ e]+

(5)

(n+1)−i projii (r) = proj(n+1)−i (sort + ∩ [c˜0 · e˜0 , c˜·˜ e]+ )

(6)

n + proj2n ˜ ∈ proj2n ∩ [c˜0 · e˜0 , c˜·˜ e]+ )} n+1 (r) = {y ∈ D | y n+1 (sort

(7)

n

where x, y are elements of D and z˜ denotes (zn , . . . , z1 ), if z is (z1 , . . . , zn ). Theorem 6 (Dual of theorem 4) The following equivalence holds: r 6= ∅ ⇐⇒ γ0 ∈ P n. Proof. Using, first equivalence (5), then equality (4) and theorem 4 applied to (D, + ), we get the following equivalences: r 6= ∅ ⇐⇒ sort + ∩ [c˜0 · e˜0 , c˜·˜ e]+ 6= ∅ ⇐⇒ γ 0 ∈ P n .

Theorem 7 (Dual of theorem 5) If γ 0 ∈ P n then the least element 00−1 min (proj2n , e) and, for each i in 1..n, the n+1 (r)) exists and is equal to sup (c◦γ i greatest element max(proji (r)) exists and is equal to min (c0i , e0ϕ00 (i) ). Proof. Using, first equality (4) and theorem 5 applied to (D, + ), then equivalence (6) or (7), we have the two following sequences of implications, where i is any integer of 1..n: + γ0 ∈ P n =⇒ max + (proj2n ∩ [c˜0 · e˜0 , c˜ · e˜]+ )) exists and is equal to n+1 (sort inf + (˜ c◦γ 0−1 , e˜) =⇒ max + (proj2n (r)) exists and is equal to the element y ∈ D such that n+1 y˜ = inf + (˜ c ◦γ 0−1 , e˜) =⇒ min (proj2n (r)) exists and is equal to sup (c◦γ 00−1 , e). n+1 (n+1)−i 0 + + γ ∈ P n =⇒ min (proj(n+1)−i (sort ∩ [c˜0 · e˜0 , c˜ · e˜]+ )) exists and is equal to max + (c˜0 (n+1)−i , e˜0 ϕ0 ((n+1)−i) ) =⇒ min + (projii (r)) exists and is equal to + ˜0 0 ˜ max (c (n+1)−i , e ϕ0 ((n+1)−i) ) =⇒ max (projii (r)) exists and is equal to min (c0i , e0ϕ00 (i) ).

8

Solving the totality of the problem

In this part, we suppose that r is a subset of D2n of the form r = sort ∩ [a · d, a0 · d0 ], where a, a0 , d, d0 are any elements of Dn . We let (b, b0 ) = (a◦π, a0 ◦π), (c, c0 ) = (a◦π 0 , a0 ◦π 0 ), (e, e0 ) = (d ↑, d0 ↓), where π, π 0 are permutations of 1..n computed in order to render b0 , c increasing. We introduce the subsets of (1..n)2 , s = {(i, j) ∈ (1..n)2 | [bi , b0 i ] ∩ [ej , e0j ] 6= ∅}, s0 = {(i, j) ∈ (1..n)2 | [c(n+1)−i , c0 (n+1)−i ] ∩ [e(n+1)−j , e0(n+1)−j ] 6= ∅} and the mappings γ, γ 0 , γ 00 into 1..n, defined by graph (γ) = graphmin (1..n, s, 1..n), graph (γ 0 ) = graphmin (1..n, s0 , 1..n), graph (γ 00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (γ 0 )}.

10

If γ and γ 0 are permutations of 1..n, we also introduce the mappings ϕ, ϕ0 , ϕ00 from 1..n into 1..n defined by ϕ = mapmin (s), ϕ0 = mapmin (s0 ), graph (ϕ00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (ϕ0 )}. Theorem 8 (Basis of the sort narrowing algorithm) We have the three following results: (1) The three properties r 6= ∅, γ ∈ P n , γ 0 ∈ P n are equivalent and, (2) if they hold, letting f = ϕ◦π −1 , f 00 = ϕ00 ◦π 0−1 and i being any integer of 1..n, we have the equalities 00−1 min (projii (r)) = max (ai , ef (i) ), min (proj2n , e), n+1 (r)) = sup (c◦γ i 2n 0 0 0 max (proji (r)) = min (ai , ef 00 (i) ), max (projn+1 (r)) = inf (b ◦γ −1 , e0 ), the left-hand sides of these equalities always existing, and (3) the 2n-interval [q, q 0 ], with q = min (proj11 (r)) · − − − · min (projnn (r)) · min (proj2n n+1 (r)), q 0 = max (proj11 (r)) · − − − · max (projnn (r)) · max (proj2n n+1 (r)) is, for inclusion, the smallest 2n-interval which contains r. Proof. Let us show the first result. The following properties are equivalent: (1) there exist x and y in Dn with x·y ∈ sort ∩ [a·d, a0 ·d0 ] (2) there exist x and y in Dn with x · y ∈ sort ∩ [a · e, a0 · e0 ] (3) there exist x and y in Dn with (x ◦ π) · y ∈ sort ∩ [(a ◦ π) · e, (a0 ◦ π) · e0 ] (4) there exist x and y in Dn with x·y ∈ sort ∩ [b·e, b0 ·e0 ] where (1) ⇐⇒ (2) comes from property 2) in part 3. Moreover we have (1) ⇐⇒ r 6= ∅ and (4) ⇐⇒ γ ∈ P n . Symmetrically, using theorem 4 we show that r 6= ∅ ⇐⇒ γ 0 ∈ P n . Let us show the second result. Using first theorem 5) and then property 2 we get the two sequences of implications: (1) γ ∈ P n =⇒ min (projii (sort ∩ [b·e, b0 ·e0 ])) exists and is equal to max (bi , eϕ(i) ) =⇒ min (projii (sort ∩ [(a◦π)·e, (a0 ◦π)·e0 ])) exists and is equal to max (aπ(i) , ef (π(i)) ) =⇒ min (projii (sort ∩ [a · e, a0 · e0 ])) exists and is equal to max (ai , ef (i) ) =⇒ min (projii (r)) exists and is equal to max (ai , ef (i) ). Let us show the remainder of the second result. We have the sequence of implications: 0 0 0 −1 0 (2) γ ∈ P n =⇒ max (proj2n , e ) =⇒ n+1 (sort ∩ [b·e, b ·e ])) exists and is equal to inf (b ◦γ 0 0 0 −1 0 2n max (proj2n (sort ∩ [a·e, a ·e ])) exists and is equal to inf (b ◦γ , e ) =⇒ max (proj n+1 n+1 (r)) 0 −1 0 exists and is equal to inf (b ◦γ , e ). Symmetrically, using theorem 7 we show the two implications: γ 0 ∈ P n =⇒ max (projii (r) exists and is equal to min (ai , ef 0 (i) ) and γ 0 ∈ P n =⇒ min (proj2n n+1 (r)) exists and is equal to sup (c◦γ 00−1 , e). Let us show the third result. If z ∈ r then, according to the general definition of proj, we have zi ∈ projii (r) and (zn+1 , . . . , zn ) ∈ proj2n n+1 (r). Since we have just shown that, for each i in 1..n, the least and greatest elements of each of these sets exist, we have z ∈ [q, q 0 ]. Now let [p, p0 ] be a 2n-interval such that r ⊆ [p, p0 ]. We have q ∈ [p, p0 ] and q 0 ∈ [p, p0 ] and thus [q, q 0 ] ⊆ [p, p0 ]. Finally we have [p, p0 ] = [q, q 0 ] which ends the proof.

11

9

Details and complexity of the algorithm

Theorem 8 gives the bases of an algorithm for computing, in the sense of inclusion, the least 2n-interval Q containing a subset of Dn of the form sort ∩ P , where P is a given 2n-interval. We will illustrate this algorithm in an example and, at the same time, estimate its general complexity with respect to n. This complexity will be counted as a number of comparisons, adressings and transfers of elements of D or 1..(2n). We will execute the algorithm in six steps. For each step we will show that we execute O(n) or O(n logn) elementary operations, which leads to a total complexity of O(n logn) elementary operations. As ordered set we take (R, ≤) and as initial 2n-interval we take P = [a·d, a0 ·d0 ] with (a, a0 ) = ((0, 6, 10, 4, 4), (13, 10, 11, 16, 6)), (d, d0 ) = ((1, 5, 6, 11, 10), (3, 10, 9, 17, 15)).

Computing the basic elements In O(n) operations, we compute (e, e0 ) = (d ↑, d0 ↓) = ((1, 5, 6, 11, 11), (3, 9, 9, 15, 15)) and, with the help of two sortings, we obtain in O(n logn) operations, (b, b0 ) = (a◦π, a0 ◦π) = ((4, 6, 10, 0, 4), (6, 10, 11, 13, 16)), (c, c0 ) = (a◦π 0 , a0 ◦π 0 ) = ((0, 4, 4, 6, 10), (13, 16, 6, 10, 11)), graph (π) = graph (π 0 ) =

{(1, 5), (2, 2), (3, 3), (4, 1), (5, 4)}, {(1, 1), (2, 4), (3, 5), (4, 2), (5, 3)}.

Computing s and s0 We are now interested in computing a compact representation of s = {(i, j) ∈ (1..n)2 | [bi , b0 i ] ∩ [ej , e0j ] 6= ∅}, s0 = {(i, j) ∈ (1..n)2 | [c(n+1)−i , c0 (n+1)−i ] ∩ [e(n+1)−j , e0(n+1)−j ] 6= ∅}. We first handle s by using theorem 1. We sort, on the one hand, the mixture of the least elements ai and the greatest elements e0i and, on the other hand, the mixture of the least elements ei and the greatest elements a0i : b·e0 = (4, 6, 10, 0, 4, 3, 9, 9, 15, 15), e·b0 = (1, 5, 6, 11, 11, 6, 10, 11, 13, 16). While maintaining the original order as much as possible, we get in O(nlog n) operations, (b·e0 )◦α = (0, 3, 4, 4, 6, 9, 9, 10, 15, 15), (e·b0 )◦α0 = (1, 5, 6, 6, 10, 11, 11, 11, 13, 16), with (α(1), . . . , α(10)) = (4, 1+5, 1, 5, 2, 2+5, 3+5, 3, 4+5, 5+5), (α0 (1), . . . , α0 (10)) = (1, 2, 3, 1+5, 2+5, 4, 5, 3+5, 4+5, 5+5). By scanning the α(i)s in increasing order of the is and the α0 (i)s in decreasing order of the is, we extract in O(n) operations the information s = {(i, j) ∈ (1..n)2 | j ∈ Ii }, (I1 , . . . , I5 ) = (2..3, 2..3, 4..5, 1..5, 2..5).

12

To compute s0 , we use the fact that s0 = {(i, j) ∈ (1..n)2 | (π −1 (π 0 ((n+1)−i)), (n+1)−j) ∈ s} and we obtain in O(n) operations s0 = {(i, j) ∈ (1..n)2 | j ∈ Ii0 }, (I10 , . . . , I50 ) = (1..2, 3..4, 3..4, 1..4, 1..5).

Computing the two graphmin sets We now compute graph (γ) = graphmin (1..n, s, 1..n) = {(1, 2), (2, 3), (3, 4), (4, 1), (5, 5)}, graph (γ 0 ) = graphmin (1..n, s0 , 1..n) = {(1, 1), (2, 3), (3, 4), (4, 2), (5, 5)} According to definition 1, the set of ordered pairs which composes graphmin (1..n, s, 1..n) is of the form {(1, k1 ), . . . , (m, km )} and the ki s are computed in increasing order of the is. If we consider the compact representation of s, each ki is obtained by choosing the least element of the set Ii − {k1 , . . . , ki−1 }. At first glance, the computation of γ needs O(n2 ) operations. To achieve a computation of γ in O(n logn) operations, we construct a balanced binary tree of 2n−1 nodes with n final nodes. Each node is labeled by an interval of integers. The final nodes are labeled from left to right by the intervals (1..1), . . . , (n..n). A non-final node, whose left daughter is labeled k1 ..l1 and whose right daughter is labeled k2 ..l2 , is labeled k1 ..l2 . The computation of each ki consists in (1) covering the branch which leads from the initial node to the final node labeled ki ..ki , while stopping the computations if the interval J of the current node of the branch is such that Ii ∩ J = ∅ and, otherwise, moving to its left daughter if the interval J of this daughter is such that Ii ∩ J = ∅, and moving to its right daughter otherwise, (2) suppressing this final node, (3) covering the branch in reverse direction and, for each non-final node met, suppressing the node, if it becomes useless, or update its interval, if the node is still useful. The tree being composed of 2n − 1 nodes, its construction will use O(n) operations. The tree being balanced, its longest branches are composed of dlog2 ne nodes and thus the computation of one ki is performed in O(log n) operations. The computation of mapmin (1..n, s, 1..n), that is to say of γ, is indeed performed in O(n log n). For the same reason, the computation of γ 0 is performed in O(n log n) operations. In O(n) operations we also compute, graph (γ 00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (γ 0 )} = {(1, 1), (2, 4), (3, 2), (4, 3), (5, 5)}.

Partitioning 1..n in stable and shiftable subsets According to theorem 3, we compute the partitions of 1..n, decomp (s) = {{2, 3}, {1, 4, 5}} and decomp (s0 ) = {{1, 2, 3, 4}, {5}}

13

by the sequences of rewritings (1, ε, ∅, (1, 2, 3, 4, 5)) −→ (1, ε, ∅, (1, 2, 3, 4, 5)) −→ (2, (1, 2, 3), ∅, (4, 5)) −→ (2, (1, 2, 3, 4), ∅, (5)) −→ (1, (1), {{2, 3}}, (4, 5)) −→ (1, ε, {{1, 2, 3, 4}}, (5)) −→ and (2, (1, 4, 5), {{2, 3}}, ε) −→ (2, (5), {{1, 2, 3, 4}}, ε) −→ (1, ε, {{2, 3}, {1, 4, 5}}, ε) (1, ε, {{1, 2, 3, 4}, {5}}, ε) In these rewritings, each integer of 1..n which initially occurs in position 4 of the 4-tuple, moves first to position 2, then to position 3. The cost of each of these moves, being essentially the cost of checking whether a sequence of two integers is or is not s-shiftable, is a constant a number of operations, not depending on n. Thus the total cost is O(n) operations.

Computing the mapmin mappings For each i from 1..n we consider the sets Ki = the class of γ(i) in decomp (s), Ki0 = the class of γ 0 (i) in decomp (s0 ). In O(n) operations we obtain (K1 , . . . , K5 ) = ({2, 3}, {2, 3}), {1, 4, 5}, {1, 4, 5}, {1, 4, 5}), (K10 , . . . , K50 ) = ({1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {1, 2, 3, 4}, {5}). If we go back to the compact representation of s and to definition 2, the set {(1, k1 ), . . . , (n, kn )} of ordered pairs which composes graph (mapmin (s)) is obtained by choosing ki as the least element of the set Ii ∩ Ki . Given the fact that I1 is an interval and that Ki is already ordered, the computation of one ki can be performed by a dichotomic search in O(log n) operations. Thus we obtain, in O(n log n) operations graph (ϕ) = graph (mapmin (s)) = {(1, 2), (2, 2), (3, 4), (4, 1), (5, 4))}, graph (ϕ0 ) = graph (mapmin (s0 )) = {(1, 1), (2, 3), (3, 3), (4, 1), (5, 5))}. and, in O(n) operations graph (ϕ00 ) = {(i, j) ∈ (1..n)2 | ((n+1)−i, (n+1)−j) ∈ graph (ϕ0 )} = {(1, 1), (2, 5), (3, 3), (4, 3), (5, 5)}.

Final computations All the remaining computations are performed in O(n) operations: graph (f ) = graph (ϕ◦π −1 ) = {(1, 1), (2, 2), (3, 4), (4, 4), (5, 2)}, 00 graph (f ) = graph (ϕ00 ◦π 0−1 ) = {(1, 1), (2, 3), (3, 5), (4, 5), (5, 3)}, e◦f = (1, 5, 11, 11, 5), c◦γ 00−1 = (0, 4, 6, 4, 10),

e0 ◦f 00 = (3, 9, 15, 15, 9), b0 ◦γ −1 = (13, 6, 10, 11, 16).

We finally get Q = [q, q 0 ] with q = (1, 6, 11, 11, 5) · (1, 5, 6, 11, 11), q 0 = (3, 9, 11, 15, 6) · (3, 6, 9, 11, 15).

14

10

Conclusion and prospects

To conclude we would like to indicate three directions in which developments could be added to the work presented here. The first development is to extend our results by replacing the closed intervals of D by convex subsets of D and this in the spirit of what has been done in [1] for the ordered set (R, ≤). The second development concerns the link between the sortedness constraint and the “all different” constraint, written (x1 , . . . , xn ) ∈ dif , which states that the xi s are integers, all different. It must be noted that, if D is the set of integers which lie between 1 and n, we have   ∃y1 . . . ∃yn    (x1 , . . . , xn , y1 , . . . , yn ) ∈ sort ∧  (x1 , . . . , xn ) ∈ dif ∧  ≡  x1 ∈ A1 ∧ · · · ∧ xn ∈ An ∧  , x1 ∈ A1 ∧ · · · ∧ xn ∈ An y1 ∈ {1} ∧ · · · ∧ yn ∈ {n} which allows the narrowing of this particular constraint in O(n log n). The move to the general case would provide an alternative of complexity O(n log n) to the algorithms described in [2, 6]. These algorithms, based on the subset representatives theorem of Philip Hall, have a complexity of O(n2 ). The third development is in the study of a narrowing algorithm for the strict sorting constraint within intervals, where (x1 , . . . , xn , y1 , . . . , yn ) ∈ strictsort expresses that the xi s are all different and that (y1 , . . . , yn ) is obtained by sorting the xi s in increasing order. It must be noticed that this last development includes the previous mentioned one.

References [1] Aillaud C., R´esolution de contraintes par analyse de parties convexes de R, Th`ese de doctorat, Laboratoire d’Informatique de Marseille, Universit´e de la M´editerran´ee, July 1997. [2] Leconte M., A Bounds-based Reduction Scheme for Constraints of Difference. Constraint-96, Second International Workshop on Constraint-based Reasoning, Key West, Florida, 19 May 1996. [3] Older W.J. and A. Vellino, Extending Prolog with Constraint Arithmetic on Real Intervals, Proceeding of the Canadian Conference on Electrical and Computer Engineering, 1990. [4] Older W.J., F. Swinkels and M. van Emden, Getting to the Real Problem: Experience with BNR-Prolog in OR, in Proceedings of the Third International Conference on the Practical Applications of Prolog, (PAP’95 at Paris), Alinmead Software Ltd, ISBN 0 9 525554 0 9, April 1995. [5] Zhou J., A constraint program for solving the job-shop problem, Principles and Practice of Constraint programming, (Proc. of CP’96, Cambridge, USA), edited by Eugene C. Freuder, Lecture Notes in Computer Science, Springer Verlag, pp 510-524, August 1996. [6] Zhou J., Computing Smallest Cartesian Products of Intervals: Application to the Jobshop Scheduling Problem, Th`ese de doctorat, Laboratoire d’Informatique de Marseille, Universit´e de la M´editerran´ee, March 1997.

15