sorting binary numbers - MathOverflow [closed] most recent 30 from http://mathoverflow.net 2013-05-23T09:53:52Z http://mathoverflow.net/feeds/question/51326 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/51326/sorting-binary-numbers sorting binary numbers alberto 2011-01-06T16:10:27Z 2011-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>