It's a set. You take the maximum number of all the numbers in the set. We'd like to find a permutation so that this maximum number is as small as possible.
-
-
This Tweet is unavailable.
-
-
-
-
find a bit position with a zero in one of the numbers and take it as the MSB; if they are all 1's chose any. Repeat for the remaining bits, working your way to the LSB. ?
-
I mean a bit position where they're all zero.
- Show replies
New conversation -
-
-
Take all the one bits and store them breadth first starting from lsb. Maximum is 2^(ceil(onebits/integers)+1)-1 I think
-
What is a "one bit"? A position where there is at least one bit set? So what if there are 0s and 1s at each position? See also this tweet:https://twitter.com/oe1cxw/status/1119255354829832194 …
- Show replies
New conversation -
-
-
Possibly relevant observation: any strategy that puts all the all-0 bits to the left will give you a max value strictly within a factor of 2 of the optimal max.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.