3.2. MUSE AC-1

3.3. The Running Time and Space Complexity of MUSE AC-1

The worst-case running time of the routine to initialize the MUSE AC-1 data structures (in Figure 22) is O tex2html_wrap_inline20587 , 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), the size of the Counter and S arrays is O tex2html_wrap_inline20601 . To determine the number of supporters for a given arc-label pair requires O(l) work; hence, initializing the Counter and S arrays requires O tex2html_wrap_inline20605 time. However, there are O tex2html_wrap_inline20601 Prev-Support and Next-Support sets, where each Prev-Support[(i,j),a] and Next-Support[(i,j),a] requires O(n) time to compute, so the time to calculate all Prev-Support and Next-Support sets is O tex2html_wrap_inline20615 . Finally, the time needed to calculate all Local-Next-Support and Local-Prev-Support sets is O tex2html_wrap_inline20601 because there are O(nl) sets with up to O(n) elements per set.

The worst-case running time for the algorithm which prunes labels that are not MUSE arc consistent (in Figures 23 and 24) also operates in O tex2html_wrap_inline20587 time. Clearly the Counter array contains O tex2html_wrap_inline20601 entries (a similar argument can be made for the S array) to keep track of in the algorithm. Each Counter[(i,j),a] can be at most l in magnitude, and it can never become negative, so the maximum running time for line 4 in Figure 23 (given that elements appear on List only once because of M) is O tex2html_wrap_inline20605 . Because there are O tex2html_wrap_inline20601 Next-Support and Prev-Support lists, each up to O(n) in size, the maximum running time required for lines 3 and 9 in Figure 24 is O tex2html_wrap_inline20615 . Finally, since there are O(nl) Local-Prev-Support and Local-Next-Support sets from which to eliminate O(n) elements, the maximum running time of lines 14 and 23 in Figure 24 is O tex2html_wrap_inline20601 . Hence, the maximum running time of the MUSE CSP arc consistency algorithm is O tex2html_wrap_inline20587 .

The space complexity of MUSE CSP AC-1 is also O tex2html_wrap_inline20587 because the arrays Counter and M contain O tex2html_wrap_inline20601 elements, and there are O tex2html_wrap_inline20601 S sets, each containing O(l) items; O tex2html_wrap_inline20601 Prev-Support and Next-Support sets, each containing O(n) items; and O(nl) 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 arc consistency is O tex2html_wrap_inline20605 , assuming that there are tex2html_wrap_inline20667 constraint arcs. Note that for applications where l=n, the worst-case running times of the algorithms are the same order (this is true for parsing spoken language with a MUSE CSP). Also, if tex2html_wrap_inline18743 is representable as planar DAG (in terms of Prev-Edge and Next-Edge, not E), then the running times of the two algorithms are the same order because the average number of values in Prev-Support and Next-Support would be a constant. On the other hand, if we compare MUSE CSP to the use of multiple CSPs for problems where there are k alternative variables for a particular variable in a CSP, then MUSE CSP AC-1 is asymptotically more attractive, as shown in Table 1.

 

  table16256


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



3.4. The Correctness of MUSE AC-1