Permutations and combinations belong to combinatorics, the field that studies finite, discrete arrangements. A permutation denotes an ordered selection of items from a set, while a combination selects items irrespective of order. For example, a common combination lock is mathematically a permutation lock because the sequence matters; 1‑2‑9 is not the same as 2‑9‑1, whereas a true combination would accept any ordering of those three digits. The calculator shown works only with the no‑replacement case (no repetitions). Therefore it does not handle situations like a lock that permits repeated numbers such as 3‑3‑3.
Permutations
The tool calculates a classic permutation scenario: choosing ordered arrangements of r elements from a set of n. This is often called r‑permutations of n or partial permutations and is written as nPr, nPr, P(n,r) or P(n,r). When repetitions are prohibited, each step reduces the pool of available items, unlike a "combination" lock where the same digit may appear multiple times (e.g., 3‑3‑3). As an illustration, consider selecting a captain and a goalkeeper from an eleven‑player soccer squad; the same person cannot occupy both roles, so once a player is chosen they are removed from consideration. We label the eleven players with the letters A through K.
A B C D E F G H I J K 11 members; A is chosen as captain
B C D E F G H I J K 10 members; B is chosen as keeper
In the illustration, the initial selection makes A the captain from the eleven candidates; because the captain cannot also serve as goalkeeper, A is excluded before picking the goalkeeper, B. If we listed every possible ordering of the eleven players we would have 11 × 10 × 9 × 8 × 7 × … × 2 × 1, i.e., 11 ! . Since we only care about the two distinct positions, the relevant count reduces to the first two factors, 11 × 10 = 110. Consequently, the permutation formula omits the remaining product 9 × 8 × 7 × … × 2 × 1 (which equals 9 !). The compact expression for a permutation therefore becomes:
nPr =
n!
(n - r)!
Or in this case specifically:
11P2 =
11!
(11 - 2)!
=
11!
9!
= 11 × 10 = 110
Again, the calculator provided does not calculate permutations with replacement, but for the curious, the equation is provided below:
nPr = nr
Combinations
A combination can be seen as a permutation stripped of duplicate arrangements, because the order of the selected items does not matter. Like permutations, combinations have several notations, for example nCr, nCr, C(n,r) or the plain C(n,r), which is the form most often used.
(
n
)
r
. As with permutations, the calculator provided only considers the case of combinations without replacement, and the case of combinations with replacement will not be discussed. Using the example of a soccer team again, find the number of ways to choose 2 strikers from a team of 11. Unlike the case given in the permutation example, where the captain was chosen first, then the goalkeeper, the order in which the strikers are chosen does not matter, since they will both be strikers. Referring again to the soccer team as the letters A through K, it does not matter whether A and then B or B and then A are chosen to be strikers in those respective orders, only that they are chosen. The possible number of arrangements for all n people, is simply n!, as described in the permutations section. To determine the number of combinations, it is necessary to remove the redundancies from the total number of permutations (110 from the previous example in the permutations section) by dividing the redundancies, which in this case is 2!. Again, this is because order no longer matters, so the permutation equation needs to be reduced by the number of ways the players can be chosen, A then B or B then A, 2, or 2!. This yields the generalized equation for a combination as that for a permutation divided by the number of redundancies, and is typically known as the binomial coefficient:
nCr =
n!
r! × (n - r)!
Or in this case specifically:
11C2 =
11!
2! × (11 - 2)!
=
11!
2! × 9!
= 55
Naturally, the number of possible combinations is smaller than that of permutations because duplicate orderings are eliminated. For those interested, the formula for combinations that allow repetitions is shown next: