girgit.org

Permutations and Combinations

Filling empty places: PINs, number plates and digits

The big ideaDraw one empty box for each place, write in each box how many choices it has, then multiply; the only questions are whether a choice can be used again and which box to fill first.

In simple words

To make a 3-digit number, draw 3 boxes. Ask the first box: how many digits could go here? Write that number in it. Then ask the next box the same, remembering what you already used. When every box has its number, multiply them. If a digit may come back again, every box gets the full count. If it may not, each box gets one fewer than the box before.

The box method

Most counting questions about codes, numbers and words turn into "fill these empty places". Draw the places, fill in the number of choices for each, and multiply using the multiplication principle.

Worked example

How many 4-letter "words" (any string of letters, with or without meaning) can be made from the letters of the name RANI?

  1. No repetition (each letter used once): first place 4 choices, second 3 left, third 2, last 1. Total \( 4 \times 3 \times 2 \times 1 = 24 \).
  2. Repetition allowed (RRRR is fine): every place has all 4 choices. Total \( 4 \times 4 \times 4 \times 4 = 256 \).

So the first question to ask is always: with repetition or without repetition? A PIN, a number plate or a password usually allows repeats. Letters of a given word, or people in seats, usually do not.

Guess first: PIN length

A 4-digit ATM PIN uses digits 0 to 9, and digits may repeat. A 6-digit PIN is only two digits longer. Roughly how many times as many PINs does the 6-digit version allow? About 1.5 times? 2 times? Decide before you open the answer.

See what happens
4 digits: \( 10^4 = 10\,000 \) PINs. 6 digits: \( 10^6 = 10\,00\,000 \) PINs. That is 100 times as many, not 1.5 times. Each extra place multiplies the count by 10, so two extra places multiply it by \( 10 \times 10 \). Counting grows by multiplying, not by adding. This is why a longer password is so much harder to guess.

Check your guess, then explore: change the length, the digits and the rules, and watch every box and the chart respond.

Fill the fussy box first

Sometimes one place has a rule. Fill that place first, then the others.

  • Even numbers must end in 0, 2, 4, 6 or 8, so fill the units place first.
  • No number starts with 0: "042" is really the 2-digit number 42. So the first place cannot take 0.

Worked example

How many 3-digit even numbers can be made from the digits 1, 2, 3, 4, 5, 6, 7 if no digit repeats?

  1. Units place (the fussy one): 2, 4 or 6, so 3 ways.
  2. Hundreds place: any of the 6 digits not used yet: 6 ways.
  3. Tens place: 5 digits are left: 5 ways.
  4. Total: \( 3 \times 6 \times 5 = 90 \).

Worked example

How many 3-digit numbers have all their digits different?

  1. Hundreds place: 1 to 9 (not 0), so 9 ways.
  2. Tens place: 0 is now allowed, but one digit is used: 9 ways.
  3. Units place: 8 ways.
  4. Total: \( 9 \times 9 \times 8 = 648 \).

Number plates

An Indian number plate looks like MH 12 AB 1234: a state code, a district number, two letters and four digits. In one district (state and district fixed), how many plates can be made, if letters and digits may repeat?

Two letter places with 26 choices each, four digit places with 10 choices each: \( 26 \times 26 \times 10 \times 10 \times 10 \times 10 = 67\,60\,000 \) plates.

"At least" means add the cases

A ship signals with coloured flags hung one below the other. It has 4 different flags. How many signals use at least 2 flags? A signal can have 2, 3 or 4 flags, and these are separate cases, so count each and add:

  • 2 flags: \( 4 \times 3 = 12 \)
  • 3 flags: \( 4 \times 3 \times 2 = 24 \)
  • 4 flags: \( 4 \times 3 \times 2 \times 1 = 24 \)

Total: \( 12 + 24 + 24 = 60 \) signals.

Don't mix these up

  • With repetition: \( n \times n \times \dots \), the same number in every box. Without: \( n \times (n-1) \times (n-2) \times \dots \).
  • Fill the restricted place first. If you fill the free places first, they may use up the very digits the fussy place needs, and its number of choices is no longer one fixed number.

Try it. (a) How many 3-letter codes can be made from the 26 capital letters if letters may repeat? (b) Mobile numbers in a scheme have 5 digits, start with 98 and use no digit twice. How many are there? (c) How many 2-digit odd numbers can be made from 1, 2, 3, 4, 5 if digits may repeat?

Answer
(a) \( 26^3 = 17\,576 \). (b) 9 and 8 are used, so the last three places have \( 8 \times 7 \times 6 = 336 \) ways. (c) Units place: 1, 3 or 5 (3 ways); tens place: any of 5. \( 3 \times 5 = 15 \).

Words to know

With repetition
A choice can be used again in another place.
Without repetition
Each object can be used only once.
Vacant place
An empty box waiting to be filled.
Restricted place
A box with a rule, such as "must be even" or "cannot be 0". Fill it first.
Cases
Separate situations that never overlap; add their counts.

How many 3-digit numbers can be formed from 2, 4, 6, 8 if digits may repeat?

  1. 24
  2. 64
  3. 12

How many 4-digit numbers can be made from 0, 1, 2, 3, 4, 5 with no digit repeated?

  1. 360
  2. 300
  3. 120

A password is 2 letters (A to Z) followed by 2 digits, with repeats allowed. Which expression counts them?

  1. \( 26 + 26 + 10 + 10 \)
  2. \( 26 \times 25 \times 10 \times 9 \)
  3. \( 26^2 \times 10^2 \)