Skip to main content
NSWMaths Extension 1Syllabus dot point

How do you count the number of ordered ways to make a sequence of choices, and how does allowing or forbidding repetition change the count?

Use the multiplication principle to count ordered selections across stages, count ordered selections with repetition as n^r and without repetition as nPr = n!/(n-r)!, and apply restriction techniques: deal with the difficulty first, fix a position, keep items together as a block, and count 'at least one' by the complement

A first-contact answer to the HSC Maths Extension 1 dot point on counting ordered selections. The multiplication principle across stages, ordered selections with repetition (n^r) versus without (nPr), and the restriction moves: deal with the difficulty first, fix a position, keep items together as a block, and count at-least-one by the complement, using the filled-box slot method.

Generated by Claude Opus 4.816 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. How exam questions ask about this dot point

What this dot point is asking

This is the dot point where counting really begins. The factorial notation page gave you the arithmetic engine, n!n! and the unrolling rule; here you learn the principle that turns a real counting question into a product of factors. NESA wants three connected skills. First, the multiplication principle: when a selection is made in independent stages, you multiply the number of choices at each stage. Second, you must tell apart the two kinds of ordered selection, with repetition, which gives a power nrn^r, and without repetition, which gives a permutation nPr=n!(nr)!^{n}P_{r} = \dfrac{n!}{(n-r)!}. Third, and where most of the marks and most of the mistakes live, you must handle restrictions: deal with the hardest restriction first, fix a forced position, keep items together by treating them as a block, and count an "at least one" condition through its complement.

The single tool that makes all of this visible is the filled-box slot diagram: draw one box for each stage, write the number of choices inside it, and multiply across. Almost every counting question on this dot point can be set out as boxes, and a marker can follow your reasoning at a glance.

The answer

The multiplication principle: multiply the choices across stages

Suppose a task is carried out in a sequence of stages, and the choice made at each stage does not change how many choices are available at the others. Then the number of ways to complete the whole task is the product of the numbers of choices at the separate stages. This is the multiplication principle, and it is the backbone of the entire topic.

Here is the intuition, not just the rule. Imagine choosing an outfit: a shirt from 55, then trousers from 44, then shoes from 33, then a cap from 22. For each of the 55 shirts there are 44 choices of trousers, giving 5×4=205 \times 4 = 20 shirt-and-trousers combinations. Each of those 2020 can be paired with any of the 33 pairs of shoes, giving 20×3=6020 \times 3 = 60, and each of those with any of the 22 caps, giving 60×2=12060 \times 2 = 120. Adding would be wrong, because the stages are not alternatives; they happen together, one after the other, and "and" between independent stages means multiply.

One outfit: a choice at each stageindependent choices multiply across the stages. 5 times 4 times 3 times 2 = 120 outfitsOne outfit: a choice at each stageindependent choices multiply across the stages5shirtsshirt×4pairstrousers×3pairsshoes×2capscap5 × 4 × 3 × 2 = 120 outfits

Ordered selections WITH repetition: the power n^r

Now narrow to the most common kind of staged choice: you build an ordered arrangement of rr positions, and at every position you may pick any of the same nn objects, repeats allowed. Because choosing an object never removes it from the pool, every one of the rr boxes keeps all nn choices, and the multiplication principle gives

n×n××nr boxes=nr.\underbrace{n \times n \times \dots \times n}_{r \text{ boxes}} = n^r.

The clearest example is digits. How many three-digit numbers can be made from the digits 1,2,3,4,51, 2, 3, 4, 5 if a digit may be used more than once? Each of the three positions is free to be any of the 55 digits, so the count is 5×5×5=53=1255 \times 5 \times 5 = 5^3 = 125.

3-digit number from 1,2,3,4,5, repeats allowedevery digit is free, so each box still has 5 choices. 5 times 5 times 5 = 5³ = 1253-digit number from 1,2,3,4,5, repeats allowedevery digit is free, so each box still has 5 choices5digitshundreds×5digitstens×5digitsunits5 × 5 × 5 = 5³ = 125

The same shape covers a four-digit PIN (104=1000010^4 = 10\,000 possibilities, since each of the four positions is any of the ten digits), and a string of 88 binary digits (28=2562^8 = 256). Two warnings. The base nn is the number of objects you choose from; the exponent rr is the number of positions you fill. It is easy to write rnr^n by reflex; always ask "how many choices per box (nn) and how many boxes (rr)?" and the answer is choices-to-the-power-of-boxes, nrn^r.

Ordered selections WITHOUT repetition: the permutation nPr

Change one word: now repeats are not allowed. As soon as an object is used it leaves the pool, so each box has one fewer choice than the box before it. Filling rr positions from nn distinct objects gives

n×(n1)×(n2)××(nr+1)r factors.\underbrace{n \times (n-1) \times (n-2) \times \dots \times (n-r+1)}_{r \text{ factors}}.

That descending product of exactly rr factors, starting at nn, is the permutation nPr^{n}P_{r}. Using the unrolling rule from the factorial page, multiply and divide by (nr)!(n-r)! to write it compactly:

nPr=n(n1)(nr+1)=n!(nr)!.^{n}P_{r} = n(n-1)\cdots(n-r+1) = \frac{n!}{(n-r)!}.

A permutation is an ordered selection without repetition, which is why "arrangement", "in order", "first, second, third" and "no repeats" are its signal words. For instance, the number of three-letter words with no repeated letter taken from the 88 letters A,B,C,D,E,F,G,HA, B, C, D, E, F, G, H is

8P3=8×7×6=336=8!5!.^{8}P_{3} = 8 \times 7 \times 6 = 336 = \frac{8!}{5!}.

3-letter word from 8 letters, no repeatseach letter used removes one option from the next box. 8 times 7 times 6 = 336 =  ⁷P₃3-letter word from 8 letters, no repeatseach letter used removes one option from the next box8letters1st×7left2nd×6left3rd8 × 7 × 6 = 336 =  ⁷P₃

Two special cases tie this back to factorials. Arranging all nn objects means r=nr = n, and

nPn=n!0!=n!,^{n}P_{n} = \frac{n!}{0!} = n!,

which is exactly the "arrange nn distinct objects in a row" count, and the reason the convention 0!=10! = 1 is forced. At the other end, nP1=n^{n}P_{1} = n and nP0=1^{n}P_{0} = 1 (one way to choose nothing). On a slot diagram, nrn^r has the same number in every box; nPr^{n}P_{r} has a number that steps down by one each box. That visual difference is the fastest way to keep the two apart.

Restriction technique 1: deal with the difficulty first

Real questions add conditions: a digit cannot be zero, a particular person must sit at one end, two people must be together. The master rule is to deal with the most restricted box first, while it still has its restriction, and fill the free boxes afterwards. If you fill the easy boxes first you can use up an object that the restricted box needed, and miscount.

The classic case is the leading digit. How many three-digit numbers (no repeated digits) can be made from 0,1,2,,90, 1, 2, \dots, 9? The hundreds digit cannot be 00, or the "number" is really two digits, so deal with it first: 99 choices (11 to 99). The tens digit may now be 00 but not the hundreds digit already used, so 99 choices, and the units digit has 88 left. The count is 9×9×89 \times 9 \times 8, with the restricted box handled before the others.

Restriction technique 2: fix a forced position

When an object is forced into a specific position, place it first in the 11 way it is allowed, then count the remaining free positions normally. Fixing a position simply removes one box (it contributes a factor of 11) and shrinks the pool for the rest.

For example, 66 people queue and Maya must stand at the front. Put Maya in front (11 way), then arrange the other 55 people in the remaining 55 places: 1×5!=1201 \times 5! = 120. As a sanity check, Maya is equally likely to be in any of the 66 places, so exactly 16\tfrac{1}{6} of the 720720 unrestricted queues have her at the front, and 16×720=120\tfrac{1}{6} \times 720 = 120.

Restriction technique 3: keep items together as a block

When certain objects must be together, glue them into a single block and arrange the block among the other items. Then, separately, arrange the objects inside the block, because they can still be ordered among themselves. The two counts multiply.

Take 66 people in a row where two friends, AA and BB, insist on standing next to each other. Treat AA and BB as one block, leaving 55 items (the block plus the other 44 people) to arrange in 5!5! ways. Inside the block, AA and BB can be in 2!2! orders (ABAB or BABA). By the multiplication principle the answer is 5!×2!=120×2=2405! \times 2! = 120 \times 2 = 240.

Two friends kept together: the block methodGlue the two friends A and B into one block, leaving five items to arrange in five factorial ways, then multiply by two factorial for the two internal orders AB and BA. The total is five factorial times two factorial, which is 240.Two friends together: glue them into one block6 people become 5 items, then order the pair inside5block + 4[AB] glued×4items left×3items left×2items left×1items left× 2!order AB or BA5! × 2! = 120 × 2 = 240

If a block of kk items must stay together, the internal factor is k!k!. The same idea, run the other way, also handles "must be separated": that is usually fastest by the complement, next.

Restriction technique 4: "at least one" via the complement

"At least one" almost never wants a direct count, because it splits into awkward cases (exactly one, exactly two, ...). Instead count the complement, the arrangements that have none of the wanted feature, and subtract from the total:

(at least one)=(total)(none).(\text{at least one}) = (\text{total}) - (\text{none}).

How many four-digit numbers from the digits 11 to 99 (repetition allowed) contain at least one 77? The total is 94=65619^4 = 6561. The numbers with no 77 use only the other 88 digits, so there are 84=40968^4 = 4096 of them. Therefore the numbers with at least one 77 number

9484=65614096=2465.9^4 - 8^4 = 6561 - 4096 = 2465.

At least one seven, counted by the complementCounting four-digit numbers from the digits one to nine with at least one seven. The total with repetition allowed is nine to the fourth. The numbers with no seven use only eight digits, giving eight to the fourth. Subtracting, nine to the fourth minus eight to the fourth equals 2465.“At least one 7” = all numbers − numbers with no 7all9×9×9×9= 9⁴ = 6561no 78×8×8×8= 8⁴ = 4096at least one 7 = 6561 − 4096 = 2465

The complement also cracks "must be separated": count all arrangements, subtract the ones where the forbidden items are together (found by the block method). The trigger words are at least one, at most, not all, and must be apart.

How exam questions ask about this dot point

The phrasing tells you which tool to reach for. Match the wording to the move:

  • "How many outfits / meals / outcomes...", several independent choices. Multiplication principle: one box per stage, multiply across.
  • "...digits/letters may be repeated", "with replacement", "a PIN", "a binary string". Ordered with repetition: each box keeps all nn choices, count nrn^r. Read off nn = choices per box, rr = number of boxes.
  • "...no digit repeated", "arrange rr of the nn in order", "first, second, third", "without replacement". Permutation nPr=n!(nr)!^{n}P_{r} = \dfrac{n!}{(n-r)!}; each box drops by one.
  • "In how many ways can nn people/books be arranged in a row?" All-objects permutation nPn=n!^{n}P_{n} = n!.
  • "...the first digit cannot be 00", "must not start with...". Deal with the difficulty first: fill the restricted box before the free ones.
  • "...XX must sit at the end / be first". Fix that position (11 way), then arrange the rest.
  • "...must sit together / be next to each other / as a group". Block method: arrange the block among the others (×\times), then arrange inside the block (k!k!).
  • "...at least one...", "at most...", "not all...", "must be separated". Count the complement and subtract from the total.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation2 marksA pizza shop lets you build one pizza by choosing one of 44 bases, then one of 33 sauces, then one of 55 toppings. How many different pizzas can be ordered? Set out the choice at each stage.
Show worked solution →

Identify the stages and the choices at each. The pizza is built in three independent stages: the base (44 choices), then the sauce (33 choices), then the topping (55 choices). No choice limits any other, so the multiplication principle applies.

Multiply the choices across the stages. Filling one box per stage,

4bases×3sauces×5toppings=60.\underbrace{4}_{\text{bases}} \times \underbrace{3}_{\text{sauces}} \times \underbrace{5}_{\text{toppings}} = 60.

Answer. There are 6060 different pizzas.

foundation2 marks(i) How many three-digit numbers can be formed from the digits 1,2,3,4,51, 2, 3, 4, 5 if a digit may be repeated? (ii) How many can be formed if no digit may be repeated?
Show worked solution →

Part (i): repetition allowed, so every box keeps all five choices. Each of the three positions can be any of the 55 digits, independently of the others:

5×5×5=53=125.5 \times 5 \times 5 = 5^3 = 125.

Part (ii): no repetition, so each box loses one option. The hundreds digit has 55 choices; once it is used the tens digit has 44 left, and the units digit has 33 left:

5×4×3=60.5 \times 4 \times 3 = 60.

This is the permutation 5P3=5!2!=60^{5}P_{3} = \dfrac{5!}{2!} = 60.

Answer. (i) 125125; (ii) 6060.

core3 marksIn how many ways can 66 students stand in a queue if (i) there are no restrictions, and (ii) a particular student, Maya, must stand at the front?
Show worked solution →

Part (i): arrange all 66 distinct students. Filling the queue one place at a time gives 6×5×4×3×2×16 \times 5 \times 4 \times 3 \times 2 \times 1, that is

6!=720.6! = 720.

Part (ii): deal with the restriction first by fixing the front. Place Maya at the front in 11 way, then arrange the other 55 students in the remaining 55 places:

1×5!=1×120=120.1 \times 5! = 1 \times 120 = 120.

Check the fraction this should be. Maya is equally likely to occupy any of the 66 places, so a fraction 16\tfrac{1}{6} of all queues have her at the front: 16×720=120\tfrac{1}{6} \times 720 = 120, which agrees.

Answer. (i) 720720; (ii) 120120.

core3 marksSeven different books are arranged in a row on a shelf. In how many of these arrangements are two particular books (a dictionary and a thesaurus) next to each other?
Show worked solution →

Glue the two particular books into one block. Treat the dictionary and thesaurus as a single item. There are then 66 items to arrange in a row: the block, plus the other 55 books.

Order the 66 items. These can be arranged in

6!=720 ways.6! = 720 \text{ ways.}

Order the two books inside the block. Within the block the dictionary and thesaurus can be in either order, 2!2! ways. By the multiplication principle,

6!×2!=720×2=1440.6! \times 2! = 720 \times 2 = 1440.

Answer. There are 14401440 arrangements with the two books together.

exam3 marksA code is formed by writing 33 different letters chosen from AA to ZZ, followed by 22 different digits chosen from 00 to 99. (Letters cannot repeat each other; digits cannot repeat each other.) How many such codes are possible?
Show worked solution →

Count the letter block as an ordered selection without repetition. Three different letters in order from 2626 is

26P3=26×25×24=15600.^{26}P_{3} = 26 \times 25 \times 24 = 15600.

Count the digit block the same way. Two different digits in order from 1010 is

10P2=10×9=90.^{10}P_{2} = 10 \times 9 = 90.

Multiply the two independent blocks. The letters and digits are chosen independently, so

15600×90=1404000.15600 \times 90 = 1\,404\,000.

Answer. There are 14040001\,404\,000 possible codes.

exam4 marksFive-digit numbers are formed from the digits 00 to 99 with repetition allowed, but the first digit cannot be 00 (so the number really has five digits). How many of these numbers contain at least one 55?
Show worked solution →

Count the total number of valid five-digit numbers. The first digit avoids 00, so it has 99 choices; each of the other four digits has all 1010 choices:

9×104=90000.9 \times 10^4 = 90\,000.

Switch to the complement: count those with no 55 at all. Now the first digit must avoid both 00 and 55, leaving 88 choices; each remaining digit avoids only 55, leaving 99 choices:

8×94=52488.8 \times 9^4 = 52\,488.

Subtract the complement from the total. The numbers with at least one 55 are everything except the numbers with no 55:

9000052488=37512.90\,000 - 52\,488 = 37\,512.

Why the complement is the right move. Counting "at least one 55" directly forces messy cases (exactly one 55, exactly two, and so on); the complement "no 55" is a single clean slot count, so subtracting is far safer.

Answer. 3751237\,512 of the numbers contain at least one 55.

Related dot points