# Probability of candidate voting tie

This question seemed simple at first glance, but I quickly realized it was not.

You have a group of 25 candidates with 1 vote each; they cannot vote for themselves. What is the probability of a 25-way tie (that each voter casts their vote for in such a way that all 25 receive only 1 vote)?

Edit: More details. Voters are not aware of each others' votes. The reasoning behind each vote cast for a person is because that voter believes they are most deserving of the title/award.

• How do they vote? Randomly (with uniform probability)? Sep 28 at 5:39
• Yes , they are not aware of each others' votes Sep 28 at 5:39
• Being "unaware" is not the same as random or uniform. Any definite answer to this question requires a strong assumption about how voters choose their votes.
– whuber
Sep 28 at 13:48

Yes, it's not trivial because this is about derangements. Total number of choices is $$24^{25}$$. For everyone to get one vote, we need a permutation, but no one is allowed to vote on himself/herself. This is a derangement, and the number of possible derangements for $$n$$ is shown with $$!n$$. So, the answer is $$\frac{!25}{24^{25}}$$

The number of derangements is calculated several ways as laid out in the wikipedia entry. One of them is the simple recursive formula $$!n=(n-1)(!(n-1)+!(n-2))\rightarrow a_n=(n-1)(a_{n-1}+a_{n-2})$$ where $$a_n$$ is the number of derangements.

According to this series, we have results up to $$a_{23}$$, but you can easily calculate $$a_{25}$$.

We can test this for smaller numbers, i.e. for $$n=6$$, the probability is $$\frac{!6}{5^6}=\frac{265}{15625}\approx 0.017$$

An example matlab program to demostrate this is as follows:

n = 1000000;
c = 0;
m = 6;  % num people

ids = 1:m;
for i = 1:n
c = c + 1;
end
end

disp(c / n)


The output is:

0.0170

• Mathematica evaluates your expression to $1.7827\times 10^{-10}$. Sep 28 at 8:21
• That is correct for $n=25$. Sep 28 at 8:24
• $[n!/e]/(n-1)^n$ where $[x]$ means round $x$ to the nearest integer gives the result Sep 28 at 9:03
• Yes, (+1) that’s one of the approximations in the wikipedia page. I didn’t try many of them. Sep 28 at 9:07
• It's a hugely accurate approximation!
– whuber
Sep 28 at 13:49