Generating Linear Extensions Fast

  • Authors:
  • Gara Pruesse;Frank Ruskey

  • Affiliations:
  • -;-

  • Venue:
  • SIAM Journal on Computing
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

One of the most important sets associated with a poset ${\cal P}$ is its set of linear extensions, $E({\cal P})$. This paper presents an algorithm to generate all of the linear extensions of a poset in constant amortized time, that is, in time $O(e(\cP))$, where $e(\cP) = |E(\cP)|$. The fastest previously known algorithm for generating the linear extensions of a poset runs in time $O(n \! \cdot \! e(\cP))$, where $n$ is the number of elements of the poset. The algorithm 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. Furthermore, it is shown that linear extensions can be generated in constant amortized 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