Bangladesh Mathematical Olympiad National Round Solution
Blog 04
[Problem 5, Higher Secondary 2021]:
How many ways can you roll three 20-sided dice such that the sum of the three rolls is exactly 42? Here the order of the rolls matters. (Note that a 20-sided die is very much like a regular six-sided die other than the fact that it has 20 faces instead of the regular six.)
Solution:
Let \(x_1, x_2,\) and \(x_3\) represent the rolls from the first, second, and third die respectively, where \(1 ≤ x_1, x_2, x_3 ≤ 20\). According to problem:
\(x_1 + x_2 + x_3 = 42 \dots (1)\)
Imagine 42 stars (*) in a row. We need to place 2 dividers (|) among the 41 spaces between stars to create 3 partitions. The number of stars in each partition represents \(x_1, x_2\), and \(x_3\) respectively.
This gives us \( \dbinom{41}{2} \) ways to distribute the stars.

The issue arises because each die can only show up to 20. We need to subtract the cases where any partition has more than 20 stars. It's impossible for two partitions to have more than 20 stars each, as the total sum is 42. We need to consider three cases: when \(x_1 > 20, x_2 > 20, x_3 > 20\).

Let's consider when \(x_1 > 20\) (the process is similar for \(x_2\) and \(x_3\)).
Let \(x_1 = {x_1}' + 20\). Substituting in equation (1):
\begin{align*} ({x_1}' + 20) + x_2 + x_3 &= 42 \\ ⇒ {x_1}' + x_2 + x_3 &= 22 \dots (2)\\ \end{align*}
There are \(\dbinom{21}{2}\) solutions for equation (2)
Therefore, number of ways to roll a sum of 42 with three 20-sided dice:
\( \dbinom{41}{2} - 3 \times \dbinom{21}{2} \)