Professional Documents
Culture Documents
Step 1 is the initialization stage. Initially, all the entries of M are set to 0 (meaning
that no 2-compound label has been rejected). All support lists S<i,a><j,b> are initial-
ized to empty lists. Then, in step 2, the procedure goes through each 2-compound
label which has been marked as illegal (2-compound labels where marker M has
been set to 1). PC-4-Update is called twice, which adds <j,c> to every support list
S<i,b><k,d> if <k,d> is compatible with both <i,b> and <j,c>. Similarly, <i,b> is
added to every support list S<j,c><k,d> if <k,d> is compatible with both <i,b> and
<j,c>. For each such <k,d>, the Counters indexed by both [(i,b,j,c),k] and [(j,c,i,b),k]
are increased by 1. If no such <k,d> exists, the 2-compound label (<i,b><j,c>) is
deleted from Ci,j. LIST is initialized to all the 2-compound labels which have been
deleted.
The time complexity of step 1 is O(n3a3), where n is the number of variables, and a
is the largest domain size for the variables. This is because there are n3 combina-
tions of variables i, j and k, and a3 combinations of values b, c and d.
Since there are O(n3a2) counters, with each of which having a maximum of a val-
ues, the maximum number of times that the counters can be reduced is O(n3a3).
This would be the worst case time complexity of step 2. There is another way to
look at the time complexity of step 2. Since there are n2a2 2-compound labels that
one can delete, the WHILE loop in step 2 can only iterate O(n2a2) times. The
number of iterations in each of the FOR loops inside the WHILE loop are bounded
by the sizes of S<k,d><l,e> and S<l,e><k,d> (which are the same), which are bounded
by na. So the worst case time complexity of step 2 is O(n3a3). Combining the
results of the time complexity of step 1 discussed above and step 2 here, the worst
case time complexity of the whole algorithm is O(n3a3).