0

There is a set of numbers in binary representation, like 01001000010001 10001000010001 ....

All of them have N nonzero digits and are in increasing order.

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.

flag
Please give some motivation why you want to do this. Stated in this way it sounds too much like homework. – Konrad Swanepoel Jan 6 2011 at 18:40

closed as off topic by Andres Caicedo, Bill Johnson, Will Jagy, darij grinberg, Ben Webster Jan 6 2011 at 19:30

Browse other questions tagged or ask your own question.