Random permutation with a scientific calculator

82 Views Asked by At

I have 8 people whom I want to divide into 2 groups. The allocation must be uniformly at random, i.e., every person must have equal probability of joining either group.

We came across a situation where we had to do this, but we did not think about the process deeply. All we had at our hands was a scientific calculator to generate the randomness. We asked the first person to generate a random integer from 1 to 8. Odd numbers and even numbers generated two different groups. The second person kept generating a number till he had a number different from the first person's number, and so on. However in this method, the probability of the second person to join either groups is not the same.

The task is pretty simple if we can have a random permutation of $\{1,2,\ldots,8\}$, but all we had was a calculator. How best could we have accomplished this task?

1

There are 1 best solutions below

0
On

If the groups don't have to be equinumerous, you can draw for each person a number from $\{0,1\}$. We have to exclude the situations, where all people are going to one group, ie. the drawn sequence is $[0,0,0,0,0,0,0,0]$ or $[1,1,1,1,1,1,1,1]$.

There also occurs a negative draws (eg. $[0,0,0,1,1,1,0,1]$ and $[1,1,1,0,0,0,1,0]$), but for each division there are exactly two different draws, so it doesn't affect the probability.

You can then draw a random number $n$ from $\{1,2,...,2^8-2\}$ and divide people using its' binary representation (eg. for $n=38$ the sequence will be $[0,0,1,0,0,1,0,0]$).