Lucas Garron
Premium Member
It's 1/e, where e=2.718281828459045235360...
http://en.wikipedia.org/wiki/Derangement#Counting_derangements
Why it's not 1/12: All you people not considering the probability that when we get to competitor n, her/his cube has already been misplaced, and (s)he gets it with probability 0.
Except there is some dependency (each competitor's cube is more likely to be mismatched already when we get to him/her, since we are eliminating the random case that any competitor gets her/his own cube, and thus increasing the chances that they get someone else's), so the bottom is not quite that.
Anyhow, ((n-1)/n)^n goes to 1/e, and it's close-ish for 12 already.
http://en.wikipedia.org/wiki/Derangement#Counting_derangements
Why it's not 1/12: All you people not considering the probability that when we get to competitor n, her/his cube has already been misplaced, and (s)he gets it with probability 0.
Code:
(11/12)*( 0/11)*( 9/10)*...
should be:
(11/12)*(1/12*1 + 11/12*10/11)*(2/12*1 + 10/12*9/10)*...
=(11/12)*(11/12)*(11/12)*...
Anyhow, ((n-1)/n)^n goes to 1/e, and it's close-ish for 12 already.