A Gray path on binary partitions
Thomas Colthurst, Michael Kleber

TL;DR
This paper constructs a Gray sequence for binary partitions of integers, enabling efficient, constant-time computation of successive partitions and directly mapping sequence indices to partitions, addressing a question by Donald Knuth.
Contribution
It introduces a novel Gray sequence on binary partitions with a simple local rule for successor computation and provides a direct bijection between sequence position and partitions.
Findings
Gray sequence on binary partitions constructed
Successor can be found in constant time
Direct bijection between sequence index and partition established
Abstract
A binary partition of a positive integer is a partition of in which each part has size a power of two. In this note we first construct a Gray sequence on the set of binary partitions of . This is an ordering of the set of binary partitions of each (or of all ) such that adjacent partitions differ by one of a small set of elementary transformations; here the allowed transformatios are replacing by or vice versa (or addition of a new +1). Next we give a purely local condition for finding the successor of any partition in this sequence; the rule is so simple that successive transitions can be performed in constant time. Finally we show how to compute directly the bijection between and the th term in the sequence. This answers a question posed by Donald Knuth in section 7.2.1 of The Art of Computer Programming.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMathematics and Applications · semigroups and automata theory · Advanced Combinatorial Mathematics
