How to uniform 1 out of 7 chance, using 2 coins

83 Views Asked by At

Using two coins, simulate a fair dice with 7 sides, A, B, C ,D ,E, F, G.

Coin 1:

Head 6/7
Tail 1/7

Coin 2:

Head 50%
Tail 50%


My approach

Step 1:

------------- Coin1 -----------------
              /  \
             /    \
       6/7  /      \ 1/7
           /        \
          /          \
       Step2          G

Step 2:
A new problem, simulate a fair dice using a fair coin and the biased coin (coin1)

I can do this only using a fair coin, flipping 3 times, 8 possibilities, assigning 1-6 to A, B, C, D, E, F.
For 0 and 7, repeat the process. Since termination possiblity is 3/4, it will stop at some point.

But, can it be done in a finite number of steps? perhaps the biased coin could be used again?

2

There are 2 best solutions below

2
On

I think it cannot and the problem is the following. Let there be $N-n$ throws of the fair coin and $n$ throws of the unfair coin (hence $N$ total trows). Then the probability of any configuration happening is $$ \frac{1}{2^{N-n}}\frac{6^k}{7^{n}} $$ wherre $0\leq k\leq n$.

Now in order to simulate a fair dice you want to associate to some subset of configuration each face, and you want such a subset to have probability $1/7$. In other words you want to divide the configurations with probability given by the expression at the beginning into groups whit probability 1/7. Then, for instance, for the first face you will have to find integers $k_1,k_2,\dots,k_i$ such that $$ \frac{1}{7}=\sum_{j=1}^i\frac{1}{2^{N-n}}\frac{6^{k_i}}{7}=\frac{1}{2^{N-n}}\frac{6^{\sum_i k_i}}{7^n}. $$

Then

$$ 7\times 6^{\sum_i k_i}=2^{N-n}7^n $$

This is definitely impossible since the left hand side is divisble by 3 while the right hand side is not.

Then it is impossible to simulate the fair dice with a fixed finite number of tries.

1
On

It is possible...

           ------------------- coin 1 ----------------------
                  /                              \
            1/7  /                                \ 6/7
                /                                  \
            coin2                                 ---coin2---
            /    \                               /            \
       1/2 /      \ 1/2                     1/2 /              \ 1/2
          /        \                           /                \
       coin2       coin2                     coin2                coin2
        /  \        / \                       /   \              /     \   
   1/2 /    \  1/2 /   \ 1/2             1/2 /     \ 1/2    1/2 /       \ 1/2
      /      \    /     \                   /       \         coin2     coin2
     1        2  3     coin2               coin2    coin2       / \      / \
                        /   \              / \        / \      /   \    /   \
                   1/2 /     \ 1/2    1/2 /   \      /   \     4 5      6   7
                      /       \          /     \    /     \ 
                   coin2       coin2     1     2   3     coin2
                                                           /  \
                   / \          /\                        /    \
              1/2 /   \   1/2  /  \                      /      \
                 /     \      /    \                  coin2      coin2
                4       5    6      7                  /\         /\
                                                      /  \       /  \
                                                     /    \     /    \
                                                    4      5   6      7

Calculate the probability to end up in a leaf, then sum it for all the symbols, each at it turn. An example for symbol 1 is below:

P(1) = (1/7)(1/2)(1/2) + (6/7)(1/2)(1/2)*(1/2) = 1/7

P(2) = (1/7)(1/2)(1/2) + (6/7)(1/2)(1/2)*(1/2) = 1/7