In how many ways can a candidate choose questions? There are three sections in a question paper, each having $5$ questions. A candidate has to solve $5$ questions in total, selecting at least one from each section. In how many ways can he do this?.
I have explicitly made cases and computed the answer, but how do I do it without making cases like $1,2,2$, etc.
Thanks.
 A: If $2$ questions are chosen from some section, then the split must be $1,2,2$ in some order, hence the number of ways is
$$(3)\binom{5}{1}\binom{5}{2}^2 = (3)(5)(10^2)=1500$$
If $3$ questions are chosen from some section, then the split must be $1,1,3$ in some order, hence the number of ways is
$$(3)\binom{5}{3}\binom{5}{1}^2=(2)(10)(5^2)=750$$
so the total is $1500+750=2250$.

So while that's the correct answer, you asked why the count couldn't instead be computed  as 
$$(5^3){\small{\binom{12}{2}}}$$
Presumably, as Henno Brandsma suggested, your explanation as to why the above product should yield the desired count is something along these lines:


*

*The factor $5^3$ represents the number of ways to choose one problem from each section.

*The factor $\large{\binom{12}{2}}$ represents the number of ways to choose the remaining two problems.


So what's wrong with that?

Firstly, it would yield the wrong answer; $8250$, instead of the correct answer, $2250$.

But where's the logical error? Doesn't the $(5^3){\large{\binom{12}{2}}}$ count allow for every possible legal set of $5$ problem choices?

Yes, but it's an overcount. Some sets are counted $4$ times; some are counted $3$ times. 

An example of each type . . .

Let the sections be denoted $A,B,C$.

For $1\le k \le5$, and $X \in\{A,B,C\}$, let $X_k$ denote the $k$-th problem in section $X$.

For example, $B_4$ denotes problem $4$ of section $B$.

Then in the $(5^3){\large{\binom{12}{2}}}$ count, the set $\{A_1,B_1,B_2,C_1,C_2\}$ is counted $4$ times:
\begin{align*}
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_1,C_1\},\,\text{then choose}\;\{B_2,C_2\}\\[4pt]
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_1,C_2\},\,\text{then choose}\;\{B_2,C_1\}\\[4pt]
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_2,C_1\},\,\text{then choose}\;\{B_1,C_2\}\\[4pt]
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_2,C_2\},\,\text{then choose}\;\{B_1,C_1\}\\[4pt]
\end{align*}
and the set $\{A_1,B_1,C_1,C_2,C_3\}$ is counted $3$ times:
\begin{align*}
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_1,C_1\},\,\text{then choose}\;\{C_2,C_3\}\\[4pt]
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_1,C_2\},\,\text{then choose}\;\{C_1,C_3\}\\[4pt]
{\small\bullet}\;\;&\text{First choose}\,\{A_1,B_1,C_3\},\,\text{then choose}\;\{C_1,C_2\}\\[4pt]
\end{align*}
There are various ways to correct the overcount, but any correction still needs to consider  the two types of overcounted sets$\,-\,$those counted $4$ times, and those counted $3$ times; in effect, the same two cases as in the method shown using the splits $(1,2,2)$ and $(1,1,3)$.
A: Maybe inclusion-exclusion is the way to go.
You have to pick 5 questions out of 15.
Let $S_i$ be the number of choices where the candidate does not choose a question from section $i$.
The total number of options is ${15 \choose 5}$.
Then $|S_i| = {10 \choose 5}$ for each $i$, as we exclude one section of 5 questions.
All intersections $S_i \cap S_j, i \neq j$ have size 1, as we exclude 10 out of 15, and we have to choose 5.
$S_1 \cap S_2 \cap S_3 = \emptyset$ as we must choose some questions so some section is used.
Now the inclusion-exclusion principle tells us that the number of good choices is
$${15 \choose 5} - 3\cdot {10 \choose 5} + 3 \cdot 1 =3003 -3\cdot 252 + 3 =2250$$
(The 3 comes from the fact that there are 3 sets $S_i$ and 3 intersections $S_i \cap S_j$ in total, all the same size, as we saw.
No case distinctions necessary then,and generalisations to more categories are clear and not a lot harder.
