The likelihood that 2 miners have the same world

Hello! Recently, I was interested in the question: “can it be such that 2 players in Minecraft have the same single world?”

The fact is that the Minecraft world is randomly generated from a given seed. It can be set manually or received by the government pseudo-random. It is worth noting that the same seed generates the same world.

This game is very popular, so it is not possible to directly interview all the players and compare their single worlds. However, we can always calculate the probability of this event. It would seem: all we need is to calculate the number of elementary outcomes that satisfy this event, and divide it into the set of all elementary outcomes. Unfortunately, this is a very non-trivial task, so I remembered about the "Paradox of Birthdays."

The paradox itself lies in the fact that in a group of 23 people with a 50% probability, two people have the same birthday. Obviously, the task is similar to ours. How was it solved? Very simple: it turned out that calculating the likelihood that each person in a group has a unique birthday is much easier. To do this, take one person and remember his birthday, then take the second, and the likelihood that his day does not coincide with the first will be equal

$$ display $$ p_2 = 1- \ frac {1} {365} $$ display $$

Those. 100% minus the likelihood that their birthday is the same. We take the third one and consider the probability that his birthday does not coincide with the previous two

$$ display $$ p_3 = 1- \ frac {2} {365} $$ display $$

And so on until the nth person

$$ display $$ p_n = \ frac {n-1} {365} $$ display $$

Then the probability that no one in the group matches

$$ display $$ p = 1 * (1- \ frac {1} {365}) * (1- \ frac {2} {365}) * ... * (1- \ frac {n-1} { 365}) $$ display $$

And the probability that at least 2 matches

$$ display $$ p_ {search} = 1-p $$ display $$



It remains only to apply this solution for our case. There are only 2 ^ 64 possible seeds in Minecraft, and there are about two hundred million players. So our formula will look

$$ display $$ p = 1 * (1- \ frac {1} {2 ^ {64}}) * (1- \ frac {2} {2 ^ {64}}) * ... * (1- \ frac {2 * 10 ^ 8} {2 ^ {64}}) $$ display $$

Manually counting this is very time consuming, so I wrote a small program in Python 3 that did this instead of me.

image

If anyone is interested - here is the program code, but it is very simple.

a = 2**64
n = 200000000
p = 1
for i in range(n):
    p *= (1 - i/a)
print('Chance that 2 players of minecraft have the same seed: ' + str((1-p)*100) + '%')


It turned out 0.1%, which, by the way, is quite a lot, given the number of possible seeds.

Thanks for attention!

Links:

Birthday Paradox
How many people play Minecraft
How many seeds in Minecraft

Also popular now: