The tables below shows the biased dice rolls, and the efficiency of each method in returning unbiased results. Because multiple encodings exist to convert from binary to senary, multiple tables exist with the same rolls for comparison.
On average, encoding efficiency from least efficient to most efficient:
- Bit splitting (least efficient)
- Base conversion (most efficient)
On average, algorithmic efficiency from least efficient to most efficient:
- Parity (least efficient)
- Inequality 2
- Inequality 3
- Inequality 3-alt
- Hashing (most efficient)
The die is biased as follows:
Pip | Probability |
---|---|
1 | 1/8 |
2 | 1/8 |
3 | 1/4 |
4 | 1/4 |
5 | 1/8 |
6 | 1/8 |
Using Shannon entropy, I know that the die contains exactly 2.5-bits of entropy per roll. This is necessary for using cryptographic hashing as the randomness extractor.
For the table below, when reading the "Hashing (SHA-256)" column, the first n-bits are read from the resulting SHA-256 hash. For example:
65653 = 12.5-bits of entropy
SHA-256("65653")
= 729211836bff63aac924fe332bc9be837f19e125c8afa5ed11fc3dbddc14579e
= 0111001010010010000100011000001101101011111111110110001110101010\
1100100100100100111111100011001100101011110010011011111010000011\
0111111100011001111000010010010111001000101011111010010111101101\
0001000111111100001111011011110111011100000101000101011110011110
= 011100101001 (truncated to 12 bits)
From there, "011100101001" is converted into senary either using bit splitting or base conversion.
Each die toss here contains 2.5-bits of Shannon Entropy.
Biased Tosses (bits) | Parity | Ineq. 2 | Ineq. 3 | Ineq. 3 alt | Hashing |
---|---|---|---|---|---|
65653 (12) | None | None | None | None | 4562 |
433424 (15) | None | 6 | None | None | 2226 |
3535361 (17) | None | 1 | 3 | 3 | 24454 |
32354341 (20) | 5 | 2 | 6 | None | 15655 |
434634354 (22) | None | 5 | 42 | 2 | 113452 |
3263645464 (25) | 6 | None | 323 | 64 | 2655315 |
14265464653 (27) | None | 2 | 26 | 5 | 24146362 |
166534415353 (30) | 6 | 3 | 43 | 62 | 36312161 |
3544333341255 (32) | None | 3 | 21 | 55 | 14424136 |
43544533631561 (35) | 33 | 6 | 33 | 13 | 5336516445 |
644361335114425 (37) | 2 | 6 | 53 | 0 | 1546661246 |
2123344354336123 (40) | 23 | 5 | 34 | 34 | 533416665661 |
44344654445441451 (42) | 1 | 2 | None | 1 | 32445352332 |
645643343423313433 (45) | 66 | 61 | 464 | 626 | 1414434166 |
4364345524352142541 (47) | 3 | 2 | 3332 | 116 | 66122514316553 |
16336336323254534243 (50) | 5 | 3 | 25 | 542 | 62534341112 |
Each die toss here contains 2.5-bits of Shannon Entropy.
Biased Tosses (bits) | Parity | Ineq. 2 | Ineq. 3 | Ineq. 3 alt | Hashing |
---|---|---|---|---|---|
65653 (12) | 1 | 4 | None | None | 33364 |
433424 (15) | 2 | 5 | None | 22 | 44624 |
3535361 (17) | 2 | 1 | 3 | 5 | 411412 |
32354341 (20) | 5 | 4 | 6 | 32 | 36162313 |
434634354 (22) | 2 | 23 | 42 | 55 | 23363114 |
3263645464 (25) | 6 | 62 | 323 | 222 | 523356324 |
14265464653 (27) | 10 | 22 | 26 | 53 | 3256155644 |
166534415353 (30) | 25 | 26 | 43 | 623 | 213116236316 |
3544333341255 (32) | 1 | 3 | 21 | 511 | 2542144462445 |
43544533631561 (35) | 41 | 236 | 33 | 52 | 23356216635321 |
644361335114425 (37) | 2 | 252 | 53 | 1 | 5334246366664 |
2123344354336123 (40) | 43 | 321 | 34 | 344 | 2241536442313536 |
44344654445441451 (42) | 55 | 33 | None | 22 | 22311146366666521 |
645643343423313433 (45) | 342 | 541 | 464 | 41156 | 4436335621561226 |
4364345524352142541 (47) | 6 | 642 | 3332 | 4446 | 2113152414226635416 |
16336336323254534243 (50) | 345 | 626 | 25 | 6224 | 22236641253211251442 |