Counting: the four cases, and how to tell them apart
The binomial coefficient
The number of ways to choose items from when order does not matter.
The multinomial coefficient
The number of ways to split distinct items into labelled groups of sizes – equivalently, the number of distinct arrangements of a word with repeated letters. The binomial coefficient is the case .
Onto assignments
The number of ways to assign distinct items to distinct boxes so that no box is empty. It equals times the Stirling number of the second kind, which counts the same split with the boxes unlabelled. It is inclusion–exclusion over the set of boxes left empty, and it is the count behind "every desk gets at least one order" questions.
Remember
- Decide order and repetition first; the formula follows from the four-case table.