next up previous
Next: Adding order constraints Up: Extensions and Consequences Previous: An efficient implementation of

  
Adding non-strict comparisons

The algorithm solve_constraints can be modified to deal with non-strict comparisons of the form od(a,b) <<= od(c,d) by, intuitively, marking the edge ab as ``short'' on each iteration if the edge cd has been found to be short.

Specifically, in algorithm solve_constraints, we make the following changes:

The proof that the revised algorithm is correct is only a slight extension of the proof of theorem 1 and is given in the appendix.

Optimizing this algorithm for efficiency is a little involved, not only because of the new operations that must be included, but also because there are now four parameters -- n, the number of symbols; e, the number of edges mentioned; s, the number of strict comparison; and w, the number of non-strict comparisons -- and the optimal implementation varies depending on their relative sizes. In particular, either s or w, though not both, may be much smaller than n, and each of these cases requires special treatment for optimal efficiency. The best implementation we have found for the case where both s and w are O(n) has a running time of O(max (n3, nw, s)). The details of the implementation are straightforward and not of sufficient interest to be worth elaborating here.

An immediate consequence of this result is that a couple of problems of inference are easily computed:


next up previous
Next: Adding order constraints Up: Extensions and Consequences Previous: An efficient implementation of