0
0
0xC0CAC01A2018-05-06 12:46:17
Algorithms
0xC0CAC01A, 2018-05-06 12:46:17

What is the name of the algorithm for iterating over binary vectors of a given length so that exactly one bit changes at each step?

What is the name of the algorithm for iterating over binary vectors of a given length so that exactly one bit changes at each step?
Let's take three-bit vectors as an example. The lexicographic order is 000, 001, but 010 is no longer good, two bits have turned over at once.
I want the sequence to be, for example, 000, 001, 011, 010, 110, 111, 101, 100.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2018-05-06
@0xC0CAC01A

Well, if you want - take it .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question