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.
| Original language | English |
|---|---|
| Pages (from-to) | 945-956 |
| Number of pages | 12 |
| Journal | Journal of Functional Programming |
| Volume | 13 |
| Issue number | 5 |
| DOIs | |
| Publication status | Published - 1 Sept 2003 |
| Externally published | Yes |