1
$\begingroup$

We all know the standard base-$2$ representation of integers and many of you will know of Gray codes. Does anybody know of a name (or something I can use to find a good reference) for a method of sequencing a binary representation so that numbers higher in the sequence have more bits set? For example,

$$000, 001, 010, 100, 011, 101, 110, 111.$$

We set $i$ bits until all $n \choose i$ combinations are used, then increment $i$. Does this sequence have a name?

$\endgroup$
2
$\begingroup$

This would be ordering binary words by bit count (sideways sum, Hamming weight) and lexicographically within one class. Don't know of any more standard name for this ordering.

There is actually a fairly fast algorithm to find the lexicographically next word with the same bit count if it exists. It is a nice exercice to describe it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.