You said you only wanted hints; on the other hand, it's been quite some time, and the question was just reasked on this site. I've written up the full solution in spoiler blocks below, so you can decide for yourself. In case you still only want hints: Start at the end of the game (see backward induction), find some invariant and prove it by induction. Think about what the last player does and how to characterize the present she gets, and try generalizing that for when $k$ players have yet to play.
The full solution is in two blocks; the first block determines the strategies and the second determines the expected number of swaps; so you can read only one of them if you like.
First, we can prove by induction that at any point in the game, if $k$ players have yet to move, they will get the best $k$ of the remaining presents. The base case $k=1$ is clear: The last player knows the content of her unopened present, and will either open it if it is the best remaining one, or instead swap for the best remaining one. Now assume that the statement holds for $k-1$ players. The player making the $k$-th to the last move knows which presents remain and, by the induction hypothesis, that the remaining $k-1$ players will get the best $k-1$ presents left after her move. Thus, if she opens her present, she will at most get the $k$-th best remaining present. Her optimal strategy is: If she sees one of the best $k$ remaining, swap for the best she sees and leave. If not, then the unopened ones are exactly the best $k$ remaining, and she should open hers; in this case, by the induction hypothesis, she will be left with the $k$-th best remaining present at the end of the game.
$ $
To calculate the expected number of swaps, note that under these strategies, if a present is opened that is not worse than all the unopened ones, it will be immediately swapped and taken off the table. Thus there is always at most one such present, and it can only be the last one opened. Therefore the probability that the $k$-th to the last player swaps is the probability $k/(k+1)$ that the present just opened was not the worst of the remaining $k+1$ presents. If there are $n$ players, $n-1$ of them have a chance to swap, and the expected number of swaps is
\begin{equation}\sum_{k=1}^{n-1}\frac k{k+1}=\sum_{k=1}^{n-1}\left(1-\frac1{k+1}\right)=\sum_{k=1}^n\left(1-\frac1k\right)=n-H_n\;,\end{equation}
where $H_n$ is the $n$-th harmonic number. For $n=50$, this is
\begin{equation}\frac{141008987635075780359241}{3099044504245996706400}\simeq45.5\;,\end{equation}
and for $n=4$ it is $23/12$, as determined by Barry.
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
Where P(x) is the probability that x number of people do not receive a gift, then
$P(\ge 2) = 1 - (P(0)+P(1))$
There are $10!$ ways that all $10$ people can get one gift and $10^{10}$ ways to distribute $10$ gifts to $10$ people.
$$P(0) = \frac{10!}{10^{10}}$$
Then we have $10$ ways for someone not to get a gift and for each one of those there are $9$ ways for someone to get $2$ gifts and for each of those $2$ people combinations there are $\frac{10!}{2!}$ ways to combine them with $8$ other people who each receive one gift.
$$P(1) = \frac{9\cdot 10\cdot 10!}{10^{10}\cdot 2!}$$
$$P(\ge 2) = 1 - (\frac{10!}{10^{10}}+\frac{9\cdot 10\cdot 10!}{10^{10}\cdot 2!}) = .98330752$$