English

Subset-lex: did we miss an order?

Combinatorics 2024-01-03 v4 Data Structures and Algorithms

Abstract

We generalize a well-known algorithm for the generation of all subsets of a set in lexicographic order with respect to the sets as lists of elements (subset-lex order). We obtain algorithms for various combinatorial objects such as the subsets of a multiset, compositions and partitions represented as lists of parts, and for certain restricted growth strings. The algorithms are often loopless and require at most one extra variable for the computation of the next object. The performance of the algorithms is very competitive even when not loopless. A Gray code corresponding to the subset-lex order and a Gray code for compositions that was found during this work are described.

Keywords

Cite

@article{arxiv.1405.6503,
  title  = {Subset-lex: did we miss an order?},
  author = {Jörg Arndt},
  journal= {arXiv preprint arXiv:1405.6503},
  year   = {2024}
}

Comments

Appendix II about ranking and unranking methods for mixed radix words added January 2, 2024 at the very end. The text is otherwise unchanged

R2 v1 2026-06-22T04:23:10.267Z