sorting binary numbers - MathOverflow [closed]most recent 30 from http://mathoverflow.net2013-05-23T09:53:52Zhttp://mathoverflow.net/feeds/question/51326http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/51326/sorting-binary-numberssorting binary numbersalberto2011-01-06T16:10:27Z2011-01-06T16:10:27Z
<p>There is a set of numbers in binary representation,
like
01001000010001
10001000010001
....</p>
<p>All of them have N nonzero digits and are in increasing order.</p>
<p>I generate another set, containing all the numbers obtained
from the previously defined numbers by replacing one of the
nonzero digits with 0. In this set the numbers obviously have
N-1 nonzero digits. I want to generate this new list in
increasing order with time complexity that is linear in the
number of elements of the original set.</p>