Elements of combinatorics
Combinatorics answers the question “how many ways are there?”. The addition rule: if we can choose from group A in m ways or from group B in n ways, and the choice is “either from A or from B”, the total is m + n ways. For example if basket 1 has 20 apples and basket 2 has 30, we can take one apple in 20 + 30 = 50 ways. To count all possible arrangements in an orderly way we use a tree diagram: the letters A, B, C can be put in a row in 6 ways: ABC, ACB, BAC, BCA, CAB, CBA.
| A … | B … | C … |
|---|---|---|
| ABC | BAC | CAB |
| ACB | BCA | CBA |
A school library has 5 fairy-tale books and 6 nature books for children. If you pick one book, either a fairy tale or a nature book, the addition rule gives 5 + 6 = 11 choices. Four different books on a shelf can be put in a row in 4 · 3 · 2 · 1 = 24 different orders.
A librarian counts choice options, a game designer counts possible situations, and an organiser counts ways to assign seats.
Write two groups of school subjects (for example languages and sciences), count the subjects in each group and add them to find in how many ways one subject can be chosen.
“Line-up”: three pupils stand side by side. The class arranges them in all possible orders and counts the ways, then compares with a tree diagram.