You are on page 1of 1

PROCEDURE KS_Downward_Propagate(Xi, Vi, i, k)

/* Xi = (x1,...,xi) and Vi = (v1,...,vi), Xi and Vi together represents a


redundant compound label which has been rejected. KS_Down-
ward_Propagate examines i - 1 compound labels. Z, D, C, Coun-
ter, Set and M are treated as global variables. */
BEGIN
IF (i > 1) THEN
FOR j = 1 to i DO
BEGIN
Xi-1 ← Xi with xj removed; Vi-1 ← Vi with vj removed;
Counter[Xi-1,Vi-1,xj] ← Counter[Xi-1,Vi-1,xj] − 1;
IF (Counter[Xi-1,Vi-1,xj] = 0) AND (M[Xi-1, Vi-1] = 0) THEN
BEGIN
Set ← Set + {(Xi-1,Vi-1, i − 1)}; M[Xi-1, Vi-1] = 1;
Cx ← Cx − {(<x1,v1>...<xi-1,vi-1>)};
i−1 i−1
END
END
END /* of KS_Downward_Propagate */

The KS-1 algorithm is much simpler than it appears. The principle is that if a com-
pound label cl = (<x1,v1> ... <xi,vi>) is identified to be redundant and therefore
rejected, all compound labels in which cl is a projection will be rejected. Besides,
all projections of cl will be examined.

Similar data structures to those used in PC-4 are maintained in KS-1. Xi and Vi are
taken as i-tuples of variables and i-tuples of values respectively. Set is a set of
(Xi,Vi,i). For convenience, we can see (Xi,Vi) as the compound label of assigning the
i values in Vi to the i variables in Xi. Then Set stores the set of compound labels
which have been identified to be redundant, deleted from their corresponding con-
straints and awaiting further processing. Counters count the number of supports that
are given by each variable x to each compound label that does not include x. For
example, Counter[(x1,...,xi), (v1,...,vi), xj] records the number of supports that xj
gives to the compound label (<x1,v1>...<xi,vi>). All Counter’s are initialized to the
domain sizes of the supporting variables. The algorithm KS-1 makes
Counter[(x1,...,xi), (v1,...,vi), xj] equal to the number of vj’s such that
satisfies((<x1,v1>...<xi,vi><xj,vj>), C x …x x ) holds. The Counters are only used
1 i j
for propagating constraints to projections of the subject compound labels.

Note that in PC-4, path-consistency is achieved by restricting constraints Ci,j. When

You might also like