Your first two answers are correct.
How many outcomes are possible in the race for class president if there are five candidates and forty students in the class if no candidate wins the majority of the vote.
Your only error was that the word majority means more than half. Thus, you should give the candidate who wins the majority $21$ votes, leaving $19$ votes to distribute to the five candidates in
$$\binom{19 + 5 - 1}{5 - 1} = \binom{23}{4}$$
ways, which gives
$$\binom{44}{4} - \binom{5}{1}\binom{23}{4}$$
possible outcomes.
How many outcomes are possible in the race for class president if there are five candidates and forty students in the class in which exactly three candidates tie for first place?
Notice that the three winning candidates must each receive at least nine votes since if they each had only eight votes, at least one of the other two candidates would receive at least eight votes, which means there would be either be a five-way tie for first or one of the other two candidates would win the race if he or she received more than eight votes.
However, if three candidates each win nine votes, that does not ensure that there will be exactly three first place finishers since another candidate could win nine or more votes. Even if three candidates each win ten votes, that does not ensure that there will be exactly three first place finishers since one of the other two candidates could receive ten votes, which would produce a four-way tie. However, if three candidates tie with eleven or more votes each, that guarantees exactly three candidates tie for first place since no other candidate could receive more than seven votes. Therefore, we will consider three cases, depending on whether the top three candidates receive exactly nine, exactly ten, or at least eleven votes.
Case 1: Exactly three candidates tie for first with nine votes each.
For this to happen, neither of the other two candidates can receive more than eight of the remaining $40 - 3 \cdot 9 = 13$ votes. There are $\binom{5}{3}$ ways to select which three candidates tie for first. That leaves $13$ votes to distribute to the other two candidates in such a way that neither receives more than eight votes. This can occur in four ways: $(5, 8), (6, 7), (7, 6), (8, 5)$. Hence, the number of possible outcomes in this case is
$$4\binom{5}{3}$$
If you want to take a more formal approach to the distribution of the $13$ votes not received by the three winning candidates, we must find the number of solutions of the equation
$$x_1 + x_2 = 13$$
in the nonnegative integers subject to the restrictions $x_1, x_2 \leq 8$. Without restriction, the equation has
$$\binom{13 + 2 - 1}{2 - 1} = \binom{14}{1}$$
solutions. At most one of the other two candidates could receive nine or more votes. There are two ways to choose this candidate. If we give that candidate nine votes, there are
$$\binom{4 + 2 - 1}{2 - 1} = \binom{5}{1}$$
ways to distribute the remaining four votes, leaving
$$\binom{14}{1} - \binom{2}{1}\binom{5}{1} = 14 - 2 \cdot 5 = 4$$
ways to distribute the remaining thirteen votes so that neither candidate receives more than eight votes.
Case 2: Exactly three candidates tie for first with ten votes each.
There are $\binom{5}{3}$ ways to select the three winning candidates. The remaining ten votes must be distributed among the remaining two candidates in such a way that neither of them receives all ten of the remaining votes. There are nine ways to distribute the remaining ten votes so that neither candidate receives all ten votes since a particular candidate may receive at most nine and must receive at least one of those votes. Hence, the number of possible outcomes in this case is
$$9\binom{5}{3}$$
If you want to take a more formal approach to distributing the ten votes not received by the winning candidates, we must find the number of solutions of the equation
$$x_1 + x_2 = 10$$
in the nonnegative integers subject to the restrictions that $x_1, x_2 \leq 9$. Without restrictions, there are $$\binom{10 + 2 - 1}{2 - 1} = \binom{11}{1}$$ ways to distribute those votes. There are two ways to distribute all ten of the votes to one of these candidates, giving
$$\binom{11}{1} - \binom{2}{1} = 11 - 2 = 9$$
admissible ways to distribute the votes to the other two candidates. Equivalently, we must find the number of solutions of the equation $x_1 + x_2 = 10$ in the positive integers, of which there are
$$\binom{10 - 1}{2 - 1} = \binom{9}{1} = 9$$
since we must place one addition sign in the nine spaces between successive ones in a row of ten ones.
Case 3: Exactly three candidates tie for first and each of those candidates receives at eleven votes.
There are $\binom{5}{3}$ ways to select which three candidates tie for first. That leaves us with seven votes to distribute among the other two candidates candidates, which can be done in
$$\binom{7 + 2 - 1}{2 - 1} = \binom{8}{1} = 8$$
ways. Hence, there are
$$\binom{5}{3}\binom{8}{1}$$
possible outcomes in this case.
Case 4: Exactly four candidates each receive $12$ votes.
There are $\binom{5}{3}$ ways to select which three candidates tie for first. That leaves us with four votes to distribute among the other two candidates, which can be done in
$$\binom{4 + 2 - 1}{2 - 1} = \binom{5}{1} = 5$$
ways. Hence, there are
$$\binom{5}{3}\binom{5}{1}$$
possible outcomes in this case.
Case 5: Exactly three candidates tie for first with $13$ votes each.
There are $\binom{5}{3}$ ways to select which three candidates tie for first. This leaves us with one vote to distribute between the other two candidates which can be done in $\binom{2}{1} = 2$ ways. Hence, there are
$$\binom{5}{3}\binom{2}{1}$$
possible outcomes in this case.
Total: The number of ways exactly three candidates can tie for first is
$$\binom{5}{3}\left[\binom{14}{1} - \binom{2}{1}\binom{5}{1}\right] + \binom{5}{3}\left[\binom{11}{1} - \binom{2}{1}\right] + \binom{5}{3}\binom{8}{1} + \binom{5}{3}\binom{5}{1} + \binom{5}{3}\binom{2}{1} $$
Best Answer
Here's a more detailed account of the reflection argument than the one in the Wikipedia article. Let me know if there's any part of it that you still want me to expand on.
Let's consider all possible sequences of ballots. The idea of the proof is to divide them into three categories:
For concreteness, let's say $n=3$, $m=2$. Then the categories split up like this:
Notice that category 2 and category 3 are the same size. This is not a coincidence! The "reflection" idea is to pair off sequences from category 2 with sequences from category 3.
To do this, we first comment that for any sequence in either category, the count will be exactly tied at some point. For category 2 sequences, this is by definition; if $B$ has caught up to $A$, then $A$ and $B$ are tied. For category 3 sequences, it's because $B$ starts out ahead, but $A$ must eventually win. So at some point before winning, $A$ must catch up to $B$ and they will both be tied.
For concreteness, let's focus on the last time each of these sequences is tied. In our example set, I'll write a | to indicate this point. So the two categories are:
Next, we'll look at what happens if we flip all the votes before a |. For example, AABB|A would flip into BBAA|A. Notice that:
This means it gives a way of pairing off sequences from category 2 with sequences from category 3, just as we wanted. In our specific example, this pairing is:
Now, we're almost done. We just need one more observation: category 3 just consists of sequences which start with a B. Since $m$ out of $n+m$ ballots are $B$ ballots, that means the probability that you end up in category 3 is $\frac{m}{n+m}$. But category 2 is the same size as category 3! Since all ballot sequences are equally likely, that means the probability that you end up in category 2 is also $\frac{m}{n+m}$. So the probability that you end up in category 1 is $$ 1-2\frac{m}{n+m}=\frac{n+m-2m}{n+m}=\frac{n-m}{n+m} $$ just as you conjectured.