There's a puzzle going around, started by this standupmaths video: Given the result of rolling three indistinguishable dice, simulate rolling two distinguishable dice with the correct probabilities; (a uniform 1/36).

By playing with probability tables, here's my messy solution:

0. Sort the dice in ascending order.

1. Count how many distinct rolls there are. If two, step 2a. If three, step 2b. If they're all the same, just output (6,6).

2a. The output is either doubles or has one 6. Remove the duplicate roll and call the remaining rolls x and y.

If x+1=y (the rolls are consecutive), output (x,x). For example, {1,1,2} becomes (1,1).

If not, calculate r=2x+y mod 5 (where 0=5) and output (r,6) if there is a 2 or a 5 present and (6,r) otherwise. For example, {3,5,5} becomes (1,6).

2b. The output is two distinct numbers, neither of which are 6.

If the sum of the dice is odd, SWITCH THE ORDER of the output calculated below; that is, output the larger number first.

* If there is a 1 or a 6 present, output the largest two numbers that are not 6. For example, {2,3,6} becomes (3,2).

* Otherwise, output the smallest two numbers that were NOT rolled. For example, {2,3,5} becomes (1,4).

I haven't looked at other solutions, so there is probably something more elegant.

EDIT: Fixed Step 2a.

-----

If the two simulated dice can be indistinguishable, we can remove the order calculation:

0. Sort the dice in ascending order.

1. Count how many distinct rolls there are. If two, step 2a. If three, step 2b. If they're all the same, just output (6,6).

2a. The output is either doubles or has one 6. Remove the duplicate roll and call the remaining rolls x and y.

If x+1=y (the rolls are consecutive), output (x,x). For example, {1,1,2} becomes (1,1).
If not, calculate r=2x+y mod 5 (where 0=5) and output (r,6). For example, {3,5,5} becomes (1,6).

2b. The output is two distinct numbers, neither of which are 6.

* If there is a 1 or a 6 present, output the largest two numbers that are not 6. For example, {2,3,6} becomes (3,2).

* Otherwise, output the smallest two numbers that were NOT rolled. For example, {2,3,5} becomes (1,4).
I saw this video! Standupmaths is one of my favorite channels. I never did come up with a solution to the puzzle but I do like yours. Have you made a calculator program to test it yet? or did you just work out the probabilities? Either way, you're a step ahead of me in this puzzle. Great work!
I used Python to test it after checking the probabilities by hand.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum