From Local to Global Consistency in Temporal Constraint Networks
Total Page:16
File Type:pdf, Size:1020Kb
From Lo cal to Global Consistency in Temp oral ? Constraint Networks Manolis Koubarakis Dept of Computation UMIST PO Box Manchester M QD UK manolissnacoumistacuk Abstract We study the problem of global consistency for several classes of quantitative temp oral constraints which include inequalities inequations and disjunctions of in equations In all cases that we consider we identify the level of lo cal consistency that is necessary and sucient for achieving global consistency and present an al gorithm which achieves this level As a bypro duct of our analysis we also develop an interesting minimal network algorithm Intro duction One of the most imp ortant notions found in the constraint satisfaction lit erature is global consistency Fre In a global ly consistent constraint set all interesting constraints are explicitly represented and the pro jection of the solution set on any subset of the variables can b e computed by simply col lecting the constraints involving these variables An imp ortant consequence of this prop erty is that a solution can b e found by backtrackfree search Fre Enforcing global consistency can take an exp onential amount of time in the worst case FreCo o As a result it is very imp ortant to identify cases in which local consistency which presumably can b e enforced in p olynomial time implies global consistency Dec Invited submission to the sp ecial issue of Theoretical Computer Science dedi cated to the st International Conference on Principles and Practice of Constraint Programming CP Editors U Montanari and F Rossi Forthcoming In this pap er we study the problem of enforcing global consistency for sets of quantitative temp oral constraints over the rational or real numb ers The class of constraints that we consider includes equalities of the form x y r inequalities of the form x y r inequations of the form x y r and disjunctions of inequations of the form x y r x y r 1 1 1 n n n where x y x y x y are variables ranging over the rational numb ers 1 1 n n and r r r are rational constants For the representation of equalities 1 n inequalities and inequations we utilize binary temporal constraint networks Disjunctions of inequations are represented separately Disjunctions of inequations have b een intro duced in Kou following the ob servation that in the pro cess of eliminating variables from a set of temp oral 1 constraints an inequation can give rise to a disjunction of inequations In related temp oral reasoning research VKvBaGS GSS have consid ered inequations of the form t t in the context of p oint algebra PA 1 2 networks Also Meia has studied inequations of the form t r r a real constant in the context of p oint networks with almostsingleinte rval domains In a more general context researchers in constraint logic programming orig inally LM and later IvHImbImb have studied disjunctions of arbitrary linear inequations eg x x x x x x 1 2 3 2 3 5 LM IvH concentrate on deciding consistency and computing canonical forms while ImbImb deal mostly with variable elimination It is inter esting to notice that the basic algorithm for variable elimination in this case has b een discovered indep endently in Kou and Imb although Kou has used the result only in the context of temp oral constraints The contributions of this pap er can b e summarized as follows i We show that strong consistency is necessary and sucient for achiev ing global consistency in temp oral constraint networks for inequalities 2 and inequations Corollary This result and all subsequent ones rely heavily on an observation of LM Kou Imb disjunctions of inequations can be treated indep endently of one another for the purposes of deciding consistency or performing variable elimination 4 We give an algorithm which achieves global consistency in O H n 1 Elimination of variables is a very imp ortant op eration in temp oral constraint databases KoucKouaKoub 2 As shown in DMP if only inequalities are considered path consistency is nec essary and sucient for achieving global consistency where n is the numb er of no des in the network and H is the numb er of inequations Theorems and The analysis of this algorithm demonstrates that there are situations where it is impossible to enforce global consistency without intro ducing disjunctions of inequations A detailed analysis of the global consistency algorithm also gives us an algorithm for computing the minimal temp oral constraint network in 2 3 this case The complexity of this algorithm is O maxH n n Theorem ii We also consider global consistency of p oint algebra networks VK In this case strong consistency is also necessary and sucient for achieving global consistency Theorem This result which answers an op en problem of vBa also follows from Kou but the b ounds of the algorithms given there were not the tightest p ossible iii Finally we consider global consistency when disjunctions of inequations are also allowed in the given constraint set This case is mostly of theoret ical interest and is presented here for completeness In this case strong V consistency is necessary and sucient for achieving global con sistency Corollary The parameter V is the maximum numb er of variables in any disjunction of inequations Most of the ab ove results come from the authors PhD thesis Kouc or are renements of ideas presented there The pap er is organized as follows The next section presents denitions and preliminaries Section discusses global consistency of temp oral constraint networks while Section presents an algorithm for computing the minimal network Section considers the case of p oint algebra networks Section considers the case of arbitrary temp oral constraints Finally Section sum marizes our results App endix A contains two long pro ofs Denitions and Preliminaries We consider time to b e linear dense and unb ounded Points will b e our only time entities Points are identied with the rational numb ers but our results still hold if p oints are identied with the reals The set of rational numb ers will b e denoted by Q 0 0 0 Denition A temporal constraint is a formula t t r t t r t t 0 0 0 0 0 are t r where t t t t t r t t r or t t n 1 n 1 n 1 n 1 n 1 variables and r r r are rational constants 1 n The rationale for studying disjunctions of inequations has b een given in Kou Denition Let C b e a set of temp oral constraints in variables t t 1 n The solution set of C denoted by S ol C is n f Q and for every c C satises cg 1 n 1 n 1 n Each memb er of S ol C is called a solution of C A set of temp oral constraints is called consistent if and only if its solution set is nonempty If c is a disjunction of inequations then c denotes the complement of c ie the conjunction of equations obtained by negating c If C is a set of equalities n in n variables the solution set of C is an ane subset of Q If C is a set of inequalities in n variables the solution set of C is a convex p olyhedron n in Q If C is a set of disjunctions of inequations the solution set of C is n Q n S ol f c c C g The interested reader can nd background material on ane spaces and convex p olyhedra in Sch Let C b e a set of temp oral constraints in variables x x which contains 1 n only equations inequalities and inequations but not disjunctions of inequa tions The temporal constraint network TCN asso ciated with C is a lab eled directed graph G V E where V f ng No de i represents variable x and edge i j represents the binary constraints involving x and x As i i j usual unary constraints will b e represented as binary constraints with the in tro duction of a sp ecial variable x The set of constraints asso ciated with 0 a TCN N will b e denoted by C onstr aintsN Denition Let I b e a set of rational numb ers I will b e called an almost convex interval if it is of the form l r r r r r r u 1 1 2 k 1 k k where l r r r u are rational numb ers such that l r r 1 k 1 k 1 k 1 r u and k An almost convex interval is also allowed to b e op en from k the right or left The k values r r will b e called the holes of interval I We dene a 1 k function hol es such that for each almost convex interval I as ab ove hol esI fr r g 1 k Let us assume that the set of constraints c on x x is ij j i h j i 1 x x r g fx x d x x d x x r j i j i ij j i j i j i j i j i x 2 R x 1 [ 1 3 x 1 R x 4 Fig A temp oral constraint network h j i 1 where d r r d Then the corresp onding TCN N will have j i ij j i j i an edge i j lab eled by the almostconvex interval h 1 h h j i j i j i 1 1 2 N d r r r r r r d ij j i ij j i j i j i j i j i j i Example The TCN of Figure represents the constraints x x x x x x 2 1 2 3 4 1 x x x x 4 3 4 2 Given an interval I conv I will denote the convex hul l of I ie the minimal in the settheoretic sense convex interval which includes I Formally conv l r r r r r r u l u 1 1 2 k 1 k k and conv I I if I is convex If N is a TCN then conv N denotes the TCN which is obtained from N by substituting each interval N by conv N ij ij If N is a TCN then its solution set is S ol N S ol C onstr aintsN A TCN is called consistent i its solution set is nonempty Two TCN are called equivalent i their solution sets are equal DMP Meib For the case of TCN the op erations of comp osition and intersection of almost convex intervals are dened as usual Meib Denition