The basic rule of combinatorics
Combinatorics counts the number of different ways of choosing and arranging objects. The basic rule is the multiplication rule: if the first choice can be made in m ways and the next choice in n ways, both choices together can be made in m · n ways. For example, 3 kinds of shirts and 4 kinds of trousers give 3 · 4 = 12 outfits. When the choices are alternatives joined by “or”, the addition rule applies: the numbers of ways are added, for instance one drink out of 3 juices or 4 teas can be chosen in 3 + 4 = 7 ways. When forming numbers from digits, we note whether repetition is allowed: without repetition the number of options drops by one at each next place, with repetition it stays the same; the first digit cannot be 0. The number of pairs that can be formed from n objects is n(n - 1)/2, because the product n(n - 1) counts every pair twice.
| trousers 1 | trousers 2 | trousers 3 | trousers 4 | |
|---|---|---|---|---|
| shirt 1 | (1, 1) | (1, 2) | (1, 3) | (1, 4) |
| shirt 2 | (2, 1) | (2, 2) | (2, 3) | (2, 4) |
| shirt 3 | (3, 1) | (3, 2) | (3, 3) | (3, 4) |
A school choir picks one of 5 songs to open and one of the remaining 4 to close. Whichever song opens, 4 are always left for the close, so there are 5 · 4 = 20 possible plans (multiplication rule).
A programmer counts possible passwords, a game designer counts the possibilities in a game, and an event organiser plans the order of a programme.
Make two-digit codes from the digits 1, 2, 3, 4, with repeats allowed: 4 · 4 = 16. List them in a notebook and count.
“Secret code”: the teacher asks to form 3-digit codes from the digits 1, 2, 3, 4, 5. Groups compute how many codes there are with and without repetition and verify by writing several of them.