Domain Filtering Consistencies

Enforcing local consistencies is one of the main features of constraint reasoning. Which level of local consistency should be used when searching for solutions in a constraint network is a basic question. Arc consistency and partial forms of arc cons…

Authors: C. Bessiere, R. Debruyne

Domain Filtering Consistencies
Journal of Articial In telligence Researc h 14 (2001) 205-230 Submitted 12/00; published 5/01 Domain Filtering Consistencies Rom uald Debruyne R omuald.Debr uyn e@emn .fr Memb er of the Coconut gr oup Ec ole des Mines de Nantes, L a Chantr erie, 4, R ue A lfr e d Kastler, 44307 Nantes Ce dex 3 - F r anc e Christian Bessi  ere bessiere@lirmm.fr Memb er of the Coconut gr oup LIRMM - CNRS UMR 5506, 161 rue A da, 34392 Montp el lier Ce dex 5 - F r anc e Abstract Enforcing lo cal consistencies is one of the main features of constrain t reasoning. Whic h lev el of lo cal consistency should b e used when searc hing for solutions in a constrain t net w ork is a basic question. Arc consistency and partial forms of arc consistency ha v e b een widely studied, and ha v e b een kno wn for sometime through the forw ard c hec king or the MA C searc h algorithms. Un til recen tly , stronger forms of lo cal consistency remained limited to those that c hange the structure of the constrain t graph, and th us, could not b e used in practice, esp ecially on large net w orks. This pap er fo cuses on the lo cal consistencies that are stronger than arc consistency , without c hanging the structure of the net w ork, i.e., only remo ving inconsisten t v alues from the domains. In the last v e y ears, sev eral suc h lo cal consistencies ha v e b een prop osed b y us or b y others. W e mak e an o v erview of all of them, and highligh t some relations b et w een them. W e compare them b oth theoretically and exp erimen tally , considering their pruning eciency and the time required to enforce them. 1. In tro duction There are more and more applications in articial in telligence that use constrain t net w orks (CNs) to solv e com binatorial problems, ranging from design to diagnosis, resource allo cation to car sequencing, natural language understanding to mac hine vision. Finding a solution in a constrain t net w ork in v olv es lo oking for a set of v alue assignmen ts, one for eac h v ariable, so that all the constrain ts are sim ultaneously satised (Meseguer, 1989; Tsang, 1993). This task is NP-hard and man y exp onen tial time algorithms ha v e b een prop osed to solv e this problem. These algorithms, whic h mak e a systematic exploration of the searc h space, all ha v e bac ktrac king as a basis. As long as the unassigned v ariables ha v e v alues consisten t with the partial instan tiation, they extend it b y assigning v alues to v ariables. Otherwise, a dead-end is reac hed and some previous assignmen ts ha v e to b e c hanged b efore going on with the partial instan tiation extension. The explicit constrain ts of the net w ork together induce some implicit constrain ts. Since basic searc h algorithms do not record these implicit constrain ts, they w aste time b y rep eatedly detecting the lo cal inconsistencies caused b y them. Filtering tec hniques are essen tial to reduce the size of the searc h space and so to impro v e the eciency of searc h algorithms. They can b e used during a prepro cessing step to remo v e once and for all some lo cal inconsistencies that otherwise w ould ha v e b een rep eatedly found during searc h (Dec h ter & Meiri, 1994). They can also b e main tained during searc h. c  2001 AI Access F oundation and Morgan Kaufmann Publishers. All righ ts reserv ed. Debr uyne & Bessi  ere Searc h algorithms dier in the kind of lo cal consistency they ac hiev e after eac h c hoice of a v alue for a v ariable. Most of them enforce partial arc consistency , going from forw ard c hec king (F C, Golom b & Baumert, 1965; Haralic k & Elliott, 1980), whic h only remo v es the v alues directly arc inconsisten t with the last assignmen t, to really full lo ok-ahead (RFL, Gasc hnig, 1974), whic h ac hiev es full arc consistency . Arc consistency (A C) and partial forms of arc consistency are widely used for t w o reasons. First, they ha v e lo w space and time complexities, while path consistency and higher lev els of k -consistency , whic h w ere for a long time the only other options, are prohibitiv e and can c hange the structure of the net w ork. Moreo v er, un til 1995, more pruningful lo cal consistencies seemed unin teresting since exp erimen tal ev aluations of searc h algorithms sho w ed that the limited lo cal consistency used b y forw ard c hec king w as the b est c hoice (Nadel, 1988; Kumar, 1992; Bacc h us & v an Run, 1995). This conclusion is not surprising since the comparisons w ere made on v ery small and easy constrain t net w orks. On suc h problems, the additional cost of pruning more v alues could not b e out w eighed b y the searc h sa vings. Ho w ev er, the harder a constrain t net w ork is, the more useful ltering tec hniques are. More recen t w orks (Bessi  ere & R  egin, 1996; Sabin & F reuder, 1994; Gran t & Smith, 1996) testing searc h algorithms at the threshold (Cheeseman, Kanefsky , & T a ylor, 1991), where most of the hard problems are exp ected to b e, sho w that using more pruningful lo cal consistencies can b e w orth while. Their conclusion is that main taining arc consistency during searc h (MA C), namely ac hieving A C b oth after the c hoice of a v alue for a v ariable and after the refutation of suc h a c hoice, outp erforms forw ard c hec king on hard problems. The go o d b eha vior of MA C is ev en more signican t on large problems, esp ecially when domains are large. It is conceiv able that on v ery dicult instances, main taining an ev en more pruningful lo cal consistency ma y pa y o. Ob viously , suc h an algorithm w ould w aste seconds on easy CNs but it w ould sa v e man y min utes (hours ?) on v ery hard problems, reducing the set of pathological CNs on whic h searc h is really prohibitiv e. In this pap er w e study the lo cal consistencies as prepro cessing ltering tec hniques. This is a preliminary w ork b efore trying to determine whic h lo cal consistency is the most adv an- tageous to b e main tained during searc h. In the last v e y ears, man y new lo cal consistencies ha v e b een prop osed. In the remaining of this pap er, w e fo cus our atten tion on those that lea v e unc hanged the structure of the net w ork since they are the only able to b e used on large CNs. In addition to an o v erview of these lo cal consistencies that only remo v e inconsisten t v alues, w e b oth compare, theoretically and exp erimen tally , their pruning eciency and the time needed to enforce them. 2. Denitions and Notations A network of binary c onstr aints P = ( X ; D ; C ) is dened b y a set X = f i; j; : : : g of n variables , eac h taking v alue in its resp ectiv e nite domain D i ; D j ; : : : elemen ts of D , and a set C of e binary constrain ts. d is the size of the largest domain. A binary c onstr aint C ij is a subset of the Cartesian pro duct D i  D j that denotes the compatible pairs of v alues for i and j . W e denote C ij ( a; b ) = tr ue to sp ecify that (( i; a ) ; ( j; b )) 2 C ij . W e then sa y that ( j; b ) is a supp ort for ( i; a ) on C ij . Chec king whether a pair of v alues is allo w ed b y a constrain t is called a c onstr aint che ck . With eac h CN w e asso ciate a c onstr aint gr aph in whic h no des represen t v ariables and arcs connect pairs of v ariables that are constrained 206 Domain Fil tering Consistencies explicitly . c is the n um b er of 3-cliques in the constrain t graph and g is the maxim um degree of a no de in the constrain t graph. The neighb orho o d of i is the set of v ariables adjacen t to i in the constrain t graph. A domain D 0 = f D 0 i ; D 0 j ; : : : g is a sub-domain of D = f D i ; D j ; : : : g if 8 i; D 0 i  D i . An instantiation I of a set of v ariables S is a set of v alue assignmen ts f I j g j 2 S , one for eac h v ariable b elonging to S , s.t. 8 j 2 S; I j 2 D j . An instan tiation I of S satises a constrain t C ij if f i; j g 6 S or C ij ( I i ; I j ) is true. An instan tiation is c onsistent if it satises all the constrain ts. A pair of v alues (( i; a ) ; ( j; b ) ) is p ath c onsistent if for all k 2 X s.t. j 6 = k 6 = i 6 = j , this pair of v alues can b e extended to a consisten t instan tiation of f i; j; k g . ( j; b ) is a p ath c onsistent supp ort for ( i; a ) if ( a; b ) 2 C ij and (( i; a ) ; ( j ; b )) is path consisten t. A solution of P = ( X ; D ; C ) is a consisten t instan tiation of X . A v alue ( i; a ) is c onsistent if there is a solution I suc h that I i = a , and a CN is c onsistent if it has at least one solution. W e denote b y P j D i = f a g the CN obtained b y restricting D i to f a g in P . If LC is a lo cal consistency , a CN P is not LC - consistent i LC do es not hold on P . A CN P is LC - inconsistent i w e cannot obtain a LC -consisten t constrain t net w ork b y deletion of some lo cal inconsistencies in P . If a lo cal consistency LC is used to detect the inconsistency of instan tiations no longer than 1, w e can sa y that a CN P = ( X ; D ; C ) is LC - inconsistent i there is no sub-domain D 0 of D suc h that LC holds on ( X ; D 0 ; C ). 3. The Lo cal Consistencies Studied Filtering tec hniques can b e used to detect the inconsistency of a CN, and under some assumptions, they can ensure a bac ktrac k-free searc h (F reuder, 1982, 1985). Ho w ev er, their usual purp ose is not to nd a solution in a constrain t net w ork. They remo v e some lo cal inconsistencies and so delete some regions of the searc h space that do not con tain an y solution. The resulting CN is equiv alen t to the initial one since the set of solutions is unc hanged, but if substan tial reductions are made the searc h b ecomes easier. In this section w e review the basis of arc consistency , k -consistency , restricted path consistency , and in v erse consistencies. F urthermore, w e extend the idea of restricted path consistency to k -restricted path consistency and Max-restricted path consistency . W e prop ose a new class of lo cal consistencies called singleton consistencies. W e also sho w a prop ert y of path in v erse consistency that can b e used to ha v e an optimal w orst case time complexit y in a path in v erse consistency algorithm (Debruyne, 2000). Arc consistency The most widely used lo cal consistency is arc consistency . It is based on the notion of supp ort. A v alue is viable as long as it has at least one compatible v alue in the domain of eac h neigh b oring v ariable. An A C algorithm has to remo v e the v alues that ha v e no supp ort on a constrain t. As in most of the ltering tec hniques, the v alue deletions ha v e to b e propagated through the net w ork since they can lead to the arc inconsistency of some v alues that w ere previously viable. k -consistency A consisten t instan tiation of length k -1 is k -consisten t (i.e., ( k -1, 1)- consisten t in the formalism of F reuder, 1985) if it can b e extended to an y additional k th v ariable. The time and space complexities of enforcing k -consistency are p olynomial with the exp onen t dep enden t on k . If k  3, the constrain ts ha v e to b e represen ted in extension to store the (k-1)-tuples deleted, and the structure of the net w ork can b e c hanged. This leads to h uge space requiremen ts and subsequen tly imp ortan t cpu time costs. In practice, 207 Debr uyne & Bessi  ere only 2-consistency , whic h is arc consistency in binary CNs, can b e used. Although path consistency (PC, namely 3-consistency) cannot b e used on large CNs, our exp erimen ts will in v olv e str ong path consistency (namely enforcing b oth arc and path consistency) b ecause PC has b een widely studied. Restricted path consistency The aim of Berlandier when he prop osed restricted path consistency (RPC, Berlandier, 1995) w as to remo v e more inconsisten t v alues than A C while a v oiding the dra wbac ks of path consistency . Ev en the most ecien t PC algorithms ha v e to try to extend all the pairs of v alues (ev en those b et w een t w o v ariables that are not neigh b ors) to an y third v ariable. The basis of RPC is to a v oid most of this prohibitiv e w ork. RPC p erforms only the most pruningful path consistency c hec ks, namely those able to directly delete a v alue. In addition to A C, an RPC algorithm c hec ks the path consistency of the pairs of v alues (( i; a ) ; ( j; b )) suc h that ( j; b ) is the only supp ort for ( i; a ) in D j . If suc h a pair is path inconsisten t, its deletion w ould lead to the arc inconsistency of ( i; a ). Th us ( i; a ) can b e remo v ed. These few additional path consistency c hec ks allo w detecting more inconsisten t v alues than A C without ha ving to delete an y pair of v alues, and so lea ving unc hanged the structure of the net w ork. k -restricted path consistency W e can extend the idea of RPC to a more pruningful lo cal consistency . If RPC holds, the v alues that ha v e only one supp ort on a constrain t are suc h that this supp ort is path consisten t. Chec king the path consistency of more supp orts can remo v e ev en more v alues without falling in to the traps of PC. k -restricted path con- sistency ( k -RPC, Debruyne & Bessi  ere, 1997a) lo oks for a path consisten t supp ort on a constrain t for the v alues that ha v e at most k supp orts on this constrain t. RPC is 1-RPC and A C corresp onds to 0-RPC. If k -RPC holds, to ac hiev e ( k +1)-RPC w e only ha v e to c hec k the v alues that ha v e exactly ( k +1) supp orts on a constrain t and to propagate their p ossible deletion. So, it is p ossible to ac hiev e A C, RPC, 2-RPC and so on, eac h time reusing previous ltering eort. This adaptiv e enforcemen t can b e stopp ed as so on as eac h v alue has at least one path consisten t supp ort on eac h constrain t, the constrain t net w ork b eing d -RPC where d is the size of the largest domain. Indeed, if after ac hieving k -RPC all the v alues ha v e at most k supp orts on eac h constrain t, k 0 -RPC holds for all k 0 > k . Max-restricted path consistency A constrain t net w ork is Max-restricted path consis- ten t (Max-RPC, Debruyne & Bessi  ere, 1997a) if all the v alues ha v e at least one path consisten t supp ort on eac h constrain t, whatev er is the n um b er of supp orts. F rom the prun- ing eciency p oin t of view, Max-RPC is an upp er b ound for k -RPC. Ac hieving Max-RPC in v olv es deleting all the k -restricted path inconsisten t v alues for all k . Ho w ev er, ac hieving Max-RPC can b e less exp ensiv e than enforcing a high lev el of k -RPC. As opp osed to Max- RPC, to ac hiev e k -RPC w e ha v e to lo ok for the v alues that ha v e at most k supp orts on a constrain t to kno w the v alues for whic h a path consisten t supp ort has to b e found. This can b e exp ensiv e if k is great, the algorithm ha ving to lo ok for k +1 supp orts for eac h v alue on eac h constrain t. Unconditionally lo oking for a path consisten t supp ort a v oids this costly extra w ork. k in v erse consistency The aim of F reuder and Elfe when they prop osed in v erse consis- tency (F reuder & Elfe, 1996) w as to ac hiev e high order lo cal consistencies with a go o d space complexit y . A k -consistency algorithm remo v es the instan tiation of length k -1 that cannot 208 Domain Fil tering Consistencies b e extended to an y k th v ariable. It requires O ( n k  1 d k  1 ) space to k eep trac k of the deleted instan tiations. Space requiremen ts are no longer a problem with k in v erse consistency ((1, k -1)-consistency), whic h remo v es the v alues that cannot b e extended to a consisten t instan- tiation including an y k -1 additional v ariables. Its linear space complexit y w ould allo w using it on large CNs. Ho w ev er, its w orst case time complexit y is p olynomial with the exp onen t dep enden t on k , whic h restricts its use to small v alues of k . P ath in v erse consistency The rst lev el of k in v erse consistency remo ving more v alues than A C is path in v erse consistency (PIC, k = 3). By denition, ( i; a ) is path in v erse consisten t if it can b e extended to all the 3-tuples of v ariables con taining i . Ho w ev er, as said in (F reuder & Elfe, 1996), not all the 3-tuples need to b e c hec k ed to enforce PIC. Only one of the tuples ( i; j; k ) and ( i; k ; j ) has to b e c hec k ed. Moreo v er, if i is link ed to neither j nor k , ( i; a ) can b e deleted b ecause of ( i; j; k ) only if all the v alues of j or k are path in v erse inconsisten t. In suc h a case, c hec king ( i; j; k ) is useless since PIC detects the inconsistency of the net w ork when pro cessing j or k . Neigh b orho o d in v erse consistency Since k in v erse consistency is p olynomial with the exp onen t dep enden t on k , c hec king the k in v erse consistency of all the v alues is prohibitiv e if k is great. Ho w ev er, if the v ariables are not uniformly constrained, it w ould b e w orth while to adapt the lev el of k in v erse consistency to the n um b er of constrain ts in v olving them, fo cusing ltering eort on the most constrained v ariables (as it is done for adaptiv e consistency Dec h ter & P earl, 1988). This is the basis of neigh b orho o d in v erse consistency (NIC, F reuder & Elfe, 1996), whic h remo v es the v alues that cannot b e extended to a consisten t instan tiation including all the neigh b oring v ariables. W e ha v e to p oin t out that the b eha vior of NIC is dep enden t on the structure of the constrain t graph. If t w o v ariables i and j are not neigh b ors, w e can add a univ ersal constrain t allo wing all the pairs of v alues ( a; b ) 2 D i  D j b et w een i and j . The resulting CN is equiv alen t to the initial one since it has the same set of solutions. Ho w ev er, as opp osed to the other lterings studied in this pap er, NIC is aected b y this c hange since it can remo v e more v alues. Ob viously , this pro cess increases time complexit y . On complete constrain t net w orks, NIC tries to extend all the v alues to a whole solution, namely deleting all the globally inconsisten t v alues (named v ariable completabilit y in F reuder, 1991). This is a far more dicult task than lo oking for one solution. T o b e cost eectiv e, NIC has to b e used only on sparse CNs, where the degree of the v ariables is small. Singleton consistencies If a v alue ( i; a ) is consisten t, the constrain t net w ork obtained b y restricting D i to the singleton f a g is consisten t. Singleton consistencies are a class of ltering tec hniques based on this remark. T o detect the inconsistency of a v alue ( i; a ), a singleton consistency ltering tec hnique c hec ks whether a giv en lo cal consistency can detect the p ossible inconsistency of P j D i = f a g . F or example, singleton arc consistency (SA C, De- bruyne & Bessi  ere, 1997b) deletes the v alues ( i; a ) suc h that P j D i = f a g has no arc consisten t sub-domain. 1 SA C has b een inspired b y the strong path consistency algorithm prop osed b y McGregor (McGregor, 1979). A SA C algorithm is obtained b y omitting the deletions 1. An y A C algorithm can b e used to kno w whether enforcing A C on P j D i = f a g leads to a domain wip e out, but a lazy approac h (suc h as LA C7 Sc hiex, R  egin, Gaspin, & V erfaillie, 1996) is sucien t. 209 Debr uyne & Bessi  ere  A binary CN is ( i; j )- c ons isten t i 8 i 2 X , D i 6 = ; and an y consisten t instan- tiation of i v ariables can b e extended to a consisten t instan tiation including an y j additional v ariables.  A v alue a 2 D i is arc consisten t i, 8 j 2 X s.t. C ij 2 C , there exists b 2 D j s.t. C ij ( a; b ). A domain D i is arc consisten t i, 8 a 2 D i ; ( i; a ) is arc consisten t. A CN is ar c c onsistent ((1, 1)-consisten t) i 8 D i 2 D , D i is a non empt y arc consisten t domain.  A pair of v alues (( i; a ) ; ( j ; b )) is p ath c onsistent i 8 k 2 X , there exists c 2 D k s.t. C ik ( a; c ) and C j k ( b; c ), otherwise it is path inconsisten t. A CN is p ath c onsistent ((2, 1)-consisten t) i no path inconsisten t pair of v alues is allo w ed.  A binary CN is str ongly p ath c onsistent i it is no de consisten t, arc consisten t and path consisten t.  A binary CN is p ath inverse c onsistent i it is (1, 2)-consisten t i.e., 8 ( i; a ) 2 D 8 j; k 2 X s.t. j 6 = i 6 = k 6 = j , 9 ( j; b ) 2 D and 9 ( k ; c ) 2 D s.t. C ij ( a; b ) ^ C ik ( a; c ) ^ C j k ( b; c )  A binary CN is neighb orho o d inverse c onsistent i 8 ( i; a ) 2 D , ( i; a ) can b e extended to a consisten t instan tiation including the neigh b orho o d of i .  A binary CN is r estricte d p ath c onsistent i 8 i 2 X , D i is a non empt y arc consisten t domain and, 8 ( i; a ) 2 D , for all j 2 X s.t. ( i; a ) has an unique supp ort b in D j , for all k 2 X link ed to b oth i and j , 9 c 2 D k s.t. C ik ( a; c ) ^ C j k ( b; c ).  A binary CN is k-r estricte d p ath c onsistent i 8 i 2 X , D i is a non empt y arc consisten t domain and, 8 ( i; a ) 2 D , for all C ij 2 C s.t. ( i; a ) has at most k supp orts in D j , 9 b 2 D j s.t. C ij ( a; b ) and 8 k 2 X link ed to b oth i and j , 9 c 2 D k s.t. C ik ( a; c ) ^ C j k ( b; c ).  A binary CN is max-r estricte d p ath c onsistent i 8 i 2 X , D i is a non empt y arc consisten t domain and, 8 ( i; a ) 2 D , for all C ij 2 C , 9 b 2 D j s.t. C ij ( a; b ) and 8 k 2 X link ed to b oth i and j , 9 c 2 D k s.t. C ik ( a; c ) ^ C j k ( b; c ).  A binary CN P is singleton ar c c onsistent i 8 i 2 X , D i 6 = ; and 8 ( i; a ) 2 D , P j D i = f a g has an arc consisten t sub-domain.  A binary CN P is singleton r estricte d p ath c onsistent i 8 i 2 X , D i 6 = ; and 8 ( i; a ) 2 D , P j D i = f a g has a restricted path consisten t sub-domain. Figure 1: The men tioned lo cal consistencies. 210 Domain Fil tering Consistencies Name of W orst case W orst case the algorithm time complexit y space complexit y A C7 (Bessi  ere, F reuder, & R  egin, 1999) O ( ed 2 ) (  ) O ( ed ) RPC2 (Debruyne & Bessi  ere, 1997a) O ( en + ed 2 + cd 2 ) (  ) O ( ed + cd ) Max RPC1 (Debruyne & Bessi  ere, 1997a) O ( en + ed 2 + cd 3 ) (  ) O ( ed + cd ) PC5 (Singh, 1995) O ( n 3 d 3 ) (  ) O ( n 3 d 2 ) PC8 (Chmeiss & J  egou, 1996) O ( n 3 d 4 ) O ( n 2 d ) 2 PIC1 (F reuder & Elfe, 1996) O ( en 2 d 4 ) O ( n ) PIC2 (Debruyne, 2000) O ( en + ed 2 + cd 3 ) (  ) O ( ed + cd ) NIC1 (F reuder & Elfe, 1996) O ( g 2 ( n + ed ) d g +1 ) O ( n ) SA C1 (Debruyne & Bessi  ere, 1997b) O ( en 2 d 4 ) O ( ed ) SRPC1 (Debruyne & Bessi  ere, 1997b) O ( en + n 2 ( e + c ) d 4 ) O ( ed + cd ) (  ) optimal w orst case time complexit y . T able 1: The most ecien t algorithms ac hieving the men tioned lo cal consistencies. 3 of pairs of v alues in that algorithm. Man y other singleton consistencies can b e considered since an y lo cal consistency can b e used to detect the p ossible inconsistency of the CNs P j D i = f a g with ( i; a ) 2 D . If a lo cal consistency can b e enforced in a p olynomial time, the corresp onding singleton consistency also has a p olynomial w orst case time complexit y . The formal denitions of the lo cal consistencies studied in this pap er are presen ted in Figure 1. T able 1 recalls the time and space complexities of the most ecien t algorithms enforcing them. The w orst case time complexit y of SA C1, SRPC1, and NIC1 ha v e not b een pro v ed to b e optimal. 4. Relations b et w een PIC, RPC and Max-RPC T o highligh t the relations b et w een PIC, RPC and Max-RPC, let us sho w a prop ert y of path in v erse consistency . As sho wn in (Debruyne, 2000), if w e assume that the constrain t net w ork is arc consisten t, enforcing PIC requires c hec king ev en less 3-tuples than those men tioned in (F reuder & Elfe, 1996). If ( i; a ) is arc consisten t, it can b e extended to an y 3-tuple ( i; j; k ) suc h that there is no constrain t b et w een j and k . Indeed, ( i; a ) has a supp ort ( j; b ) on C ij and a supp ort ( k ; c ) on C ik , and since j is not link ed to k , (( i; a ) ; ( j ; b ) ; ( k; c ) ) is consisten t. F urthermore, ( i; a ) can b e extended to ( i; j; k ) if there is no constrain t b et w een i and k (resp. b et w een i and j ). Indeed, ( i; a ) has a supp ort b in D j (resp. c in D k ) and this v alue b eing arc consisten t to o, it has a supp ort c in D k (resp. b in D j ). So, (( i; a ) ; ( j ; b ) ; ( k; c ) ) is consisten t. Consequen tly , if the constrain t net w ork is arc consisten t, the only 3-tuples that ha v e to b e c hec k ed to ac hiev e PIC corresp ond to the 3-cliques of the constrain t graph. 2. Ho w ev er a O ( n 2 d 2 ) data structure is required for the constrain t represen tation. 3. See Section 2 for a denition of n , d , e , c , and g . 211 Debr uyne & Bessi  ere j a i 0 support AC, RPC, PIC, and Max-RPC delete (i,a) a b j b i 1 support RPC, PIC, and Max-RPC delete (i,a) because its unique support is not path consistent a b k a b j i 2 supports ( i , a ) i s R P C - c o n s i s t e n t w . r . t . b u t P I C a n d M a x - R P C d e l e t e t h i s v a l u e (C) k j i 2 supports ( i , a ) i s R P C - c o n s i s t e n t w . r . t . a n d P I C - c o n s i s t e n t w . r . t . b u t M a x - R P C d e l e t e s t h i s v a l u e (D) a b k a b l a a b c a b a b a b c a b c C ij C ij C ij (A) (B) A forbidden pair of values. Figure 2: Examples sho wing the relations b et w een PIC, RPC and Max-RPC. F urthermore, the denition of PIC sho ws that an y constrain t net w ork in v olving less than three v ariables is path in v erse consisten t, ev en though it is not arc consisten t. Prop ert y 1 A CN is p ath inverse c onsistent i  it involves less than thr e e variables, or  it is ar c c onsistent and for e ach value ( i; a ) in D , for any 3-clique f i; j; k g , ( i; a ) c an b e extende d to a c onsistent instantiation of f i; j; k g . This prop ert y allo ws us to see the relations b et w een PIC, RPC and Max-RPC. If a v alue ( i; a ) has no supp ort on a constrain t C ij , the three lo cal consistencies delete this arc inconsisten t v alue (see Figure 2A). If ( i; a ) has only one supp ort b in D j , PIC, RPC, and Max-RPC delete ( i; a ) b ecause of C ij if (( i; a ) ; ( j; b )) is path inconsisten t (see Figure 2B). The dierence b et w een these three lo cal consistencies app ears if ( i; a ) has at least t w o supp orts on C ij . In suc h a case, ( i; a ) is restricted path consisten t w.r.t. C ij but PIC can delete it if there is a 3-clique f i; j; k g suc h that all the supp orts of ( i; a ) in D j are path inconsisten t b ecause of k (see Figure 2C). So, PIC is more pruningful than RPC. But it 212 Domain Fil tering Consistencies often deletes only few additional v alues b ecause the supp orts of a v alue are seldom all path inconsisten t b ecause of the same third v ariable. Max-RPC is far more pruningful since it deletes ( i; a ) b ecause of C ij if all its supp orts in D j are path inconsisten t, ev en if they are not path inconsisten t b ecause of the same third v ariable (see Figure 2D). 5. Pruning Eciency 5.1 Qualitativ e Study T o compare the pruning eciency of the lo cal consistencies presen ted ab o v e, w e use the transitiv e relation \stronger" in tro duced in (Debruyne & Bessi  ere, 1997b). A lo cal consis- tency LC is str onger than another lo cal consistency LC 0 if in an y CN in whic h LC holds, LC 0 holds to o. Consequen tly , if LC is stronger than LC 0 , an y algorithm ac hieving LC deletes at least all the v alues remo v ed b y an algorithm ac hieving LC 0 . F or instance, since b y denition of restricted path consistency RPC is stronger than A C, an RPC algorithm remo v es at least all the arc inconsisten t v alues. A lo cal consistency LC is strictly str onger than another lo cal consistency LC 0 if LC is stronger than LC 0 and there is at least one CN in whic h LC 0 holds and LC do es not. Theorem 1 R estricte d p ath c onsistency is strictly str onger than A C. Pro of By denition of restricted path consistency , RPC is stronger than arc consistency . Figure 3a sho ws that there exists a constrain t net w ork on whic h A C holds and RPC do es not. Therefore, RPC is strictly stronger than A C. 2 Theorem 2 If k > k 0  0, k -RPC is strictly str onger than k 0 -RPC. Pro of The pro of that k -RPC is stronger than k 0 -RPC if k > k 0  0 is trivial. Figure 3g sho ws that there exists a constrain t net w ork on whic h k 0 -RPC holds and k -RPC ( k > k 0  0) do es not. Therefore, k -RPC is strictly stronger than k 0 -RPC if k > k 0  0. 2 Theorem 3 Max-RPC is strictly str onger than k -RPC, 8 k  0. Pro of The pro of that Max-RPC is stronger than k -RPC 8 k  0 is trivial. Figure 3g sho ws that for an y k  0 there exists a constrain t net w ork on whic h k -RPC holds and Max-RPC do es not. Therefore, Max-RPC is strictly stronger than k -RPC 8 k  0. 2 Theorem 4 If jX j  3, p ath inverse c onsistency is strictly str onger than r estricte d p ath c onsistency. Pro of F rom prop ert y 1, PIC is stronger than A C if jX j  3. No w, consider a v alue ( i; a ) ha ving only one supp ort ( j; b ) on C ij . If PIC holds, for an y third v ariable k , ( i; a ) can b e extended to a consisten t instan tiation I including f i; j; k g and since b is the only supp ort of ( i; a ) in D j , I j = b . So (( i; a ) ; ( j ; b )) is path consisten t and ( i; a ) is restricted path consisten t w.r.t. C ij . F urthermore, Figure 3b sho ws that there exists a constrain t net w ork on whic h 213 Debr uyne & Bessi  ere RPC holds and PIC do es not. Therefore, path in v erse consistency is strictly stronger than restricted path consistency if jX j  3. 2 Theorem 5 If jX j  3, max-r estricte d p ath c onsistency is strictly str onger than p ath inverse c onsistency. Pro of Supp ose there is a max-restricted path consisten t CN P with a v alue ( i; a ) whic h is not path in v erse consisten t. Since the CN is max-restricted path consisten t, it is also arc consisten t b y denition of max-restricted path consistency . Th us, b ecause of prop ert y 1 w e kno w there exist t w o v ariables j and k suc h that f i; j; k g is a clique in the constrain t graph and ( i; a ) cannot b e extended to a consisten t instan tiation on f i; j; k g . As a result, none of the supp orts of ( i; a ) on C ij is path consisten t, whic h con tradicts the assumption that the CN P is max-restricted path consisten t. F urthermore, Figure 3i sho ws that there exists a constrain t net w ork on whic h path in v erse consistency hold and max-restricted path consistency do es not. Therefore, if jX j  3, max-RPC is strictly stronger 2 Theorem 6 Singleton ar c c onsistency is strictly str onger than Max-RPC. Pro of Supp ose that there exists a CN P with a singleton arc consisten t v alue ( i; a ) that is not max-restricted path consisten t. Let j 2 X b e a v ariable suc h that ( i; a ) has no path consisten t supp ort in D j . F or eac h supp ort b of ( i; a ) in D j , there exists a v ariable k suc h that 6 9 c 2 D k suc h that C ik ( a; c ) ^ C j k ( b; c ). Therefore, all the v alues of D j are arc inconsisten t w.r.t. P j D i = f a g and ( i; a ) is not singleton arc consisten t. So, SA C is stronger than Max-RPC. Figure 3e sho ws that there exists a constrain t net w ork on whic h Max-RPC holds and SA C do es not. Therefore, SA C is strictly stronger than Max-RPC. 2 Theorem 7 Neighb orho o d inverse c onsistency is strictly str onger than max-r estricte d p ath c onsistency. Pro of Let ( i; a ) b e an y v alue of a neigh b orho o d in v erse consisten t CN P . There exists a consisten t instan tiation I including i and its neigh b orho o d s.t. I i = a . F or an y C ij 2 C , I j is a path consisten t supp ort of ( i; a ). Indeed, let k b e an y third v ariable. If k is link ed to i , (( i; a ) ; ( j; I j ) ; ( k ; I k )) is a consisten t instan tiation since P is neigh b orho o d in v erse consisten t. Otherwise, there are t w o cases: First, if k is not link ed to j , (( i; a ) ; ( j; I j ) ; ( k ; c )) is consisten t 8 c 2 D k ; Second, if 9 C j k 2 C , there exists a consisten t instan tiation I 0 of j and its neigh- b orho o d s.t. I 0 j = I j and (( i; a ) ; ( j; I 0 j ) ; ( k ; I 0 k )) is consisten t. So, ( i; a ) is max-restricted path consisten t. F urthermore, Figure 3d sho ws that there exists a constrain t net w ork on whic h Max-RPC holds and NIC do es not. Therefore, NIC is strictly stronger than Max-RPC. 2 Theorem 8 Str ong p ath c onsistency is strictly str onger than singleton ar c c onsistency. Pro of Consider a problem that is strong path consisten t. An y pair of v alues can b e ex- tended to an y third v ariable. F urthermore, since the problem is strong path consisten t, it is also arc consisten t and a sub-problem obtained b y restricting a domain D i to a singleton 214 Domain Fil tering Consistencies f ( i; a ) g can b e made arc consisten t. The initial problem is therefore singleton arc consisten t. Figure 3c sho ws that there exists a constrain t net w ork on whic h SA C holds and strong PC do es not. Therefore, strong PC is strictly stronger than SA C. 2 Theorem 9 Singleton r estricte d p ath c onsistency is strictly str onger than singleton ar c c onsistency. Pro of Singleton restricted path consistency is stronger than singleton arc consistency since RPC is stronger than A C. Figure 3d sho ws that there exists a constrain t net w ork on whic h SA C holds and SRPC do es not. Therefore, SRPC is strictly stronger than SA C. 2 The stronger relation do es not induce a total ordering. Some lo cal consistencies are incomparable. Theorem 10 1. If jX j  3, p ath inverse c onsistency and k -r estricte d p ath c onsistency ar e inc omp ar able. 2. Neighb orho o d inverse c onsistency and singleton ar c c onsistency ar e inc omp ar able. 3. Neighb orho o d inverse c onsistency and str ong p ath c onsistency ar e inc omp ar able. 4. Neighb orho o d inverse c onsistency and singleton r estricte d p ath c onsistency ar e inc om- p ar able. Pro of 1. cf. Figure 3h and Figure 3j. 2. cf. Figure 3d and Figure 3e. 3. cf. Figure 3d and Figure 3e. 4. cf. Figure 3e and Figure 3f. Figure 4 summarizes the relations b et w een the lo cal consistencies. There is an arro w from LC to LC 0 i LC is strictly stronger than LC 0 . A crossed line b et w een t w o lo cal consistencies means that they are not comparable w.r.t. the \stronger" relation. When LC is not stronger than LC 0 ( LC 0 is strictly stronger than LC , or LC and LC 0 are not comparable), a CN in whic h LC holds and LC 0 do es not can b e found in Figure 3. Ob viously , the stronger relation is transitiv e. In Figure 4 w e omit the transitivit y arcs. 215 Debr uyne & Bessi  ere AC RPC R P C P I C S A C NIC S A C S R P C S t r o ng P C NIC S t r o ng P C S R P C NIC S t r o n g P C S R P C S R P C N I C S R P C S t r o ng P C S A C S t r o ng P C p a i r o f v a l u e s . in A B A is not stronger than B (B deletes the value on this A consistent network) forbidden ... The domain of a variable. A M a x - R P C N I C N I C S A C S A C R P C 2 - R P C 2 - R P C P I C k - R P C M a x - R P C P I C 2 - R P C P I C M a x - R P C ( c ) ( a ) (b) ( e ) ( d ) ( f ) ( g ) ( h ) (j) (i) k - R P C k ' - R P C i f k ' > k > 0 Max-RPC NIC k + 1 k + 1 k + 1 k + 1 k + 1 Figure 3: Some CNs pro ving the \not stronger" relations b et w een some of the men tioned lo cal consistencies. 216 Domain Fil tering Consistencies A B : A and B are incomparable w.r.t. the stronger relation. A B : A is strictly stronger than B. SRPC SAC Max-RPC k-RPC ( k > 1 ) RPC AC PIC NIC Strong PC Figure 4: Relations b et w een the men tioned lo cal consistencies. 5.2 Exp erimen tal Ev aluation Figure 4 do es not giv e an y quan titativ e information. A lo cal consistency LC can remo v e more v alues than another lo cal consistency LC 0 on most of the CNs ev en though it is incomparable with LC b ecause of some particular CNs. When they are comparable, it do es not sho w if a lo cal consistency is far more pruningful than another or if it p erforms only few additional v alue deletions. T o ha v e some quan titativ e information ab out the pruning eciency of these lo cal consistencies, w e p erformed an exp erimen tal ev aluation. The aim of this ev aluation is to sho w ho w pruningful a lo cal consistency is on random CNs, with a xed n um b er of v ariables and v alues, when the n um b er of constrain ts and the constrain t tigh tness 217 Debr uyne & Bessi  ere 1 .01 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 .01 .1 .2 .3 .4 .5 .6 .7 .8 .9 Tightness D e n s i t y AC RPC PIC 2-RPC Max-RPC SAC Strong PC SRPC NIC Variable completability Figure 5: The T 0 b ounds for random CNs ha ving 40 v ariables and 15 v alues in eac h domain. are c hanging. W e used the random uniform CN generator of (F rost, Bessi  ere, Dec h ter, & R  egin, 1996) whic h pro duces instances according to the Mo del B (Prosser, 1996). It in v olv es four parameters: n the n um b er of v ariables, d the common size of the initial domains, p 1 the prop ortion of constrain ts in the net w ork (the densit y p 1=1 corresp onds to the complete graph) and p 2 the prop ortion of forbidden pairs of v alues in a constrain t (the tigh tness). The generated problems ha v e 40 v ariables and 15 v alues in eac h domain. F or eac h lo cal consistency and eac h densit y p 1, t w o particular v alues of the tigh tness ha v e b een determined. On the one hand, T 0 ( p 1) is the tigh tness suc h that the lo cal consistency do es not delete an y v alue on 50% of the CNs generated with p 1 for densit y . F or v alues of tigh tness lo w er than T 0 ( p 1), the lo cal consistency seldom deletes man y v alues. On the other hand, T all ( p 1) is the tigh tness suc h that the lo cal consistency nds the inconsistency of 50% of the CNs generated with densit y p 1. On constrain t net w orks with tigh ter constrain ts, the lo cal consistency often remo v es all the v alues. F or all the men tioned lo cal consistencies, the v alues T 0 ( p 1) 218 Domain Fil tering Consistencies .01 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 .01 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 D e n s i t y Tightness AC RPC PIC 2-RPC Max-RPC SAC Strong PC SRPC NIC Variable completability Figure 6: The T all b ounds for random CNs ha ving 40 v ariables and 15 v alues in eac h domain. and T all ( p 1) for an y densit y p 1 are giv en in Figure 5 and Figure 6 resp ectiv ely . W e also sho w these b ounds for the v ariable completabilit y ltering whic h remo v es all the globally inconsisten t v alues, and th us is the strongest ltering w e can ha v e when w e limit ltering to the domains. T o determine the T 0 and T all b ounds, 300 CNs ha v e b een generated for eac h (densit y , tigh tness) pair. This explains wh y the generated problems are relativ ely small. As already pro v ed theoretically , PIC is stronger than RPC. Their pruning eciencies are closed. RPC deletes most of the path in v erse inconsisten t v alues and is halfw a y b et w een A C and Max-RPC in terms of pruning eciency . k -RPC with k > 1 is incomparable with PIC with regard to the stronger relation. Ho w ev er, Figure 5 and Figure 6 sho w that 2-RPC is more pruningful than PIC. SA C and strong PC ha v e almost the same pruning eciency . Their T 0 limits merge and their T all limits sho w a sligh t dierence. This conrms the similitude b et w een SA C and strong PC p oin ted out in Section 3. Although SRPC and strong PC are not comparable w.r.t. the stronger relation, SRPC remo v es is more pruningful than strong PC. As predicted in (v an Beek, 1994), these p olynomial lterings ha v e more 219 Debr uyne & Bessi  ere A C R P C P I C 2-RPC M a x - R P C S A C S t r o n g P C S R P C N I C V a r i a b l e c o m p l e t a b i l i t y . 0 1 . 1 . 2 . 3 . 4 . 5 . 6 . 7 . 8 . 9 1 Tightness Figure 7: The T 0 (blac k p oin ts) and T all (white p oin ts) b ounds for random CNs ha ving 40 v ariables, 15 v alues in eac h domain, and densit y 1. diculties to delete inconsisten t v alues on dense problems with lo ose constrain ts. On sparse CNs, the p olynomial lo cal consistencies studied are close to v ariable completabilit y , whereas on v ery dense CNs, Figure 5 and Figure 6 sho w a large range of tigh tnesses b et w een them and v ariable completabilit y . NIC b eha v es v ery dieren tly since on complete constrain t net w orks it corresp onds to v ariable completabilit y . So, on dense CNs, NIC is far more pruningful than the other lo cal consistencies. On CNs generated with a densit y lo w er than .28 NIC is less pruningful than SRPC, strong PC and SA C. The more imp ortan t the propagation through the net w ork is, the closer T 0 and T all are. If a ltering (suc h as A C) uses a v ery lo cal prop ert y to delete inconsisten t v alues, there is a large set of CNs on whic h it remo v es some but not all the v alues. More pruningful lo cal consistencies consider a more imp ortan t part of the net w ork to kno w whether a v alue is consisten t or not. So, they seldom delete few v alues. On most of the CNs, they do not delete an y v alue, or detect inconsistency: the propagation of the rst v alue deletions often leads to a domain wip e out. 6. Time Eciency 6.1 Radio Link F requency Assignmen t Problems An exp erimen tal ev aluation has b een done on the radio link frequency assignmen t problems describ ed in (Cab on, de Givry , Lob jois, Sc hiex, & W arners, 1999), namely the instances of the CELAR 4 named Scen01 to Scen11, and the GRAPH instances generated using the GRAPH generator at Delft Univ ersit y named Graph01 to Graph14. In these problems w e ha v e to assign frequencies to a set of radio links dened b et w een pairs of sites in order to a v oid in terferences 5 . These problems ha v e from 200 to 916 v ariables and there are 40 v alues in a v erage in eac h domain. The constrain ts are binary and ha v e a cost of violation sp ecied 4. W e thanks the Cen tre d'Electronique de l'Armemen t (F rance). 5. See h ttp://www-bia.inra.fr/T/sc hiex/Do c/CELARE.h tml for a more detailed presen tation of these problems. 220 Domain Fil tering Consistencies A C7 RPC2 PIC2 Max-RPC1 SA C1 SRPC1 NIC1 Scen02 0.27 0.7 4.38 6.33 45.5 434.93 10.45 Scen03 0.58 1.55 9.13 14.21 99.49 946.31 26.58 Scen11 0.89 2.53 13.79 25.84 144.3 1362.18 time out T able 2: Cpu time p erformances on some RLF AP instances on whic h all the lo cal consis- tencies studied hold. b y a lev el from 0 to 4. The lev el 0 corresp onds to hard constrain ts, and lev els from 1 to 4 ha v e a decreasing cost of violation. F or eac h problem ScenXX (resp. GraphXX), w e call ScenXX.3, ScenXX.2, ScenXX.1 and ScenXX.0 (resp. GraphXX.3, GraphXX.2, GraphXX.1 and GraphXX.0) the problems of satisfaction obtained b y considering the problem ScenXX (resp. GraphXX) with only the constrain ts of lev el 0 to 3, 0 to 2, 0 to 1, and 0 resp ectiv ely . In this exp erimen tal ev aluation, w e consider b oth the cpu time p erformances and the p ercen tage of v alues deleted b y the lo cal consistencies studied. The algorithms used are A C7 (Bessi  ere, F reuder, & R  egin, 1995), RPC2 (Debruyne & Bessi  ere, 1997a), PIC2 (Debruyne, 2000), Max-RPC1 (Debruyne & Bessi  ere, 1997a), the singleton arc consistency algorithm of (Debruyne & Bessi  ere, 1997b) (SA C1) based on A C6, a SRPC algorithm based on RPC2 (SRPC1), and the NIC algorithm prop osed in (F reuder & Elfe, 1996) (NIC1) using F C- CBJ (Prosser, 1993) (as in F reuder & Elfe, 1996) with dom+deg dynamic v ariable ordering heuristic (minimal domain rst, in whic h ties are brok en b y c ho osing the v ariable with the highest degree in the constrain t graph F rost & Dec h ter, 1995; Bessi  ere & R  egin, 1996). All these algorithms ha v e b een mo died to stop as so on as a domain wip e out o ccurs. W e do not sho w results on strong PC in this section b ecause on these large problems it requires often more than our 2 hours time out limit. These algorithms ha v e b een tested on eac h ScenXX, Scen XX.X, GraphXX, and GraphXX.X problem using a Sun UltraSparc I Ii 440 Mhz. F or sak e of clarit y , w e only sho w the results on some represen tativ e problems. 6.1.1 Resul ts on pr oblems on which all the studied local consistencies hold (cf. T able 2) If all the lo cal consistencies studied hold on a constrain t net w ork, all the corresp onding ltering algorithms are useless. They w aste time to c hec k whether the lo cal consistencies hold without deleting an y inconsisten t v alue. On these problems, the stronger the lo cal consistency is, the more imp ortan t is the time w asted. W e can see the consequence of the exp onen tial w orst case time complexit y of NIC1. On most of these problems, NIC1 requires a reasonable cpu time. But as w e can see on the problem Scen11, a com binatorial explosion can lead to really prohibitiv e cpu time for NIC1. 6.1.2 Resul ts on ar c inconsistent pr oblems (cf. T able 3) When arc consistency is sucien t to detect the inconsistency of the problem, stronger lo cal consistencies are not alw a ys more costly . On Figure 3 w e can see that Max-RPC1 has often the b est cpu time p erformances and on Graph06 for example, A C7 is one of the 221 Debr uyne & Bessi  ere A C7 RPC2 PIC2 Max-RPC1 SA C1 SRPC1 NIC1 Scen07 0.42 0.43 0.44 0.09 0.59 0.47 1.89 Graph07 0.11 0.14 0.12 0.16 0.24 0.14 1.08 Scen08 0.75 0.48 0.73 0.4 0.52 0.47 time out Graph06 0.48 0.27 0.44 0.26 0.27 0.27 10.13 T able 3: Cpu time p erformances on some arc inconsisten t RLF AP instances. Max- A C7 RPC2 PIC2 RPC1 SA C1 SRPC1 NIC1 Scen06.1 cpu time 0.27 0.48 0.96 2.04 66.32 227.13 time out % of D V 7.88 8.33 17.85 19.7 42.47 42.57 ? Scen09.1 cpu time 0.8 1.52 1.87 5.88 167.85 568.08 318.38 % of D V 22.48 25.79 29.79 31.03 35.86 35.86 31.57 Graph04 cpu time 0.81 2.07 18.65 25.39 2238.13 time out 101.77 % of D V 4.97 6.67 6.95 10.35 18.44 ? 13.14 Graph10 cpu time 1.43 3.32 37.7 51.42 3984.13 time out 2033.39 % of D V 1.43 1.62 1.68 5.42 9.53 ? 7.35 Graph06.1 cpu time 0.39 0.81 0.9 0.8 6.69 3.21 8.54 % of D V 14.96 17.69 100 100 100 100 100 Graph12.1 cpu time 0.73 1.35 2.83 5.41 9.47 32.12 3.97 % of D V 10.42 12.23 15.28 100 100 100 100 T able 4: Cpu time p erformances and p ercen tages of v alues deleted b y the lo cal consistencies studied (% of D V) on some RLF AP instances. most exp ensiv e lo cal consistencies. When enforcing A C requires propagation to nd the arc inconsistency of the problem, a stronger lo cal consistency can wip e out a domain more quic kly than A C7. On these constrain t net w orks, all the algorithms used ha v e v ery lo w cpu time require- men ts, except NIC1, whic h can b e v ery exp ensiv e on some instances, suc h as Scen08. 6.1.3 Resul ts on the other pr oblems (cf. T able 4) On man y of the RLF AP problems the lo cal consistencies do not delete the same sets of inconsisten t v alues. W e can see an imp ortan t dierence b et w een the pruning eciencies esp ecially on the problems ScenXX.1 and GraphXX.1. Ob viously , on most of these problems, the more pruningful the lo cal consistency is, the more imp ortan t is the time required. W e can see this on the problems Scen06.1 and Scen09.1 for example. Ho w ev er, A C7, RPC2, PIC2, and Max-RPC1 ha v e cpu time p erformances in the same order of magnitude while SA C1, SRPC1, and NIC1 are often far more exp ensiv e. 222 Domain Fil tering Consistencies This is esp ecially ob vious on Graph04 and Graph10. Ho w ev er, it is dicult to sa y whic h is the most in teresting lo cal consistency on these problems since ev en if SA C1, and SRPC1 are costly , w e can see on Scen06.1 and Graph04 that they can b e far more pruningful. These problems highligh t that NIC1 is not v ery stable. It sometimes sho ws go o d p er- formances, but an exp onen tial explosion can lead to a prohibitiv e cost on some instances. When NIC1 requires a reasonable time, its pruning eciency is closer to the one of Max- RPC1 than to the one of SA C1. These results conrm that if the neigh b orho o ds of the v ariables are not small, NIC1 can b e really prohibitiv e. On Graph06.1, PIC2 (and ob viously the algorithms enforcing a stronger lo cal consis- tency) nds the inconsistency of the problem whereas A C7, and RPC2 remo v e only a part of the inconsisten t v alues. W e can see a similar b eha vior on Graph12.1 where Max-RPC1 wip es out a domain whereas A C7, RPC2 and PIC2 do not nd the inconsistency of the problem. On these instances, Max-RPC1 is the b est c hoice. 6.2 Randomly Generated Problems The random uniform CN generator of section 5.2 is used to compare the cpu time required to enforce the lo cal consistencies. W e ha v e to p oin t out that NIC has not b een designed to b e used on uniform CNs but to adapt ltering eort to the degree of the v ariables in the constrain t graph. So, NIC w ould ha v e b etter p erformances on non-uniform CNs than those presen ted in this section. The generated problems ha v e 200 v ariables and 30 v alues in eac h initial domain. Figure 8 sho ws the results on CNs with densit y of .02. These CNs are relativ ely sparse since the v ariables ha v e four neigh b ors on a v erage. Figure 9 presen ts p erformances at densit y .15 (the v ariables ha v e 30 neigh b ors on a v erage). Because of the set of parameters, there are no a w ed v ariables (MacIn t yre, Prosser, Smith, & W alsh, 1998) in the generated problems. 6 In addition to the algorithms of the previous section, w e use a strong path consistency algorithm based on PC8 (Chmeiss & J  egou, 1996) and A C6. This algorithm stops as so on as a domain wip e out o ccurs or as so on as a constrain t no longer allo ws an y pair of v alues. In addition to the p ercen tage of deleted v alues and cpu time p erformances, Figure 8 and Figure 9 sho w the cpu time to n um b er of deleted v alues ratio for eac h tigh tness where the lo cal consistency remo v es at least one v alue on a v erage. F or eac h tigh tness, 50 instances w ere generated. Figure 8 and Figure 9 sho w mean v alues obtained on a P en tium I I-266 Mhz with 32 Mb of memory under Lin ux. As observ ed in (Gen t, MacIn t yre, Prosser, Sha w, & W alsh, 1997) for arc consistency , the ltering algorithms tested ha v e a complexit y p eak. F or lo w v alues of the tigh tness, they easily pro v e that the v alues are lo cally consisten t, and when constrain ts are v ery tigh t, they quic kly wip e out a domain. Eac h lo cal consistency has a phase transition where most of the hardest problems for an algorithm ac hieving this lo cal consistency tend to o ccur. 6.3 Exp erimen ts on Sparse CNs Ev en on sparse CNs (see Figure 8), the cpu time results are so dieren t b et w een the al- gorithms (7h 48min for strong PC at its p eak when A C7 requires at most .22 seconds on a v erage) that a logarithmic scale has to b e used. Strong PC is really prohibitiv e, ev en for 6. In Section 5.2,the tigh tness reac hing 1, there w as ob viously a w ed v ariables for some sets of parameters. 223 Debr uyne & Bessi  ere lo w v alues of tigh tness. SRPC and SA C ha v e bad cpu time to n um b er of deleted v alues ratios, except SA C on CNs ha ving v ery tigh t constrain ts b ecause the SA C algorithm used is based on A C6 whic h can b e more ecien t than A C7 on suc h problems. On these sparse CNs, NIC has often b etter cpu time p erformances than SA C but it do es not remo v e more v alues than Max-RPC. Consequen tly , NIC has a bad cpu time to n um b er of deleted v alues ratio. Unlik e strong PC, SRPC, SA C, and NIC, the cpu time requiremen ts of A C7, PIC2, RPC2 and Max-RPC are of the same order of magnitude. The cpu time to n um b er of deleted v alues ratios of these four last lterings are also v ery close, with a little adv an tage for PIC2. Although PIC is stronger than RPC, PIC2 can b e less exp ensiv e than RPC2 on sparse CNs. If there are few 3-cliques in the constrain t graph, PIC2 do es not require far more cpu time than A C7 whereas RPC2 is ab out t w o times as exp ensiv e as A C7 since it lo oks for t w o supp orts for eac h v alue on eac h constrain t. 6.4 Exp erimen ts on more Dense CNs On more dense CNs (see Figure 9), the complexit y p eaks of A C7, RPC2, PIC2, and Max- RPC sta y close to eac h other. PIC2 is less w orth while since it deletes few additional v alues compared to RPC2 while its cpu time requiremen ts are close to those of Max-RPC. Max- RPC has one of the b est cpu time to n um b er of deleted v alues ratios. As so on as RPC leads to a domain wip e out, the cpu time p erformances of SRPC and RPC2 merge. Indeed, the SRPC algorithm used enforces RPC2 b efore c hec king the restricted path consistency of the sub-problems P j D i = f a g for eac h ( i; a ) 2 D . If all the v alues of a domain are restricted path inconsisten t, the RPC prepro cessing nds the global inconsistency of the problem and the SRPC algorithm stops. SRPC is less exp ensiv e than strong PC although it is more pruningful. These t w o lterings remain the most exp ensiv e. NIC is the most pruningful lo cal consistency on these CNs. Hence, on a large range of tigh tnesses, NIC has the b est cpu time to n um b er of deleted v alues ratio. Ho w ev er, on some instances, NIC cannot a v oid the com binatorial explosion. Although NIC requires \only" fteen min utes on a v erage at tigh tness .52, more than t w o hours are required on some instances. It is conceiv able that instances on whic h NIC requires far more cpu time exist for this set of parameters. Ob viously , the set of CNs on whic h NIC is prohibitiv e gro ws when the densit y increases. The results on SA C ha v e a lo w er standard deviation. SA C nev er requires more than ft y t w o min utes on the problems generated for these exp erimen ts. 6.5 Discussion What can w e conclude from these results? Strong PC is b y far the least in teresting ltering tec hnique. Compared to SA C, whic h remo v es most of the strong path inconsisten t v alues, strong PC is really prohibitiv e. 7 Ac hieving SA C or SRPC is costly as long as these t w o lo cal consistencies do not delete an y v alue. Ob viously , although SA C and SRPC are more exp ensiv e than Max-RPC on almost all the generated problems, w e cannot sa y that it is b etter to use Max-RPC. Indeed, at densit y .15 for example, Max-RPC is useless for 7. W e can p oin t out that when the path consistency of a constrain t can b e expressed without explicitl y storing the set of forbidden tuples, path consistency can b e used (e.g., temp oral net w orks Allen, 1983, constrain t net w orks Smith, 1992). 224 Domain Fil tering Consistencies 1 E - 3 1 E - 2 1 E - 1 1 E + 0 1 E + 1 1 E + 2 1 E + 3 1 E + 5 1 E - 7 1 E - 6 1 E - 5 1 E - 4 1 E - 3 1 E - 2 1 E - 1 1 E + 0 1 E + 1 1 E + 2 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 9 9 c p u t i m e ( i n s e c . ) T i g h t n e s s 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 9 9 T i g h t n e s s 0 1 0 0 P e r c e n t a g e o f v a l u e s d e l e t e d 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 9 9 T i g h t n e s s c p u t i m e t o n u m b e r o f d e l e t e d v a l u e s r a t i o 7 5 8 0 8 5 9 0 9 5 1 E - 5 1 E - 4 1 E - 3 1 E - 2 1 E - 1 A C 7 R P C 2 P I C 2 M a x - R P C S A C S R P C S t r o n g P C N I C A C 7 R P C 2 P I C 2 M a x - R P C S A C N I C n = 20 0 , d = 3 0 , a n d p 1 = . 02 1 E + 4 S t r o n g P C S R P C 7 h 4 8 m i n 1 6 m i n 1 5 s e c 2 m i n 3 6 s e c 9 . 3 3 s e c 0 . 3 6 s e c 0 . 2 2 s e c A C 7 R P C 2 P I C 2 M a x - R P C S t r o n g P C S A C S R P C N I C 0 . 2 4 s e c 0 . 3 7 s e c Figure 8: Exp erimen tal ev aluation on random CNs with n =200, d =30, and p 1=.02. 225 Debr uyne & Bessi  ere 1 2 h 4 0 m i n 1 E - 3 1 E - 2 1 E - 1 1 E + 0 1 E + 1 1 E + 2 1 E + 3 1 E + 5 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 0 1 0 0 1 E + 2 9 9 c p u t i m e ( i n s e c . ) P e r c e n t a g e o f v a l u e s d e l e t e d T i g h t n e s s 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 9 9 T i g h t n e s s T i g h t n e s s c p u t i m e t o n u m b e r o f d e l e t e d v a l u e s r a t i o 1 E - 7 1 E - 6 1 E - 5 1 E - 4 1 E - 3 1 E - 2 1 E - 1 1 E + 0 1 E + 1 1 5 1 0 1 5 2 0 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0 8 5 9 0 9 5 9 9 6 5 7 0 7 5 8 0 8 5 9 0 N I C M a x - R P C P I C 2 S A C S R P C R P C 2 S t r o n g P C A C 7 1 E - 2 1 E - 3 1 E - 5 1 E - 6 1 E - 4 N I C M a x - R P C P I C 2 R P C 2 A C 7 S A C S R P C n = 20 0 , d = 3 0 , a n d p 1 = . 1 5 1 E + 4 S t r o n g P C 3 h 5 3 m i n 3 9 m i n 4 3 s e c 1 5 m i n 2 1 s e c 8 . 6 3 s e c 6 . 2 5 s e c 2 . 4 4 s e c 1 . 1 1 s e c A C 7 R P C 2 P I C 2 M a x - R P C S t r o n g P C S A C S R P C N I C Figure 9: Exp erimen tal ev aluation on random CNs with n =200, d =30, and p 1=.15. 226 Domain Fil tering Consistencies tigh tnesses lo w er than .63 since it do es not delete an y v alue, while for SRPC the limit is .57 of tigh tness. F urthermore, for singleton consistencies w e can argue that the algorithm used to ac hiev e them is not optimal. An algorithm reusing part of the ltering p erformed on P j D i = f a g to pro cess other sub-problems P j D j = f b g , (( i; a ) and ( j; b ) b elonging to D ) w ould impro v e cpu time p erformances. Ho w ev er, the cpu time to n um b er of deleted v alues ratios of SA C and SRPC algorithms are often among the w orst ones, esp ecially on sparse CNs. SA C and SRPC are so exp ensiv e that it is hardly lik ely that enhancemen ts of these algorithms could lead them to b e the most w orth while lterings. On sparse uniform CNs, NIC is not the b est c hoice. Compared to Max-RPC, it do es not delete enough v alues to oset the additional cpu time cost. F urthermore, NIC cannot b e used on dense CNs since its cpu time requiremen ts b ecome greater than those of a searc h algorithm. So, NIC has to b e used only on \relativ ely" dense CNs, as those of Figure 9 on whic h NIC is w orth while on a v erage (although on some instances a com binatorial explosion cannot b e a v oided). On v ery dense CNs, the w orst case time complexit y of Max-RPC and PIC2 is close to the one of the b est path consistency algorithm ( O ( en + ed 2 + cd 3 ) against O ( n 3 d 3 )). Ho w ev er, the exp erimen ts underline that ac hieving Max-RPC and PIC2 is far less exp ensiv e in practice. Compared to RPC2 and Max-RPC, PIC2 is not a go o d solution in-b et w een. The cpu time to n um b er of deleted v alues ratios of RPC2 and Max-RPC are b etter than the one of PIC2 (except on v ery sparse CNs on whic h PIC2 can b e less exp ensiv e than RPC2). Indeed, PIC2 deletes only few additional v alues compared to RPC2, while its cpu time p erformances are close to those of Max-RPC. Cpu time p erformances are ev en more essen tial when the aim is to main tain a lo cal con- sistency during searc h. Main taining a lo cal consistency during searc h requires to rep eatedly propagate the c hoice of a v alue for a v ariable (namely the restriction of a domain to a singleton) or the refutation of a v alue. T o b e w orth while, a lo cal consistency has to require less time to detect that a branc h of the searc h tree do es not lead to a solution than a searc h algorithm to explore this branc h. So, main taining a lo cal consistency during searc h can outp erform MA C on hard problems only if this lo cal consistency is more pruningful than A C while requiring only a little additional cpu time. With regard to this criterion, w e can discard strong PC, SA C, SRPC, and NIC on dense CNs b ecause they are to o exp ensiv e. It is conceiv able that w e can nd instances on whic h main taining these consistencies during searc h outp erforms MA C, but the more exp ensiv e the main tained lo cal consistency is, the more seldom the problems on whic h MA C is outp erformed will b e. On sparse CNs, NIC is not prohibitiv e, but it deletes only few additional v alues compared to Max-RPC and it has therefore a bad cpu time to n um b er of deleted v alues ratio. Finally , The most promising lo cal consistencies are RPC and Max-RPC. If w e exclude arc consistency , RPC is the least exp ensiv e lo cal consistency w e studied. F urthermore, the RPC algorithms delete most of the path in v erse inconsisten t v alues. Although Max-RPC is far more pruningful than arc consistency , exp erimen ts sho w that in practice, Max-RPC has v ery go o d cpu time results. Therefore, it seems v ery lik ely that main taining RPC or Max-RPC during searc h could outp erform MA C on v ery hard problems. T o conrm these results, an algorithm called Quic k that main tains an adaptation of Max-RPC has b een compared to MA C. The results of these exp erimen ts (Debruyne, 1999) sho w that Quic k has b etter cpu time p erformances than MA C on large and hard randomly generated CNs that are relativ ely sparse. More in terestingly , Quic k has a more imp or- 227 Debr uyne & Bessi  ere tan t stabilit y than MA C (the cpu time p erformances of Quic k ha v e a v ery lo w standard deviation). It w ould b e v ery in teresting to prop ose ecien t algorithms that main tain the lo cal consistencies studied in this pap er and to compare these algorithms. Suc h a study w ould allo w us to kno w whether during searc h, the more adv an tageous lo cal consistencies remain RPC and Max-RPC as during a prepro cessing step. First results on the eect of main taining SA C during searc h are giv en in (Prosser, Stergiou, & W alsh, 2000). 7. Conclusion In this pap er w e extended the idea of restricted path consistency to k -RPC and Max- RPC, whic h are more pruningful lo cal consistencies. W e prop osed a new class of lo cal consistencies called singleton consistencies. W e studied these new lo cal consistencies and the other lo cal consistencies that alik e can b e used on large CNs while remo ving more v alues than arc consistency . W e sho w ed some relations b et w een them and w e compared b oth theoretically and exp erimen tally their pruning and time eciencies. The most pruningful are neigh b orho o d in v erse consistency and singleton restricted path consistency . Ho w ev er, SRPC is exp ensiv e in time and the exp onen tial w orst case time complexit y of NIC mak es it un usable on dense CNs. If w e are lo oking for a lo cal consistency that w ould adv an tageously b e main tained during searc h, RPC and Max RPC seem to b e the most promising lo cal consistencies. Indeed, they are relativ ely inexp ensiv e and far more pruningful than arc consistency . 8. Ac kno wledgemen ts W e w ould lik e to thank T ob y W alsh for his suggestions for impro ving the presen tation of the gures in Section 5. References Allen, J. (1983). Main taining Kno wledge ab out Temp oral In terv als. Communic ations of the A CM , 26(11) , 832{843. Bacc h us, F., & v an Run, P . (1995). Dynamic v ariable ordering in csps. In Pr o c e e dings of CP-95, Cassis, F r anc e , pp. 258{275. Berlandier, P . (1995). Impro ving domain ltering using restricted path consistency . In Pr o c e e dings of IEEE CAIA-95 . Bessi  ere, C., F reuder, E., & R  egin, J. (1995). Using inference to reduce arc-consistency computation. In Pr o c e e dings of IJCAI-95, Montr  e al, Canada , pp. 592{598. Bessi  ere, C., F reuder, E., & R  egin, J. (1999). Using constrain t metakno wledge to reduce arc consistency computation. A rticial Intel ligenc e , 107(1) , 125{148. Bessi  ere, C., & R  egin, J. (1996). MA C and com bined heuristics: Tw o reasons to forsak e F C (and CBJ?) on hard problems. In Pr o c e e dings of CP-96, Cambridge MA , pp. 61{75. 228 Domain Fil tering Consistencies Cab on, C., de Givry , S., Lob jois, L., Sc hiex, T., & W arners, J. (1999). Radio link frequency assignmen t b enc hmarks. CONSTRAINTS , 4(1) , 79{89. Cheeseman, P ., Kanefsky , B., & T a ylor, W. (1991). Where the really hard problems are. In Pr o c e e dings of IJCAI-91, Sydney, A ustr alia , pp. 294{299. Chmeiss, A., & J  egou, P . (1996). Tw o new constrain t propagation algorithms requiring small space complexit y . In Pr o c e e dings of IEEE ICT AI-96, T oulouse, F r anc e , pp. 286{289. Debruyne, R. (1999). A strong lo cal consistency for constrain t satisfaction. In Pr o c e e dings of IEEE ICT AI-99, Chic ago IL , pp. 202{209. Debruyne, R. (2000). A prop ert y of path in v erse consistency leading to an optimal algo- rithm. In Pr o c e e dings of ECAI-00, Berlin, Germany , pp. 88{92. Debruyne, R., & Bessi  ere, C. (1997a). F rom restricted path consistency to max-restricted path consistency . In Pr o c e e dings of CP-97, Linz, A ustria , pp. 312{326. Debruyne, R., & Bessi  ere, C. (1997b). Some practicable ltering tec hniques for the con- strain t satisfaction problem. In Pr o c e e dings of IJCAI-97, Nagoya, Jap an , pp. 412{417. Dec h ter, R., & Meiri, I. (1994). Exp erimen tal ev aluation of prepro cessing algorithms for constrain t satisfaction problems. A rticial Intel ligenc e , 68 , 211{241. Dec h ter, R., & P earl, J. (1988). Net w ork-based heuristics for constrain t-satisfaction prob- lems. A rticial Intel ligenc e , 34 , 1{38. F reuder, E. (1982). A sucien t condition for bac ktrac k-free searc h. Journal of the A CM , 29(1) , 24{32. F reuder, E. (1985). A sucien t condition for bac ktrac k-b ounded searc h. Journal of the A CM , 32(4) , 755{761. F reuder, E. (1991). Completable represen tations of constrain t satisfaction problems. In Pr o c e e dings of KR-91, Cambridge MA , pp. 186{195. F reuder, E., & Elfe, C. (1996). Neigh b orho o d in v erse consistency prepro cessing. In Pr o- c e e dings of AAAI-96, Portland OR , pp. 202{208. F rost, D., Bessi  ere, C., Dec h ter, R., & R  egin, J. (1996). Random uniform csp generators. In http://www.ics.uci.e du/~ fr ost/csp/gener atotr.html . F rost, D., & Dec h ter, R. (1995). Lo ok-ahead v alue ordering for constrain t satisfaction problems. In Pr o c e e dings of IJCAI-95, Montr  e al, Canada , pp. 572{578. Gasc hnig, J. (1974). A constrain t satisfaction metho d for inference making. In Pr o c e e dings of the 12th A nnual A l lerton Conf. Cir cuit System The ory, U.I.L., Urb ana-Champ aign IL , pp. 866{874. 229 Debr uyne & Bessi  ere Gen t, I., MacIn t yre, E., Prosser, P ., Sha w, P ., & W alsh, T. (1997). The constrainedness of arc consistency . In Pr o c e e dings of CP-97, Linz, A ustria , pp. 327{340. Golom b, S., & Baumert, I. (1965). Bac ktrac k programming. Journal of the A CM , 12(4) , 516{524. Gran t, S., & Smith, B. (1996). The phase transition b eha viour of main taining arc consis- tency . In Pr o c e e dings of ECAI-96, Budap est, Hungary , pp. 175{179. Haralic k, R., & Elliott, G. (1980). Increasing tree searc h eciency for constrain t satisfaction problems. A rticial Intel ligenc e , 14 , 263{313. Kumar, V. (1992). Algorithms for constrain t satisfaction problems: A surv ey . AI Magazine , 13(1) , 32{44. MacIn t yre, E., Prosser, P ., Smith, B., & W alsh, T. (1998). Random constrain t satisfaction: theory meets practice. In Pr o c e e dings of CP-98, Pisa, Italy , V ol. 19, pp. 325{339. McGregor, J. (1979). Relational consistency algorithms and their application in nding subgraph and graph isomorphisms. Information Scienc es , 19 , 229{250. Meseguer, P . (1989). Constrain t satisfaction problems: An o v erview. AICOM , 2 , 3{17. Nadel, B. (1988). T ree searc h and arc consistency in constrain t satisfaction algorithms. in L. Kanal and V. Kumar, e ditors, Se ar ch in A rticial Intel ligenc e, Springer-V erlag , 287{342. Prosser, P . (1993). Hybrid algorithms for the constrain t satisfaction problem. Computational Intel ligenc e , 9(3) , 268{299. Prosser, P . (1996). An empirical study of phase transition in binary constrain t satisfaction problems. A rticial Intel ligenc e , 81 , 81{109. Prosser, P ., Stergiou, K., & W alsh, T. (2000). Singleton consistencies. In Pr o c e e dings of CP-00, Singap or e , pp. 353{368. Sabin, D., & F reuder, E. (1994). Con tradicting con v en tional wisdom in constrain t satisfac- tion. In Pr o c e e dings of ECAI-94, A mster dam, Netherlands . Sc hiex, T., R  egin, J., Gaspin, C., & V erfaillie, G. (1996). Lazy arc consistency . In Pr o c e e d- ings of AAAI-96, Portland OR , pp. 216{221. Singh, M. (1995). P ath consistency revisited. In Pr o c e e dings of IEEE ICT AI-95, Washington D.C. Smith, B. (1992). Ho w to Solv e the Zebra Problem, or Path Consistency the Easy Wa y . In Pr o c e e dings of ECAI-92 , pp. 36{37. Tsang, E. (1993). F oundations of Constr aint Satisfaction . London, Academic Press. v an Beek, P . (1994). On the inheren t lev el of lo cal consistency in constrain t net w orks. In Pr o c e e dings of AAAI-94, Se attle W A , pp. 368{373. 230

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment