Skip to content
Family Table Math
Auto

Permutations

A permutation is an arrangement of objects where order matters. Picking a president and vice-president, seating people in a row, or setting a lock code are all permutations: swap two people and you get a different result. Permutations are the multiplicative counting principle packed into one handy formula.

A permutation of rr objects chosen from nn different objects is an ordered arrangement of them. For the letters A, B, C, taken two at a time, the permutations are

AB, BA, AC, CA, BC, CB\text{AB, BA, AC, CA, BC, CB}

AB and BA count as different, because order matters.

The number of permutations of rr objects chosen from nn different objects is

P(n,r)=n!(n−r)!P(n, r) = \frac{n!}{(n - r)!}

Here’s why. There are nn choices for the first spot, n−1n - 1 for the second, and so on, for rr spots:

P(n,r)=n×(n−1)×⋯×(n−r+1)P(n, r) = n \times (n - 1) \times \dots \times (n - r + 1)

That’s the first rr factors of n!n!, which is exactly n!(n−r)!\dfrac{n!}{(n - r)!}. For example, P(7,3)=7×6×5=210P(7, 3) = 7 \times 6 \times 5 = 210.

Arranging all nn objects gives P(n,n)=n!0!=n!P(n, n) = \dfrac{n!}{0!} = n!.

On most calculators, use the nPr key: for P(7,3)P(7, 3), type 77, then nPr, then 33.

Ask: if I swap two of the chosen items, do I get a different result? If yes, order matters, and it’s a permutation. Clues include:

ClueExample
Different roles or positionspresident, vice-president, treasurer
Rankingsfirst, second, third place
Arrangements in a lineseating, photos, books on a shelf
Codes and “words” with no repeatsa lock code with different digits

If swapping makes no difference (like choosing a committee), see combinations.

  • Fixed position: place the restricted item first, then arrange the rest. If Ana must sit on the left end of 66 seats, the other 55 people fill the remaining seats in 5!5! ways.
  • Kept together: glue the items into one block. Arrange the block with the other items, then multiply by the number of ways to arrange the items inside the block.
  • Kept apart: use the complement. Count all arrangements, then subtract the ones where the items are together:
apart=total−together\text{apart} = \text{total} - \text{together}

A club has 1010 members. In how many ways can it choose a president, a vice-president, and a treasurer?

Solution. The roles are different, so order matters. Choose 33 from 1010:

P(10,3)=10!7!=10×9×8=720P(10, 3) = \frac{10!}{7!} = 10 \times 9 \times 8 = 720

Six people line up for a photo.

  • (a) In how many ways can they line up if Ana must be on the left end?
  • (b) In how many ways if Ana must be on either end?

Solution. (a) Put Ana on the left end. The other 55 people fill the other 55 spots:

5!=1205! = 120

(b) Ana has 22 choices of end, and then the other 55 people fill the rest:

2×5!=2402 \times 5! = 240

Seven different books, including two math books, are placed on a shelf.

  • (a) In how many ways can they be arranged if the two math books must be side by side?
  • (b) In how many ways if the two math books must not be side by side?

Solution. (a) Glue the two math books into one block. Now there are 66 items to arrange (the block and the 55 other books): 6!6! ways. Inside the block, the math books can be in either order: 2!2! ways.

6!×2!=720×2=14406! \times 2! = 720 \times 2 = 1440

(b) Use the complement. All arrangements: 7!=50407! = 5040.

apart=5040−1440=3600\text{apart} = 5040 - 1440 = 3600

How many four-letter arrangements can be made from the letters of PLANETS (no letter used twice)? How many of them start with a vowel?

Solution. PLANETS has 77 different letters. Order matters, so:

P(7,4)=7×6×5×4=840P(7, 4) = 7 \times 6 \times 5 \times 4 = 840

For a vowel first: the vowels are A and E, so the first letter has 22 choices. The other 33 spots are filled from the remaining 66 letters:

2×P(6,3)=2×120=2402 \times P(6, 3) = 2 \times 120 = 240

Using a permutation when order doesn’t matter. Choosing 33 people for a committee is not a permutation: the same three people in a different order are the same committee. Ask the swap question every time.

Forgetting to arrange inside the block. When items are kept together, the block can be arranged in its own ways. Two books together give a factor of 2!2!; three people together give 3!3!.

Trying to count “apart” directly. It’s much easier to subtract: total minus together.

Mixing up n and r. In P(n,r)P(n, r), nn is how many you have to choose from, and rr is how many you arrange. P(10,3)P(10, 3) is 720720, but P(3,10)P(3, 10) doesn’t make sense.

Not filling the restricted spot first. Place the item with a restriction first; otherwise you may count choices that break the rule.

1. (Warm-up) Evaluate P(8,3)P(8, 3), P(5,5)P(5, 5), and P(9,1)P(9, 1).

Solution

P(8,3)=8×7×6=336P(8, 3) = 8 \times 7 \times 6 = 336. P(5,5)=5!=120P(5, 5) = 5! = 120. P(9,1)=9P(9, 1) = 9.

2. (Warm-up) Does order matter? Say whether each is a permutation.

  • (a) awarding gold, silver, and bronze medals to 33 of 88 skaters
  • (b) choosing 33 of 88 students to help at a school event, all doing the same job
  • (c) setting a lock code using 44 different digits
Solution

(a) Yes: swapping gold and silver gives a different result. (b) No: the same three helpers in a different order is the same group. (c) Yes: 12341234 and 43214321 are different codes.

3. (Warm-up) You have 1212 songs. In how many ways can you choose and order the first 44 songs of a playlist?

SolutionP(12,4)=12×11×10×9=11 880P(12, 4) = 12 \times 11 \times 10 \times 9 = 11\,880

4. (Core) Eight swimmers are assigned to 88 lanes.

  • (a) How many lane assignments are possible?
  • (b) How many if Wei must swim in lane 44?
Solution

(a) 8!=40 3208! = 40\,320.

(b) Wei is fixed, so the other 77 swimmers fill 77 lanes: 7!=50407! = 5040.

5. (Core) The letters of FRIDAY are arranged.

  • (a) How many arrangements are there?
  • (b) How many start with F?
  • (c) How many have the vowels I and A next to each other?
Solution

FRIDAY has 66 different letters.

(a) 6!=7206! = 720.

(b) F is fixed first, and the other 55 letters fill the rest: 5!=1205! = 120.

(c) Glue I and A into a block: 55 items to arrange, then 2!2! orders inside the block. 5!×2!=2405! \times 2! = 240.

6. (Core) Five friends sit in a row of 55 seats. Jo and Sam don’t want to sit next to each other. How many seating arrangements are possible?

Solution

Total: 5!=1205! = 120. Together: treat Jo and Sam as a block, giving 4!×2!=484! \times 2! = 48.

apart=120−48=72\text{apart} = 120 - 48 = 72

7. (Core) A bike lock code uses 44 different digits from 00 to 99.

  • (a) How many codes are possible?
  • (b) How many start with an even digit?
Solution

(a) P(10,4)=10×9×8×7=5040P(10, 4) = 10 \times 9 \times 8 \times 7 = 5040.

(b) The first digit has 55 choices (0,2,4,6,80, 2, 4, 6, 8). The other 33 digits are chosen in order from the remaining 99: 5×P(9,3)=5×504=25205 \times P(9, 3) = 5 \times 504 = 2520.

8. (Challenge) Solve P(n,2)=56P(n, 2) = 56.

Solution

P(n,2)=n!(n−2)!=n(n−1)P(n, 2) = \dfrac{n!}{(n - 2)!} = n(n - 1). So n2−n−56=0n^2 - n - 56 = 0, which factors as (n−8)(n+7)=0(n - 8)(n + 7) = 0. Since nn must be positive, n=8n = 8.

Check: 8×7=568 \times 7 = 56. ✓

9. (Challenge) Four boys and three girls stand in a row. In how many ways can they line up if boys and girls must alternate?

Solution

With 44 boys and 33 girls, the only alternating pattern is B G B G B G B (starting with a girl would need as many girls as boys). The boys fill their 44 spots in 4!4! ways and the girls fill their 33 spots in 3!3! ways:

4!×3!=24×6=1444! \times 3! = 24 \times 6 = 144