English

A Gray path on binary partitions

Combinatorics 2009-07-23 v1

Abstract

A binary partition of a positive integer nn is a partition of nn 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 nn. This is an ordering of the set of binary partitions of each nn (or of all nn) such that adjacent partitions differ by one of a small set of elementary transformations; here the allowed transformatios are replacing 2k+2k2^k+2^k by 2k+12^{k+1} 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 kk and the kkth term in the sequence. This answers a question posed by Donald Knuth in section 7.2.1 of The Art of Computer Programming.

Keywords

Cite

@article{arxiv.0907.3873,
  title  = {A Gray path on binary partitions},
  author = {Thomas Colthurst and Michael Kleber},
  journal= {arXiv preprint arXiv:0907.3873},
  year   = {2009}
}

Comments

This was released as a draft preprint sometime between April and July 2003, but the authors never revised it into a final version. Posting this to the arXiv for archival purposes

R2 v1 2026-06-21T13:27:50.621Z