Several researchers have investigated algorithms for constructing the Dedekind–MacNeille completion of a finite partially ordered set. The Dedekind–MacNeille completion may be exponentially larger than the partial order it comes from, and the time bounds for such algorithms are generally stated in an
output-sensitive way, depending both on the number of elements of the input partial order, and on the number of elements of its completion.
Constructing the set of cuts describe an incremental algorithm, in which the input partial order is built up by adding one element at a time; at each step, the completion of the smaller partial order is expanded to form the completion of the larger partial order. In their method, the completion is represented by an explicit list of cuts. Each cut of the augmented partial order, except for the one whose two sets intersect in the new element, is either a cut from the previous partial order or is formed by adding the new element to one or the other side of a cut from the previous partial order, so their algorithm need only test pairs of sets of this form to determine which ones are cuts. The time for using their method to add a single element to the completion of a partial order is where is the width of the partial order, that is, the size of its largest
antichain. Therefore, the time to compute the completion of a given partial order is . As observe, the problem of listing all cuts in a partially ordered set can be formulated as a special case of a simpler problem, of listing all maximal
antichains in a different partially ordered set. If is any partially ordered set, let be a partial order whose elements contain two copies of : for each element of , contains two elements and , with if and only if and . Then the cuts in correspond one-for-one with the maximal antichains in : the elements in the lower set of a cut correspond to the elements with subscript 0 in an antichain, and the elements in the upper set of a cut correspond to the elements with subscript 1 in an antichain. Jourdan et al. describe an algorithm for finding maximal antichains that, when applied to the problem of listing all cuts in , takes time , an improvement on the algorithm of when the width is small. Alternatively, a maximal antichain in is the same as a
maximal independent set in the
comparability graph of , or a
maximal clique in the complement of the comparability graph, so algorithms for the
clique problem or the independent set problem can also be applied to this version of the Dedekind–MacNeille completion problem.
Constructing the covering graph The
transitive reduction or covering graph of the Dedekind–MacNeille completion describes the order relation between its elements in a concise way: each
neighbor of a cut must remove an element of the original partial order from either the upper or lower set of the cut, so each vertex has at most neighbors. Thus, the covering graph has vertices and at most neighbors, a number that may be much smaller than the entries in a matrix that specifies all pairwise comparisons between elements. show how to compute this covering graph efficiently; more generally, if is any family of sets, they show how to compute the covering graph of the lattice of unions of subsets of . In the case of the Dedekind–MacNeille lattice, may be taken as the family of
complement sets of principal ideals, and the unions of subsets of are complements of the lower sets of cuts. The main idea for their algorithm is to generate unions of subsets of incrementally (for each set in , forming its union with all previously generated unions), represent the resulting family of sets in a
trie, and use the trie representation to test certain candidate pairs of sets for adjacency in the covering relation; it takes time . In later work, the same authors showed that the algorithm could be made fully incremental (capable of adding elements to the partial order one at a time) with the same total time bound. ==Notes==