Turns out I actually need to solve a harder problem: Find the permutation so that the arithmetic difference between smallest and largest integer after permutation is minimal.https://twitter.com/oe1cxw/status/1119226244992774144 …
-
-
Replying to @oe1cxw
This smells like a dimension/support reduction problem where permutations lead to a minimal support vector/basis.
1 reply 0 retweets 0 likes -
Replying to @trc_wm
What is your linear algebra doing in my combinatorics problem? :) Can you elaborate?
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
Example: Smallest integer: 000000001?? Largest integer: 01???????? You want permutations that cause the number of used bits between the '1' with the most weight and '1' with the least weight to be as small as possible. You can then right-shift everything to make the LSB '0's..
1 reply 0 retweets 1 like -
disappear. You're then left with the smallest support. I think you're not there yet; one can probably reduce the max value more by moving more '0's within the data to more significant positions, except for the '1' in the MSB position. No idea if this actually works.
1 reply 0 retweets 1 like
btw, this is what I ended up doing. Not sure if it is optimal but it seems to work good enough. https://github.com/YosysHQ/yosys/pull/944/files#diff-ca250655cb5c938947732bf2d34b6542R202 …
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.