Combinatronic Maths
Combinatronics is the mathematics which enables you to calculate the number of different combinations you can get when you make a selection from a population. E.g. You have a bag of 10 uniquely balls. How many different ways are there of selecting 3 balls?
The number of unique types of balls in the bag (10) is called the population, denoted with π. If there were two balls considered βthe sameβ in a bag of 10, the population π would be 9. The number of items in the selection (3) is denoted by π.
It is very important to note that this has nothing to do with probability. The examples of bags and balls are also very often used for probability thought experiments.
The Four Relevant Factors
Four things you need to identify for any combinatorics question:
- Combination or Permutation: Combinations are unordered selections, permutations are ordered selections.
- With or Without Repetition: Can we have the same item type appear more than once in a resulting selection? I.e. Are we selecting from types of objects or individual object instances?
- Selection (π): the number of instances of item in the resulting selection (a.k.a. the sample size)
- Population (π): number of types of the item we are selecting from.
Combination vs Permutation
Each selection of size π items has many ways of arranging the order, known as permutations. Assuming no repetition of object types, there are π! permutations for each combination. If there is repetition, there is a much more complicated equation for the ratio.
- In a βcombinationβ the order is irrelevant and we count each time the same item types appears in the resulting selection but ignore combinations with a different order. Each combination has a number of possible permutations, which we ignore. E.g. in a slot machine with three rollers where the permutations collectively count as 1 combination
- I.e. πππ β‘ πππ β‘ πππ.
- In a βpermutationβ, the order is relevant and we count every order of object types that appears in the resulting selection. E.g. Numbers in a combination lock, or a committee with assigned roles where the distinction between permutations is important.
- I.e. 1οΈβ£2οΈβ£3οΈβ£ β 2οΈβ£3οΈβ£1οΈβ£ β 3οΈβ£1οΈβ£2οΈβ£
With or Without Repetition
- With Repetitions: Allow and count the repeating object types in the resulting selection. This is when there is a pool of object types rather than actual object instances. E.g. numbers, categories of objects.
- Without repetitions: Donβt count or allow repeating objects types in the resulting selection. This is when there is a pool of individual instances of objects which can only be selected once E.g. physical objects or people.
Selection (π)
- π: A Sample a.k.a. βResulting selectionβ , contains βπβ item instances.
Population (π)
- π: The pool of objects contains βπβ object types.
The Equations
All combinations (with or without repetition) and permutations (without repetition) are found using some version of the binomial coefficient equation:. This equation, often vocalised as βπ choose πβ or βπ choose πβ is expressed as either: \(nCr\) or, \(\binom{n}{r}\).
\[\binom{n}{r} = \frac{n!}{r!(n-r)!}\]With or without Repetition | Combination (π is Unordered) |
Permutation (π is Ordered) |
---|---|---|
Without Repetition (Instances of π) |
Combination \(\binom{n}{r}\) | Permutation without repetition \(r!\binom{n}{r}\) |
With Repetition (Types of π) |
Multiset \(\binom{n+r-1}{r}\) | Permutation with repetition \(n^r\) |
Scientific calculators often have the binomial coefficient function normally written as \(nCr\) or \(\binom{n}{r}\) as above. The Windows 10 calculator doesnβt have this function, so the easiest way for quick calculation is to find an online calculator such as this.
Examples
Lets take the examples of a slot machine, committee, role assignment and a combination lock. Each example has a result selection (π) of 3 and 10 object types or instances (π).
Example | Slot machine Combinations | Committee Membership | Role Assignment | Combination Lock Code Permutations |
---|---|---|---|---|
Combination or Permuation | Combination (Unordered) | Combination (Unordered) | Permutation (Ordered) | Permutation (Ordered) |
With or without Repetition | With Repetitions (types) | Without Repetitions (Instances) | Without Repetitions (Instances) | With repetitions (Types) |
Equation | Multiset \(\binom{n+r-1}{r}\) |
Combination \(\binom{n}{r}\) |
Permutation without repetition \(r!\binom{n}{r}\) |
Permutation with repetition \(n^r\) |
Selection (π) | \(π=3\) E.g. |
\(π=3\) E.g. |
\(r=3\) E.g. |
\(π = 3\) E.g. |
Population (π) | or blank \(π=10\) |
\(π=10\) |
\(π=10\) |
\(π=10\) |
Count | \(220\) | \(120\) | \(720\) | \(1000\) |