GENERATING LINEAR EXTENSIONS FAST

Citation
G. Pruesse et F. Ruskey, GENERATING LINEAR EXTENSIONS FAST, SIAM journal on computing, 23(2), 1994, pp. 373-386
Citations number
26
Categorie Soggetti
Computer Sciences","Computer Science Theory & Methods",Mathematics
Journal title
ISSN journal
00975397
Volume
23
Issue
2
Year of publication
1994
Pages
373 - 386
Database
ISI
SICI code
0097-5397(1994)23:2<373:GLEF>2.0.ZU;2-H
Abstract
One of the most important sets associated with a poset P is its set of linear extensions, E(P). This paper presents an algorithm to generate all of the linear extensions of a poset in constant amortized time, t hat is, in time O(e(P)), where e(P) = \E(P)\. The fastest previously k nown algorithm for generating the linear extensions of a poset runs in time O(n.e(P)), where n is the number of elements of the poset. The a lgorithm presented here is the first constant amortized time algorithm for generating a ''naturally defined'' class of combinatorial objects for which the corresponding counting problem is #P-complete. Furtherm ore, it is shown that linear extensions can be generated in constant a mortized time where each extension differs from its predecessor by one or two adjacent transpositions. The algorithm is practical and can be modified to count linear extensions efficiently and to compute P(x < y), for all pairs x, y, in time O(n2 + e(P)).