You are on page 1of 1

4.

3 Path-consistency Achievement Algorithms 99

4.3.5 GAC4: problem reduction for general CSPs

All the PC algorithms introduced so far are used to reduce unary and binary con-
straints only. Mohr & Masini [1988] propose an algorithm called GAC4, which is a
modification of AC-4, for removing redundant compound labels from general con-
straints. The algorithm basically works as follows. When a label or 2-compound
label CL is removed, GAC4 removes from all the constraints those tuples which
have CL as their projections. For example, if (<x,a><y,b>) is removed from Cx,y,
then for all variables z and values c (<x,a><y,b><z,c>) is removed from Cx,y,z when-
ever it exists. Besides, GAC4 removes all the labels and 2-compound labels which
are not subsumed by any element of the higher order constraints in which the sub-
ject variables are involved. For example, if (<x,a><y,b><z,c>) is removed from the
constraint Cx,y,z, and there exists no value d such that (<x,d><y,b><z,c>) is in Cx,y,z,
then (<y,b><z,c>) is removed from Cb,c.2 Mohr & Masini [1988] also suggest that
GAC4 can be used to achieve PC. However, as they admit, GAC4 is unusable for
large networks because of its high complexity.

4.3.6 Achieving DPC

Directional Path-consistency (DPC, Definition 3-13) is weaker than PC, just as


DAC is weaker than AC. Achieving NC and DPC can help achieving backtrack-free
search in certain problems (Theorem 3-1). Here we shall look at a procedure, which
we shall call DPC-1, for achieving Directional Path-Consistency. The pseudo code
of DPC-1 is shown below:

PROCEDURE DPC-1(Z, D, C, <)


/* for simplicity, assuming that for all i, j, i < j ⇔ zi < zj */
BEGIN
E ← {x→y | Cx,y ∈ C ∧ x < y };
FOR k = Z to 1 by −1 DO
BEGIN
/* Step (a): remove redundant values from domains */
FOR i = 1 to k DO
IF ((zi→zk) ∈ E) THEN Ci,i ← Ci,i ∧ Ci,k * Ck,k * Ck,i;
/* Step (b): remove redundant 2-compound labels from con-
straints */
FOR i = 1 to k DO
FOR j = i to k DO

2. That strategy first appeared in Freuder [1978] in solution synthesis. Freuder’s algorithm
will be described in Chapter 9.

You might also like