[seqfan] Equal-wear codings of 0..(n-1)

Ron Hardin rhhardin at att.net
Sun May 8 20:17:36 CEST 2011


Number of permutations of 0..(n-1) with equal numbers of bit changes for every 
bit in the binary representation of numbers in the permutation

1 2 2 0 0 36 144 672 0 688 161420 1568320 16640624 234147048

All 36 solutions for n=6 (each bit changes three times)  
..100.101.011.100.010.010.011.010.011.011.010.100.011.010.100.101..
..010.011.101.010.000.000.000.001.000.001.100.001.101.001.010.011..
..101.000.010.001.001.011.001.000.101.010.011.010.010.100.001.100..
..000.100.001.101.100.100.101.100.001.101.001.000.000.000.000.000..
..001.001.000.000.011.001.010.011.010.000.000.101.001.011.101.001..
..011.010.100.011.101.101.100.101.100.100.101.011.100.101.011.010..
..
..100.100.010.010.101.101.010.101.011.101.010.100.011.011.100.100..
..001.000.100.100.000.011.100.000.101.011.001.001.101.001.000.010..
..101.101.011.001.011.000.001.100.000.100.011.000.000.000.001.101..
..010.010.000.000.001.001.011.011.001.001.100.010.010.101.010.001..
..000.001.001.011.100.100.000.001.010.000.000.101.001.010.101.000..
..011.011.101.101.010.010.101.010.100.010.101.011.100.100.011.011..
..
..101.101.101.011..
..000.001.001.000..
..001.000.100.010..
..011.011.011.101..
..100.100.000.001..
..010.010.010.100..

Obviously it will have trouble just above powers of 2 since there are few codes 
with the leading bit set.




rhhardin at mindspring.com
rhhardin at att.net (either)




More information about the SeqFan mailing list