In a tournament with 5 teams, there are no ties. In how many ways can the $\frac{5 \cdot 4}{2}=10$ games of the tournament occur such that there is neither a team that won all games nor a team that lost all games?
Solution

Represent each team by a vertex of a pentagon and the result of each game by an arrow from the player who won to the player who lost.

![](https://cdn.mathpix.com/cropped/2024_05_01_4fd1b602786ad9981479g-26.jpg?height=359&width=328&top_left_y=1272&top_left_x=753)

Since each match has 2 possible outcomes, there are $2^{10}$ possible outcomes for the tournament. Suppose player $A$ won all their matches, then the remaining matches can be chosen in $2^{6}$ ways. In the tournament, only one player can have won all their matches, and since there are 5 players, there are $5 \cdot 2^{6}$ distributions of the matches where one player won all their matches. Similarly, there are $5 \cdot 2^{6}$ distributions of the matches where one player lost all their matches. However, these two groups of tournaments are not disjoint. To count how many distributions are common to both counts, note that we can choose the player who won all their matches in 5 ways and the player who lost all their matches in $5-1=4$ ways. Once these choices are made, the results of 7 matches are already defined. The remaining 3 matches can be chosen in $2^{3}$ ways and will not produce any other players with the maximum number of wins or the minimum number of losses. Therefore, the number of tournaments sought is

$$
2^{10}-2 \cdot 5 \cdot 2^{6}+5 \cdot 4 \cdot 2^{3}=2^{5} \cdot 17=544
$$