Article contents
Producing all ideals of a forest, functionally
Published online by Cambridge University Press: 27 August 2003
Abstract
We present functional implementations of Koda and Ruskey's algorithm for generating all ideals of a forest poset as a Gray code. Using a continuation-based approach, we give an extremely concise formulation of the algorithm's core. Then, in a number of steps, we derive a first-order version whose efficiency is comparable to that of a C implementation given by Knuth.
- Type
- FUNCTIONAL PEARL
- Information
- Copyright
- 2003 Cambridge University Press
- 6
- Cited by
Discussions
No Discussions have been published for this article.