4.1 MUSE PC-1

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

The worst-case running time of the routine to initialize the MUSE PC-1 data structures (in Figure 32) is O tex2html_wrap_inline21979 , where n is the number of nodes in a MUSE CSP and l is the number of labels. Given that the number of (i,j) elements in E is O tex2html_wrap_inline20597 and the domain size is O(l), there are O tex2html_wrap_inline21993 entries in the Counter array for which to determine the number of supporters, requiring O(l) work; hence, initializing the Counter array requires O tex2html_wrap_inline21997 time. Additionally, there are O tex2html_wrap_inline21993 S sets to determine, each with O(l) values, so the time required to initialize them is O tex2html_wrap_inline21997 . Determining each Prev-Support[(i,j),k,a,b] and Next-Support[(i,j),k,a,b] requires O(n) time, so the time required to calculate all Prev-Support and Next-Support sets is O tex2html_wrap_inline22011 . Finally, the time needed to calculate all Local-Next-Support and Local-Prev-Support sets is O tex2html_wrap_inline21993 because there are O tex2html_wrap_inline20605 sets with up to O(n) elements per set.

The worst-case running time for the algorithm which enforces MUSE path consistency (in Figures 33 and 34) also operates in O tex2html_wrap_inline21979 time. Clearly there are O tex2html_wrap_inline21993 entries in the Counter array to keep track of in the algorithm. Each Counter[(i,j),k,a,b] can be at most l in magnitude, and it can never become negative, so the maximum running time for lines 4 and 5 in Figure 33 (given that elements, because of M, appear on the list only once) is O tex2html_wrap_inline21997 . Because there are O tex2html_wrap_inline21993 Prev-Support and Next-Support lists, each up to O(n) in size, the maximum running time required to eliminate O(n) elements from those support sets is O tex2html_wrap_inline22011 . Finally, since there are O tex2html_wrap_inline20605 Local-Next-Support and Local-Prev-Support sets from which to eliminate O(n) elements, the worst-case time to eliminate items from the local sets is O tex2html_wrap_inline21993 . Hence, the worst-case running time of the MUSE CSP path consistency algorithm is O tex2html_wrap_inline21979 .

The space complexity of MUSE CSP PC-1 is also O tex2html_wrap_inline21979 because the arrays Counter and M contain O tex2html_wrap_inline21993 elements and there are O tex2html_wrap_inline21993 S sets, each containing O(l) items; O tex2html_wrap_inline21993 Prev-Support and Next-Support sets, each containing O(n) items; and O tex2html_wrap_inline20605 Local-Next-Support and Local-Prev-Support sets, each containing O(n) items.

By comparison, the worst-case running time and space complexity for CSP path consistency, PC-4, is O tex2html_wrap_inline21997 . Note that for applications where tex2html_wrap_inline18743 is representable as planar DAG or l=n, the worst-case running times of the algorithms are the same order. If we compare MUSE CSP to the use of multiple CSPs for problems where are k alternative variables for a particular variable in a CSP, then MUSE CSP path consistency can be asymptotically more attractive, as shown in Table 2.

 

  table16898


Table 2: Comparison of the space and time complexity for MUSE path consistency on a MUSE CSP to path consistency on multiple CSPs representing a node splitting problem (e.g., lexical ambiguity in parsing).

Because the proof of correctness for MUSE PC-1 is similar to our proof for MUSE AC-1, we will only briefly outline the proof here. A binary constraint looses support in MUSE PC-1 (see lines 16 and 25 in Figure 34) only if its Local-Prev-Support set or its Local-Next-Support set becomes empty (see lines 15 and 24 in Figure 34, respectively). In either case, it is inadmissible in any MUSE path consistent instance. We prove that a constraint's local support sets become empty if and only if it cannot participate in a MUSE path consistent instance of MUSE CSP. This is proven for Local-Next-Support (Local-Prev-Support follows by symmetry). Observe that if tex2html_wrap_inline21519 , and all of the nodes which immediately follow i (and similarly j) in the DAG are incompatible with the truth of the constraint, then it cannot participate in a MUSE path consistent instance. In line 23 of Figure 34, (i,k) is removed from the Local-Next-Support[(i,j),a,b] only after [(i,j),k,a,b] has been popped off List. The removal of (i,k) from Local-Next-Support[(i,j),a,b] indicates that the segment containing i, j, and k does not support tex2html_wrap_inline18961 . It remains to be shown that [(i,j), k, a, b] is put on List only if tex2html_wrap_inline18961 must be false for every segment which contains i, j, and k. This can be proven by induction on the number of iterations of the while loop in Figure 33 (much like the proof for MUSE AC-1). We must also show that if tex2html_wrap_inline18961 = 1 after MUSE PC-1, then it is MUSE path consistent. For tex2html_wrap_inline18961 to be MUSE path consistent, there must exist at least one path from start to end which goes through nodes i and j such that all nodes n on that path contain at least one label consistent with the constraint. This proof would be similar to the second half of the proof for MUSE AC-1 correctness. From this, we may conclude that MUSE PC-1 builds the largest MUSE path consistent structure.



5. Combining CSPs into a MUSE CSP