Presentation is loading. Please wait.

Presentation is loading. Please wait.

19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013.

Similar presentations


Presentation on theme: "19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013."— Presentation transcript:

1 19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013

2 Lecture 4: Associating Narrowing Functions to Constraints2 Projection Function and its Enclosure Associating Narrowing Functions to Constraints Complementary Approaches Constraint Newton Method Projection Function Enclosure with the Interval Projection Properties of an Interval Projection Interval Projections Inverse Functions Primitive Constraints Constraint Decomposition Method Projection Function Enclosure with the Inverse Function 19 April 2013

3 Lecture 4: Associating Narrowing Functions to Constraints3 Projection Function and its Enclosure A set of narrowing functions is associated with a constraint by considering projections with respect to each variable in the scope A projection function identifies from a box: all the possible values of a particular variable for which there is a value combination belonging to the constraint relation All value combinations within B with x i values outside  x i  (B) are outside the relation  and so they do not satisfy the constraint c. 19 April 2013

4 Lecture 4: Associating Narrowing Functions to Constraints4 Projection Function and its Enclosure All value combinations within B with x i values outside  x i  (B) are outside the relation  and so they do not satisfy the constraint c. 19 April 2013

5 Lecture 4: Associating Narrowing Functions to Constraints5 Projection Function and its Enclosure A box-narrowing function narrows the domain of one variable, from a box representing all the variables of the CCSP, eliminating some values that do not belong to a projection function Correctness follows from  x i  (B[s])  I 1  …  I m (the eliminated combinations have x i values outside the projection function) Contractance follows from I 1  …  I m  I x i (the only changed domain is smaller than the original) 19 April 2013

6 Lecture 4: Associating Narrowing Functions to Constraints6 Constraint Decomposition Method Decomposition of complex constraints into an equivalent set of primitive constraints whose projection functions can be easily computed by inverse functions A set of primitive constraints can be easily obtained from any non- primitive constraint: A constraint may be decomposed by considering new variables and new equality constraints The whole set of primitives may be obtained by repeating this process until all constraints are primitive Primitive Constraints 19 April 2013

7 Lecture 4: Associating Narrowing Functions to Constraints7 Constraint Decomposition Method Primitive Constraints The constraint c is not primitive since it contains two basic arithmetic operators and the variable x 1 occurs twice 19 April 2013

8 Lecture 4: Associating Narrowing Functions to Constraints8 Constraint Decomposition Method Primitive Constraints a new variable x 3 is introduced and c is replaced by c 1 and c 2 P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) the domain of x 3 is unbounded defining a new equivalent CCSP P’ c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 19 April 2013

9 Lecture 4: Associating Narrowing Functions to Constraints9 Constraint Decomposition Method Inverse Functions 19 April 2013

10 Lecture 4: Associating Narrowing Functions to Constraints10 Constraint Decomposition Method Inverse Functions P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 The inverse interval expressions are associated with the primitive constraints of the decomposed CCSP P’ 19 April 2013

11 Lecture 4: Associating Narrowing Functions to Constraints11 Constraint Decomposition Method Projection Function Enclosure with the Inverse Function The inverse interval expression wrt a variable allows the definition of the projection function of the constraint wrt to that variable 19 April 2013

12 Lecture 4: Associating Narrowing Functions to Constraints12 Constraint Decomposition Method Projection Function Enclosure with the Inverse Function P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 Box-narrowing functions are associated with the decomposed CCSP P’ 19 April 2013

13 Lecture 4: Associating Narrowing Functions to Constraints13 Constraint Decomposition Method Example with B = no pruning would be obtained: x 2 x 1 x 1 = 0 x 1 =x 2 B 0 0.5 1.5 0.5 1.5  x 1  (B) = {0}  [0.5..1.5]  x 2  (B) = [0.5..1.5] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[-0.5..2] B =<[-0.5..2.5],[0.5..1.5]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) B’= and x 3 =[-2.0,2.0] B’= NF 1 ( ) = NF 2 ( ) = NF 3 ( ) = NF 4 ( ) = NF 5 ( ) = 19 April 2013

14 Lecture 4: Associating Narrowing Functions to Constraints14 Constraint Decomposition Method Example with B = the best narrowing is obtained: x 2 x 1 x 1 = 0 x 1 =x 2 B 0 0.5 1.5 0.5 1.5  x 1  (B) = [0.5,1.0]  x 2  (B) = [0.5..1.0] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[-0.5..2] B =<[-0.5..2.5],[0.5..1.5]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) B’= and x 3 =[0.0,0.0] B’ NF 1 ( ) = NF 2 ( ) = NF 3 ( ) = NF 4 ( ) = NF 5 ( ) = 19 April 2013

15 Lecture 4: Associating Narrowing Functions to Constraints15 Constraint Decomposition Method Example with B = the best narrowing is also obtained: x 2 x 1 x 1 = 0 x 1 =x 2 B 0 0.5 1.5 0.5 1.5  x 1  (B) = [0.0,0.0]  x 2  (B) = [0.5..1.0] c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[-0.5..2] B =<[-0.5..2.5],[0.5..1.5]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) B’= and x 3 =[0.5,1.5] B’ NF 1 ( ) = NF 2 ( ) = NF 3 ( ) = NF 4 ( ) = NF 5 ( ) = 19 April 2013

16 Lecture 4: Associating Narrowing Functions to Constraints16 Constraint Decomposition Method Example with B = inconsistency is proved: x 2 x 1 x 1 = 0 x 1 =x 2 B 0 0.5 1.5 0.5 1.5  x 1  (B ) =   x 2  (B c  x 1  (x 2 -x 1 ) = 0 P= (X,D,C) = (<x 1,x 2 >,D 1  D 2,{c}) D 1 =[-1..3] D 2 =[-0.5..2] B =<[-0.5..2.5],[0.5..1.5]>  = { <x 1,x 2 >  D |x 1  (x 2 -x 1 ) = 0 } c= (<x 1,x 2 >,  ) c1 x1x3=0c1 x1x3=0 c2 x2-x1=x3c2 x2-x1=x3 P’=(,D 1  D 2  [- ..+  ],{c 1,c 2 }) B’ =  NF 1 ( ) = NF 2 ( ) = NF 3 ( ) = NF 4 ( ) = NF 5 ( ) = 19 April 2013

17 Lecture 4: Associating Narrowing Functions to Constraints17 Constraint Newton Method Complex constraints are handled without decomposition using a technique based on the interval Newton method for searching the zeros of univariate functions Interval Projections 19 April 2013

18 Lecture 4: Associating Narrowing Functions to Constraints18 Constraint Newton Method All value combinations within B with x i values outside  x i  (B) are outside the relation  and so they do not satisfy the constraint c. Interval Projections  x 1  B  x 1  ([0.5..1.5] ‑ x 1 )  x 2  B  [-0.5..2.5]  (x 2 -[-0.5..2.5]) 19 April 2013

19 Lecture 4: Associating Narrowing Functions to Constraints19 Constraint Newton Method Properties of an Interval Projection From the properties of the interval projections, a strategy is devised for obtaining an enclosure of the projection function 19 April 2013

20 Lecture 4: Associating Narrowing Functions to Constraints20 Constraint Newton Method  r  [-0.5,2.5] r  x 1  (B)   v  [r]  ([0.5..1.5] ‑ [r]): v = 0 Properties of an Interval Projection  x 1  B  x 1  ([0.5..1.5] ‑ x 1 )  x 2  B  [-0.5..2.5]  (x 2 -[-0.5..2.5])  r  [0.5,1.5] r  x 2  (B)   v  [-0.5..2.5]  ([r]-[-0.5..2.5]): v = 0 19 April 2013

21 Lecture 4: Associating Narrowing Functions to Constraints21 Constraint Newton Method Projection Function Enclosure with the Interval Projection The strategy used in the constraint Newton method is to search for the leftmost and the rightmost elements of the original variable domain satisfying the interval projection condition What is needed is a function, denoted narrowBounds, with the following property:  x i  (B)  [a..b]  narrowBounds(B[x i ]) 19 April 2013

22 Lecture 4: Associating Narrowing Functions to Constraints22 Constraint Newton Method Projection Function Enclosure with the Interval Projection To obtain a new bound, the projection condition is firstly verified in the extreme of the original domain and only in case of failure the leftmost (rightmost) zero of the interval projection is searched In case of failure of an inequality condition, it assumes that the leftmost (rightmost) element satisfying the interval projection condition must be a zero of the interval projection 19 April 2013

23 Lecture 4: Associating Narrowing Functions to Constraints23 Constraint Newton Method Projection Function Enclosure with the Interval Projection The verification if the interval projection condition is satisfied in a canonical interval is straightforward 19 April 2013

24 Lecture 4: Associating Narrowing Functions to Constraints24 Constraint Newton Method Projection Function Enclosure with the Interval Projection The algorithm for searching for the leftmost zero of an interval projection uses a Newton Narrowing function (NN) associated with the interval projection for reducing the search space 19 April 2013

25 Lecture 4: Associating Narrowing Functions to Constraints25 Constraint Newton Method Narrowing the domain of variable x 1 : narrowBounds([-0.5,2.5]) Example  x 1  B  x 1  ([0.5..1.5] ‑ x 1 )  x 2  B  [-0.5..2.5]  (x 2 -[-0.5..2.5]) intervalProjCond([-0.5,-0.499])  False 0  x 1  B ([-0.5,-0.499])=[-1,-0.499] 19 April 2013

26 18 March 2011Lecture 4: Associating Narrowing Functions to Constraints26 Constraint Newton Method Example  x 1  B  x 1  ([0.5..1.5] ‑ x 1 )  x 2  B  [-0.5..2.5]  (x 2 -[-0.5..2.5]) 19 April 2013Lecture 4: Associating Narrowing Functions to Constraints26

27 Lecture 4: Associating Narrowing Functions to Constraints27 Constraint Newton Method Example  x 1  B  x 1  ([0.5..1.5] ‑ x 1 )  x 2  B  [-0.5..2.5]  (x 2 -[-0.5..2.5]) Proceeding similarly for the upper bound of x 1, the best narrowing is obtained: B’= B’ 19 April 2013

28 Lecture 4: Associating Narrowing Functions to Constraints28 Complementary Approaches A modification of the Newton method, is to use other interval extensions of the projection function associated with a constraint A modification of the decomposition method, transforms the original set of constraints into an equivalent one where for each constraint (not necessarily primitive) the inverse interval expressions can be easily computed by interval arithmetic Other modification is the introduction of a pre-processing phase preceding the definitions of the box-narrowing functions to obtain an equivalent CCSP (ex: introduction of redundant constraints) 19 April 2013

29 Lecture 4: Associating Narrowing Functions to Constraints29 Complementary Approaches Other variation is the development of an algorithm capable of implementing a narrowing function for any constraint without decomposing, with the same results as the decomposition method A complementary approach take advantage of the way that a complex constraint is expressed: An algorithm that does not require decomposing complex constraints, makes it possible to combine both basic methods, and choose either one or the other, according to the form of the expression of the interval projection Finally, some approaches consider narrowing functions capable of narrowing several variable domains simultaneously (ex: based on the multivariate interval Newton method) 19 April 2013


Download ppt "19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013."

Similar presentations


Ads by Google