Lesson 22 of 42 · Counting, probability and statistics

Permutations and combinations, with and without repetition

Ask two questions, does order matter and can choices repeat, and pick the right one of four counting formulas without a calculator.

About 22 minutes

In this lesson

  • Decide whether a selection is ordered or unordered, and whether repetition is allowed.
  • Count with the product rule, factorials, permutations and combinations, with or without repetition.
  • Count the arrangements of letters or objects when some of them are identical.

The idea

Two rules underneath everything

Almost every counting question rests on two rules, both listed in the Bocconi syllabus.

  • Product rule. If a task is done in stages, with aa ways for the first stage and bb ways for the second whatever happened in the first, the whole task can be done in a×ba \times b ways. A menu with 4 starters and 5 main courses gives 4×5=204 \times 5 = 20 two-course meals.
  • Sum rule. If a choice falls into separate cases that cannot happen together, add the counts of the cases. A meal that is either one of 4 starters or one of 5 mains (but not both) can be chosen in 4+5=94 + 5 = 9 ways.

The word that signals each rule is worth hearing: "and then" means multiply; "or, one case or the other" means add.

Factorials

The number of ways to put nn different objects in a row is

n!=n×(n−1)×⋯×2×1,n! = n \times (n-1) \times \dots \times 2 \times 1,

by the product rule: nn choices for the first place, n−1n-1 for the second, and so on. By convention 0!=10! = 1. Learn the small values by heart, since there is no calculator on the test: 3!=63! = 6, 4!=244! = 24, 5!=1205! = 120, 6!=7206! = 720, 7!=50407! = 5040.

The two questions

Before you write any formula, answer two questions about the selection of kk items from nn kinds.

  1. Does order matter? A president and a secretary are different jobs, so choosing Ada then Ben differs from Ben then Ada: order matters. A two-person committee is the same committee whichever name you say first: order does not matter.
  2. Can an item be chosen more than once? Digits in a code can repeat; people on a committee cannot.

The answers place you in one cell of this table.

No repetition Repetition allowed
Order matters n!(n−k)!\dfrac{n!}{(n-k)!} nkn^k
Order does not matter (nk)=n!k! (n−k)!\dbinom{n}{k} = \dfrac{n!}{k!\,(n-k)!} (n+k−1k)\dbinom{n+k-1}{k}

Where the formulas come from

Ordered, no repetition (permutations of kk out of nn): nn choices for the first place, n−1n-1 for the second, down to n−k+1n-k+1 for the kk-th. Multiply only those kk factors; you rarely need the factorial form. Choosing a winner, a runner-up and a third place among 8 finalists gives 8×7×6=3368 \times 7 \times 6 = 336.

Ordered, with repetition: each of the kk places has all nn options, so nkn^k. A three-letter code from the letters A to E, repeats allowed, can be written in 53=1255^3 = 125 ways.

Unordered, no repetition (combinations): count the ordered selections, then divide by the k!k! orders in which each group was counted. That is why (nk)=n(n−1)⋯(n−k+1)k!\binom{n}{k} = \frac{n(n-1)\cdots(n-k+1)}{k!}. Two facts make the arithmetic short: (nk)=(nn−k)\binom{n}{k} = \binom{n}{n-k} (choosing who is in is the same as choosing who is out), and (n1)=n\binom{n}{1} = n, (n2)=n(n−1)2\binom{n}{2} = \frac{n(n-1)}{2}.

Unordered, with repetition: picture the kk chosen items as stars and the borders between the nn kinds as n−1n-1 bars. Every selection is one row of kk stars and n−1n-1 bars, so the count is the number of ways to choose which of the k+n−1k + n - 1 places hold stars: (n+k−1k)\binom{n+k-1}{k}. Buying 2 fruits from apples and pears gives (32)=3\binom{3}{2} = 3: two apples, one of each, two pears.

Arrangements with identical objects

If some of the nn objects in a row are identical, swapping two identical ones creates no new arrangement. Divide n!n! by the factorial of each group of repeats:

n!a! b! ⋯\frac{n!}{a!\,b!\,\cdots}

The letters of NOON give 4!2! 2!=6\frac{4!}{2!\,2!} = 6 arrangements, which you can list: NNOO, NONO, NOON, ONNO, ONON, OONN.

Checking without a calculator

Use a second route whenever you can. A combination should equal the matching permutation divided by k!k!; an arrangement with repeats can be rebuilt by choosing positions group by group; a stars-and-bars answer can be checked on a tiny case you can list. If the two routes disagree, one of them has counted the same thing twice.

Worked examples

Example 1: Officers or a committee?

A student society has 9 members. (a) In how many ways can it elect a president, a secretary and a treasurer, three different people? (b) In how many ways can it choose a three-person organising committee?

  1. (a) The three jobs differ, so order matters and nobody holds two jobs: ordered, no repetition.

  2. Product rule: 99 choices of president, then 88 of secretary, then 77 of treasurer: 9×8×7=5049 \times 8 \times 7 = 504.

  3. (b) A committee has no roles, so order does not matter. Each committee was counted 3!=63! = 6 times in part (a), once for each way of handing out the three jobs: 5046=84\frac{504}{6} = 84.

  4. Second route for (b): (93)=9×8×73×2×1=84\binom{9}{3} = \frac{9 \times 8 \times 7}{3 \times 2 \times 1} = 84. The routes agree.

Answer

(a) 504 ways; (b) 84 ways. Giving 504 for the committee is the usual slip: it counts the same three people six times.

Example 2: Arranging letters with repeats

How many different strings can be made by arranging all the letters of the word BALLOON?

  1. Count the letters: B, A, L, L, O, O, N is 7 letters, with L twice and O twice.

  2. Treat them as different first: 7!=50407! = 5040. Each string is counted 2!2! times for the L's and 2!2! times for the O's, so divide: 50402×2=1260\frac{5040}{2 \times 2} = 1260.

  3. Second route, placing letters group by group: choose 2 of the 7 positions for the L's, (72)=21\binom{7}{2} = 21; then 2 of the remaining 5 for the O's, (52)=10\binom{5}{2} = 10; then put B, A, N in the last 3 places in 3!=63! = 6 ways.

  4. 21×10×6=126021 \times 10 \times 6 = 1260. The routes agree.

Answer

1260 strings. The tempting wrong answer is 7!=50407! = 5040, which treats the two L's and the two O's as different letters.

Example 3: A selection with repetition

A bakery sells 4 kinds of pastry and has plenty of each. A customer buys a box of 6 pastries; only how many of each kind matters. How many different boxes are possible?

  1. Order does not matter (it is a box) and a kind can be chosen many times: unordered, with repetition, n=4n = 4 kinds and k=6k = 6 items.

  2. Stars and bars: 6 stars for the pastries and 4−1=34 - 1 = 3 bars to split them into the four kinds, so 9 places in a row.

  3. Choose which 3 places hold bars: (93)=9×8×76=84\binom{9}{3} = \frac{9 \times 8 \times 7}{6} = 84. This is the same as (96)\binom{9}{6}, the formula's (n+k−1k)\binom{n+k-1}{k}.

  4. Check the method on a case you can list: 2 kinds and 3 pastries gives (43)=4\binom{4}{3} = 4, and indeed the boxes are (3,0),(2,1),(1,2),(0,3)(3,0), (2,1), (1,2), (0,3).

Answer

84 boxes. Answers of 464^6 (ordered with repetition) or (64)\binom{6}{4} (a misplaced formula) come from skipping the two questions.

Common traps

  • Using permutations for a group with no roles

    A team, a committee, a hand of cards or a set of chosen topics has no order. If you multiply n(n−1)⋯n(n-1)\cdots for such a group, you count every group k!k! times. Ask "would swapping two chosen items give a different outcome?" If not, divide by k!k!.

  • Adding where you should multiply

    Stages that happen one after another (a first digit and then a second) multiply. Only separate cases that cannot happen together add. "9+8+79 + 8 + 7 ways to fill three posts" is never right: each choice of president is followed by 8 choices of secretary.

  • Forgetting that letters or objects repeat

    Before applying n!n! to an arrangement, scan for identical items. Two identical letters halve the count; three identical letters divide it by 6. Missing a repeat gives an answer that is too large by an exact factor, and a multiple-choice question may well offer that answer.

  • Applying nkn^k when repetition is not allowed

    nkn^k assumes every place can take any of the nn options again. People, seats and prizes that go to different winners cannot repeat, so the count falls by one at each stage: n(n−1)(n−2)⋯n(n-1)(n-2)\cdots.

Check yourself

Answer each question before you open its answer.

Question 1: Chair and deputy

Permutations and combinations

A board of 10 people must choose a chair and a deputy chair, who must be different people. In how many ways can this be done?

  1. A.19
  2. B.45
  3. C.90
  4. D.100
Show the answer

Answer: C. 90

Working

Order matters (two different roles) and nobody may hold both. There are 10 choices for the chair and then 9 for the deputy, so 10×9=9010 \times 9 = 90. Check: the 45 unordered pairs, each with 2 ways to assign the roles, give 45×2=9045 \times 2 = 90.

Why the other options are wrong

  • A. Adds the 10 choices of chair and the 9 of deputy. The two choices happen one after the other, so they multiply.
  • B. This is (102)\binom{10}{2}, the number of unordered pairs. Chair and deputy are different roles, so Ada as chair with Ben as deputy differs from the reverse.
  • D. This is 10210^2, which lets the same person be both chair and deputy.

What carries over

Different roles mean order matters: multiply the shrinking choices and do not divide.

Question 2: Arranging ROTOR

Permutations and combinations

How many different strings can be formed by arranging all five letters of the word ROTOR?

  1. A.10
  2. B.30
  3. C.60
  4. D.120
Show the answer

Answer: B. 30

Working

ROTOR has 5 letters: R twice, O twice, T once. The count is 5!2! 2!=1204=30\frac{5!}{2!\,2!} = \frac{120}{4} = 30. Second route: place the R's in (52)=10\binom{5}{2} = 10 ways, the O's in (32)=3\binom{3}{2} = 3 ways, and T in the last place: 10×3=3010 \times 3 = 30.

Why the other options are wrong

  • A. This is (52)\binom{5}{2}, the number of ways to place the two R's only. The O's and the T still have (32)=3\binom{3}{2} = 3 ways to fill the remaining places.
  • C. Divides 5!5! by only one 2!2!, as if only one letter were repeated. Both R and O appear twice.
  • D. This is 5!5!, which treats the two R's and the two O's as different letters.

What carries over

Divide by the factorial of each group of identical letters, and check by placing the groups one at a time.

Question 3: Three scoops from five flavours

Permutations and combinations

An ice-cream shop offers 5 flavours. A cup holds 3 scoops, the order of the scoops does not matter, and a flavour may be chosen more than once. How many different cups are possible?

  1. A.10
  2. B.35
  3. C.60
  4. D.125
Show the answer

Answer: B. 35

Working

Unordered with repetition: n=5n = 5 flavours, k=3k = 3 scoops, so (5+3−13)=(73)=7×6×56=35\binom{5 + 3 - 1}{3} = \binom{7}{3} = \frac{7 \times 6 \times 5}{6} = 35. Check by cases: three different flavours, (53)=10\binom{5}{3} = 10; two scoops of one flavour and one of another, 5×4=205 \times 4 = 20; all three the same, 5. Total 10+20+5=3510 + 20 + 5 = 35.

Why the other options are wrong

  • A. This is (53)\binom{5}{3}, which forbids choosing a flavour twice. The stem allows repeats.
  • C. This is 5×4×35 \times 4 \times 3, which treats the scoops as ordered and forbids repeats: wrong on both counts.
  • D. This is 535^3, which allows repeats but counts the order of the scoops, so strawberry then lemon is counted apart from lemon then strawberry.

What carries over

For an unordered selection with repeats, use stars and bars and check by splitting into cases.

Key points

  • Ask first: does order matter, and can a choice repeat? The answers pick the formula.

  • Ordered without repeats: n(n−1)⋯(n−k+1)n(n-1)\cdots(n-k+1); with repeats: nkn^k.

  • Unordered without repeats: (nk)\binom{n}{k}; with repeats: (n+k−1k)\binom{n+k-1}{k}.

  • Identical objects in a row: n!a! b!⋯\frac{n!}{a!\,b!\cdots}, dividing by each group of repeats.

All questions here are original and written for UniExamer; none comes from the test maker.

Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.

Bu konuyu çalış

Bu beceride çözümlü açıklamalarla yeni sorular. Çalışma için Single Exam Pass veya Plus gerekir.