3 ms·
His math is right. The factorial already took care of the fact that order does not matter. If you want to optimize storage of duplicates, you still have to st
by mturmon 9y ago
His math is right. The factorial already took care of the fact that order does not matter.
If you want to optimize storage of duplicates, you still have to store the number of duplicate numbers, and you are back where you started.
- yorwba 9y agoThe factorial is taking too much care of the fact that order does not matter. If I wanted to store four 1-bit numbers, ajkjk's math would suggest that I need log2(2^4/4!) = -0.58, i.e. a negative number of bits. You can't just divide by 4! because not all combinations of 4 numbers have 4! unique permutations. > If you want to optimize storage of duplicates, you still have to store the number of duplicate numbers, and you are back where you started. No, because you can shave off a few bits by ignoring the ordering of the non-duplicates.
- mturmon 9y agoYou’re right, correction appreciated.