Permutations and combinations
Four friends need a speaker and a recorder for a presentation. Ada can speak while Ben records. If they swap jobs, have we made a different choice? Now suppose we only need a team of two friends, with no separate jobs. Does that swap still change the team? We will keep these same people in view while we work out what to count.
We only need addition, multiplication and division to begin. The names and symbols come after the choices they describe. Each person is different, and one person cannot fill two places in the same choice.
01When does swapping people change the answer?
Choose a speaker below, then a different recorder. The letter on each card stays with that person; it does not name a job. Once both places are filled, press Swap jobs and watch the names under the two job labels.
Choose two different people above.
Ada as speaker and Ben as recorder is a different assignment from Ben as speaker and Ada as recorder. The jobs are different, so we must remember who occupies each place. We call a choice in which the positions matter an ordered choice, or a permutation.
The team shown below the jobs ignores those job labels. It still contains the same two people after a swap. A choice that records only which people were chosen is a combination. We will count the job assignments first, then use that count to find the number of teams.
02Why does multiplication count the choices?
We could write down every job assignment, but it is easy to miss one. Let us keep the speaker fixed while we list the recorders. If Ada speaks, Ben, Cleo or Dan can record. That gives three assignments with Ada as speaker.
Each row below keeps one speaker on the left. A line leads to each allowed recorder on the right. A complete path therefore means one speaker and one recorder. Use Next step to open a row at a time; click a path to read its two jobs.
Read each path left to right: speaker → recorder.
There are four rows, and every row contains three assignments. The rows cannot overlap: an assignment with Ada speaking is not an assignment with Ben speaking. Every possible assignment belongs to one of these rows, because its speaker must be one of the four friends. So we have four separate groups of three, which is what counts.
The second choice depends on the first: we cannot use that person again. Yet there are three choices every time, whichever speaker we selected. That equal number is why multiplication works here. If an extra rule allowed different numbers of recorders in different rows, we would add those row counts instead.
03Give everybody a place
Keep our four friends, but now arrange all four in a line. There are four choices for the first place. After choosing that person, three remain for the second. Then two remain, and finally one. The same branching argument gives complete lines.
We need a short name for this descending product, because it appears whenever every different person gets a place. We write , read four factorial, for . The exclamation mark is part of the mathematical notation; it does not mean to add or repeat the number four.
Below, names the number of people. One example line fills from left to right. Under each place, the factor records how many choices were available there, not which person we happened to put there. The product counts all possible lines; the displayed line is only one of them.
For any positive whole number , the choices are , then , and so on down to . Their product is called . Each complete line follows exactly one chain of choices, so no line is counted twice or left out.
There is one way to choose nobody: leave the line empty. There are no choices to make, but the empty result exists once. This is why the arrangement count is , not zero. An impossible task has zero results; an empty task has one empty result.
Try setting to zero. This also fits the pattern : one person has one possible line, so the remaining empty part must have one arrangement. We keep the value for a product with no factors, so an empty product does not change a multiplication.
04Fill only some of the places
Return to the speaker and recorder. We had four people but only two jobs, so we stopped after . Multiplying by as well would arrange the two people who did not get jobs. We did not ask for that extra arrangement.
Now let be the number of available people, and the number of places to fill. We require whole numbers with . The symbol names the number of ordered choices. For four people and two jobs, it is .
For , the first place allows choices. The second allows . Before the last of the places, we have used people, so the number remaining is . We multiply these choice counts, using the same equal-branch argument as the two-job tree.
How can factorials shorten this expression? For the original example, . The factors we want are . The unwanted tail is . Dividing by that entire tail cancels it, leaving exactly the two factors we need.
Change or , then step through the placements and cancellation. To keep the construction readable, this display fills at most three places; the argument works for every allowed .
The same split works for general and . After the wanted factors, the remaining tail starts at and ends at : it is . Since a factorial is never zero, we may divide by it. This gives the factorial form below. When , we keep no factors; the count is one empty choice.
05The same team has several orders
We can now count the teams. A team of Ada and Ben appears twice in the job list: Ada then Ben, and Ben then Ada. We are no longer assigning jobs, so those two orders must become one team. Every two-person team has these two orders; none has more or fewer.
The 12 job assignments therefore form six pairs. We divide by the number of orders of each same team, not by the number of people available. Here that number is , so the team count is .
Watch the orders join their teams below. Letters keep the same person throughout; an arrow records order, while braces record only the members. Select a team to follow its orders. Then try three people per team: each fixed team has orders, because we are arranging its three members in three places.
This display uses up to five people and three selected members, so every order can remain visible. Changing either number restarts the grouping.
Every ordered selection
This explains the general division. First count all ordered selections of people from : there are . Now keep the members of one selected group fixed. Its different members can be arranged in orders, by the factorial argument. Every ordered selection has exactly one set of members, so it belongs to exactly one group. All groups contain the same number of orders, namely .
Let name the number of groups. Group count multiplied by orders per group gives the whole ordered count: . Divide both sides by . Then substitute the formula we just derived for . Dividing by and then by means dividing by their product.
You may also see , read n choose r, for this same count. It is another notation for , not a new method. The important question remains: would swapping the selected people change what we want to record?
06Check the ends of the rule
A formula should agree with the meaning of the task. Let us check cases where we can count without it. Here we have four different people. Choosing nobody gives one empty result. Choosing everybody gives one team, but many different lines.
These formulas count different objects, without reuse. For example, a two-digit code may repeat the same digit, so its second place does not lose one choice. That is a different counting rule. Also, choosing five different people from only four is impossible: it gives zero results, and lies outside our stated range .
07Decide what one result means
For each problem, decide whether the same selected people in a different order make a new result. Then write the choice counts before using factorials. Open an answer after trying; the explanation keeps the meaning of each factor visible.
Five friends need a speaker and a recorder. How many assignments are possible?
Show the reasoning
The jobs are different. Choose the speaker in five ways, then choose the recorder from the four remaining people. That gives . As a factorial expression, . The factor removes arrangements of the three people who did not get jobs.
The same five friends now need a team of three, with no separate jobs. How many teams are possible?
Show the reasoning
First count ordered choices: . Each fixed team of three appears in six orders, because . Every order belongs to one team, so divide by six: . Dividing by three instead would be wrong: a three-person team has six orders, not three.
A shelf has four different books. How many ways can we put all four in a row? How many ways can we choose all four without arranging them?
Show the reasoning
For the row, the places matter: . For the group, every book must be included, so only one group is possible. The formula gives . The represents the empty part left outside the group; it equals one.
The formulas came from two operations: multiply the choices at successive places, then, if positions do not matter, divide by the orders of each same group. Before choosing a formula, keep asking what counts as one different result.
