Randomizing The Order Of Cards

A magician takes a deck of 52 52 playing cards and records their position, labelled i i for a card C C (i.e. the Queen of Spades is on top ( C 1 C_1 ), the 5 5 of Diamonds is beneath ( C 2 C_2 )... the 10 10 of Spades is on the bottom ( C 52 C_{52} )). Then, he gives the cards to his assistant, who shuffles them in a completely random manner. The magician then records the cards' resulting positions, C i C'_{i} .

What is the probability that no cards are in their starting position? In other terms, what is the probability that for any card C i C_i , C i C i C_i\neq C'_{i} ? Write your answer as a percentage.

Note: The assistant doing nothing is one possible configuration: in other terms, C i = C i C_i=C'_{i}


The answer is 36.787944117.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Andrei Li
Aug 21, 2018

Relevant wiki: Derangements

The probability that the event described occurs is the number of configurations with C i C i C_i\neq C'_i , divided by the total number of possible configurations. From the information in the problem, we see that the total number of configurations is 52 ! = 80658175170943878571660636856403766975289505440883277824000000000000 52!=80658175170943878571660636856403766975289505440883277824000000000000 , quite a lot. Now, the possible configurations satisfying C i C i C_i\neq C'_i can be found by the formula for subfactorials/derangements:

! n = n ! e + 1 2 !n=\lfloor{\frac{n!}{e}+\frac{1}{2}}\rfloor

Using this formula, we see that ! 52 = 29672484407795140000000000000000000000000000000000000000000000000000 !52=29672484407795140000000000000000000000000000000000000000000000000000 . Then, the probability of the magician finding a configuration satisfying C i C i C_i\neq C'_i is

29672484407795140000000000000000000000000000000000000000000000000000 80658175170943878571660636856403766975289505440883277824000000000000 0.36787944117 = 36.787944117 % \frac{29672484407795140000000000000000000000000000000000000000000000000000}{80658175170943878571660636856403766975289505440883277824000000000000}\approx0.36787944117=36.787944117\%

It is worth noting that another way of writing the number for your solution is ! n n ! = n ! e + 1 2 n ! \large \frac{!n}{n!}=\frac{\lfloor{\frac{n!}{e}+\frac{1}{2}}\rfloor}{n!} and since n ! n! is very large this answer is very close to 1 e \frac{1}{e} . In fact as decimals they differ only in the 1 0 t h 10^{th} decimal place.

Jeremy Galvagni - 2 years, 9 months ago

Log in to reply

Thank you! As a matter of fact, lim n ! n n ! = 1 e \lim_{n\to\infty}\frac{!n}{n!}=\frac{1}{e} . As a matter of fact, I am curious about from where e e comes from.

Andrei Li - 2 years, 9 months ago

(this isn't a confirmed answer, this is just me asking a question) wonder if it is possible to use inclusion exclusion to solve this like [52!-(52C1)51!+(52C2)50!-(52C3)49!+...+(52C52)1!]/52! and so it would be 1/0!-1/1!+1/2!-1/3!+1/4!...+1/52! which is super close to the expansion of e^x with x=-1

A Former Brilliant Member - 2 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...