4. The MUSE CSP Path Consistency Algorithm

4.1. MUSE PC-1

MUSE path consistency is enforced by setting tex2html_wrap_inline18961 to false when it violates the conditions of Definition 9. MUSE PC-1 builds and maintains several data structures comparable to the data structures defined for MUSE AC-1, described in Figure 29, to allow it to efficiently perform this operation. Figure 32 shows the code for initializing the data structures, and Figures 33 and 34 contain the algorithm for eliminating MUSE path inconsistent binary constraints.

   figure16434
Figure 29: Data structures and notation for MUSE PC-1.

MUSE PC-1 must keep track of which labels in tex2html_wrap_inline19821 support tex2html_wrap_inline18961 . To keep track of how much path support each tex2html_wrap_inline18961 has, the number of labels in tex2html_wrap_inline19821 which satisfy tex2html_wrap_inline18967 and tex2html_wrap_inline18969 are counted using Counter[(i,j),k,a,b]. Additionally, the algorithm must keep track of the set S[(i,j),k,a,b], which contains members of the form (k,c) where tex2html_wrap_inline18967 and tex2html_wrap_inline18969 are supported by tex2html_wrap_inline18961 . If tex2html_wrap_inline18961 ever becomes false in the segment containing i, j, and k, then tex2html_wrap_inline18967 and tex2html_wrap_inline18969 will loose some of their support. MUSE PC-1 also uses the Local-Next-Support, Local-Prev-Support, Prev-Support, and Next-Support sets similar to those in MUSE AC-1.

MUSE PC-1 is able to use the properties of the DAG to identify local (and hence efficiently computable) conditions under which binary constraints fail because of lack of path support. Consider Figure 30, which shows the nodes which are adjacent to node i and j in the DAG. Because every segment in the DAG which contains node i and j is represented as a directed path in the DAG going through both node i and node j, some node must precede and follow nodes i and j for tex2html_wrap_inline18961 to hold. In order to track this dependency, two sets are maintained for each [(i,j), a, b] tuple: Local-Prev-Support[(i,j), a, b] and Local-Next-Support[(i,j), a, b]. Note that we distinguish Local-Prev-Support[(i,j), a, b] from Local-Prev-Support[(j,i), b, a] to separately keep track of those elements directly preceding i and those directly preceding j. We also distinguish Local-Next-Support[(i,j), a, b] from Local-Next-Support[(j,i), b, a]. If any of these sets become empty, then the (i,j) arc can no longer support tex2html_wrap_inline18961 . Local-Prev-Support[(i,j), a, b] is a set of ordered node pairs (i,x) such that tex2html_wrap_inline21421 Prev-Edge tex2html_wrap_inline19045 , and if tex2html_wrap_inline21425 , there is at least one label tex2html_wrap_inline21427 which is compatible with tex2html_wrap_inline18961 . Local-Next-Support[(i,j), a, b] is a set of ordered node pairs (i,x) such that tex2html_wrap_inline21435 Next-Edge tex2html_wrap_inline19045 , and if tex2html_wrap_inline21425 , there is at least one label tex2html_wrap_inline21427 which is compatible with tex2html_wrap_inline18961 . Dummy ordered pairs are also created to handle cases where a node is at the beginning or end of a network: when tex2html_wrap_inline19873 Prev-Edge tex2html_wrap_inline19045 , tex2html_wrap_inline19877 is added to Local-Prev-Support[(i,j),a,b], and when tex2html_wrap_inline19881 Next-Edge tex2html_wrap_inline19045 , tex2html_wrap_inline19885 is added to Local-Next-support[(i,j),a,b].

   figure16606
Figure 30: Local-Prev-Support and Local-Next-Support for the path consistency of an example DAG. The solid directed lines are members of G, and the solid undirected line represents the (i,j) and (j,i) members of E.

The algorithm can utilize similar conditions for nodes which may not be directly connected to i and j. Consider Figure 31. Suppose that tex2html_wrap_inline18961 is compatible with a label in tex2html_wrap_inline19821 , but is incompatible with the labels in tex2html_wrap_inline19967 and tex2html_wrap_inline19969 , then tex2html_wrap_inline18961 and tex2html_wrap_inline21483 are false for all segments containing i, j, and k because those segments would have to include either node x or y. To determine whether a constraint is admissible for a set of segments containing i, j, and k, we calculate Prev-Support[(i,j), k, a, b], Prev-Support[(j,i), k, b,a], Next-Support[(i,j), k, a, b], and Next-Support[(j,i),k,b,a] sets. Next-Support[(i,j),k,a,b] includes all (i,x) arcs which support tex2html_wrap_inline18961 given that there is a directed edge from k to x, tex2html_wrap_inline21519 , tex2html_wrap_inline21027 , and tex2html_wrap_inline21523 (Next-Support[(j,i),k,b,a] is defined similarly). Prev-Support[(i,j),k,a,b] includes all (i,x) arcs which support tex2html_wrap_inline18961 given that there is a directed edge from x to k, tex2html_wrap_inline21519 , tex2html_wrap_inline21027 , and tex2html_wrap_inline21523 (Prev-Support[(j,i),k,b,a] is defined similarly). Note that Prev-Support[(i,j),k,a,b] will contain an ordered pair (i,k) if (i,k) tex2html_wrap_inline21551 Prev-Edge tex2html_wrap_inline21553 , and (i,j) if (j,k) tex2html_wrap_inline21551 Prev-Edge tex2html_wrap_inline21553 . Next-Support[(i,j),k,a,b] will contain an ordered pair (i,k) if (k,i) tex2html_wrap_inline21551 Next-Edge tex2html_wrap_inline21553 and (i,j) if tex2html_wrap_inline20791 Next-Edge tex2html_wrap_inline21553 . These elements are included because the edge between those nodes is sufficient to allow the support. Dummy ordered pairs are also created to handle cases where a node is at the beginning or end of a network: when tex2html_wrap_inline21579 Prev-Edge tex2html_wrap_inline21553 , tex2html_wrap_inline19877 is added to Prev-Support[(i,j),k,a,b], and when tex2html_wrap_inline21587 Next-Edge tex2html_wrap_inline21553 , tex2html_wrap_inline19885 is added to Next-Support[(i,j),k,a,b].

   figure16636
Figure 31: If it is found that tex2html_wrap_inline21595 , then tex2html_wrap_inline18961 is ruled out for every segment containing i, j, and k. The solid directed lines are members of G, and the solid undirected lines represent members of E.

    figure16646
Figure 32: Initialization of the data structures for MUSE PC-1.

      figure16732
Figure 33: Eliminating inconsistent binary constraints in MUSE PC-1.

               figure16762
Figure 34: The function UPDATE-SUPPORT-SETS([(i,j),k, a, b]) for MUSE PC-1.


4.2. The Running Time, Space Complexity, and Correctness of MUSE PC-1