7K3RPT9C 81

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

4.

3 Path-consistency Achievement Algorithms 97

END
IF Total = 0 THEN
BEGIN
M[i,b,j,c] ← 1; M[j,c,i,b] ← 1;
Ci,j ← Ci,j − (<i,b><j,c>);
END;
ELSE BEGIN
Counter[(i,b,j,c),k] ← Total;
Counter[(j,c,i,b),k] ← Total;
END;
END
Give the variables an arbitrary order <;
LIST ← {(<i,b><j,c>) | (M[i,b,j,c] = M[j,c,i,b] = 1) ∧ (i < j)}
/* LIST = the set of 2-compound labels to be processed */

/* step 2: propagation */
WHILE LIST ≠ { } DO
BEGIN
pick and delete an element (k,d><l,e>) from LIST;
FOR each <j,c> in S<k,d><l,e> DO
PC-4-Update((<k,d><l,e>), <j,c>));
FOR each <j,c> in S<l,e><k,d> DO
PC-4-Update((<l,e><k,d>), <j,c>));
END /* of WHILE */
return(Z, D, C);
END /* of PC-4 */

PROCEDURE PC-4-Update((<i,b><j,c>), <k,d>)


/* This procedure updates Counter, S, M, LIST, which are all assumed
to be global variables, with respect to the rejection of the com-
pound label (<i,b><j,c>). It focuses on the edge Cik. */
BEGIN
Counter[(i,b,k,d), j] ← Counter[(i,b,k,d), j] − 1;
Counter[(k,d,i,b), j] ← Counter[(k,d,i,b), j] − 1;
S<i,b><j,c> ← S<i,b><j,c> − {<k,d>};
S<k,d><j,c> ← S<k,d><j,c> − {<i,b>};
IF (Counter[(i,b,k,d), j] = 0) AND (M[i,b,k,d] = 0) THEN
BEGIN
M[i,b,k,d] ← 1; M[k,d,i,b] ← 1;
LIST ← LIST + {(<i,b><k,d>)};
Ci,k ← Ci,k − {(<i,b><k,d>)};
END
END /* of PC-4-Update */

You might also like