Here is the problem:
There are $6^3$ possible outcomes to rolling a die $3$ times. Out of these, how many yield a total of (exactly) $13$ dots?
My solution would be absolutely impractical for problems involving $4$ rolls of the die. And at higher numbers it would be downright impossible without brute-forcing it with a computer.
Is there a more elegant way to solve this type of problem?
My solution:
First we find all sets $\{a, b, c\}$ such that $a + b + c = 13; \; a, b, c \le 6$:
$\{1, 6, 6\}$
$\{2, 5, 6\}$
$\{3, 4, 6\}, \{3, 5, 5\}$
$\{4, 4, 5\}$
The total number of sets that fit these criteria is $5$. If $a \not= b \not= c$, then there exist $3!$ unique permutations of $\{a, b, c\}$. If $a = b \not= c$, then there exist $3$ unique permutations of $\{a, b, c\}$. -- There cannot be a set such that $a = b = c$.
There are $2$ sets of the first kind and $3$ of the second. It follow that the total number of triple die rolls that can fit the criteria is
\begin{equation*} 2 \cdot 3! + 3 \cdot 3 = 21 \end{equation*}
I can think of a second way to do it, which might be faster for slightly larger numbers... but essentially still comes down to brute force, not a method that can be generalized.