4 ms·
> If you convert Pi to base 2 you won't be penalized for those long sequences of odd numbers That doesn't seem correct. How do you fairly map digits 0-9 to bas
by umvi 8y ago
> If you convert Pi to base 2 you won't be penalized for those long sequences of odd numbers
That doesn't seem correct. How do you fairly map digits 0-9 to base 2? Assuming pi has an even distribution of digits, you are going to get a disproportionate amount of 1's.
There are 2 ways of mapping digits to binary: fixed width and minimal.
With minimal the digits 0 and 1 require 1 bit, and 8 and 9 require 4 bits. So then 0:9 maps to (0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001).
Tally it up: 15 ones, 10 zeros. That means you will be encountering 1 50% as often as 0, which doesn't seem random to me.
So then let's try fixed width:
0:9 maps to (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001).
Tally it up: 15 ones, 26 zeros. That means you will be encountering 0 >60% as often as 1, which doesn't seem random to me. Also, with this scheme you can never encounter more than 4 ones in a row ("78"), which is also unrandom