Skip to main content
NSWMaths Extension 1Syllabus dot point

When some of the objects being arranged are identical, why does plain n! overcount, and how do you divide out the repeats to count only the genuinely different arrangements?

Count the distinct arrangements of n objects when some are identical: divide n! by the factorial of each repeat count to get n! over r1! r2! ... rk!, and handle the two-type special case where every object is one of two kinds (2^n arrangements in all, or choose the positions of one kind with a combination)

Why arranging objects with repeats needs n! over r1! r2! ... rk!: plain n! overcounts because swapping identical objects changes nothing, so you divide by the factorial of each repeat count. Covers word arrangements like PRESSES, the binary two-type case (2^n or choose positions with a combination), cases, and separating identical items.

Generated by Claude Opus 4.818 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

The multiplication principle and ordered selections page counted arrangements of objects that were all different: nn distinct objects line up in n!n! ways, and you choose and order rr of them in nPr^{n}P_{r} ways. Every one of those counts quietly assumed the objects were distinguishable, so that swapping any two of them produced a genuinely new arrangement. This page removes that assumption. When some of the objects are identical, swapping two of them produces the same arrangement, and the old counts overcount.

The whole dot point is one idea and one formula. Plain n!n! counts every ordering as if the objects were all different; to fix it you divide by the factorial of each repeat count, because the identical copies of one type can be permuted among themselves in that many ways without changing anything. That gives the formula

n!r1!r2!rk!,\frac{n!}{r_1! \, r_2! \cdots r_k!},

where r1,r2,,rkr_1, r_2, \dots, r_k are how many there are of each repeated type. The second half of the dot point is the two-type special case, where every object is one of just two kinds (heads or tails, on or off, red or green). It has two faces that are really the same count: there are 2n2^n arrangements in all, and the arrangements with exactly rr of one kind number nCr^{n}C_{r}. Reading the wording, naming the repeats, and laying the division out so a marker can follow it is the entire skill.

The answer

Why plain n! overcounts, and the dividing-out fix

Take the word PRESSES\text{PRESSES}. It has 77 letters, so if the letters were all different there would be 7!=50407! = 5040 arrangements. But they are not all different: there are three S\text{S}s and two E\text{E}s. Pick any one arrangement, say PRESSES\text{PRESSES} itself, and imagine the three S\text{S}s wore tiny labels S1,S2,S3\text{S}_1, \text{S}_2, \text{S}_3. Those three labelled S\text{S}s could be permuted among their three positions in 3!=63! = 6 ways, and all six labelled versions spell the same word once the labels come off. So the count 7!7! has counted this one word 66 times over. The same happens with the two E\text{E}s: each word is counted 2!=22! = 2 times because the E\text{E}s can swap. The two overcounts are independent and multiply, so every genuine word has been counted 3!×2!=123! \times 2! = 12 times. Dividing it out,

7!3!×2!=504012=420.\frac{7!}{3! \times 2!} = \frac{5040}{12} = 420.

That is the engine of the whole topic: you are not counting fewer things, you are correcting a count that listed each thing too many times. The number you divide by is exactly "how many ways the identical copies can be shuffled without anyone noticing".

Counting distinct arrangements of PRESSES from its letter typesThe seven letters of PRESSES split into four types: one P, one R, two Es and three Ss. The number of distinct arrangements is seven factorial divided by the product of the repeat factorials, one factorial times one factorial times two factorial times three factorial, which is seven factorial over two factorial times three factorial, equal to 420.PRESSES: divide 7! by the repeats of each letterletter typehow many (r)overcount r!P11! = 1R11! = 1E22! = 2S33! = 6total letters n = 7divide by 3! × 2!arrangements =7!3! × 2!= 420

The table is the layout to copy into an exam. List every letter type, its repeat count rr, and the overcount r!r! it causes; the bottom row reads off n=7n = 7 and the divisor 3!×2!3! \times 2!. A type that appears once, like P\text{P} and R\text{R} here, contributes 1!=11! = 1 and so changes nothing; you can leave it in or out of the divisor, but listing it stops you from miscounting nn.

A mix of some distinct and some repeated

The formula does not need every letter to repeat; it just divides by the repeats that exist. Consider arranging the 66 letters of TOMATO\text{TOMATO}. There are two T\text{T}s and two O\text{O}s, while M\text{M} and A\text{A} appear once each. With n=6n = 6 and repeat counts 22 and 22,

6!2!×2!=7204=180.\frac{6!}{2! \times 2!} = \frac{720}{4} = 180.

If a question changes one object to make it distinct, the divisor loses a factor and the count grows. Cambridge's wine-glass example is the model: three identical wine glasses and five identical tumblers in a row give 8!3!×5!=56\dfrac{8!}{3! \times 5!} = 56 patterns, because there are only two types. But if one wine glass becomes clearly chipped and two of the five tumblers are replaced by a matching different pair, the eight objects split into types of sizes 2,1,3,22, 1, 3, 2 (two plain wine glasses, one chipped glass, three original tumblers, two replacement tumblers), and the count rises to

8!2!×1!×3!×2!=1680.\frac{8!}{2! \times 1! \times 3! \times 2!} = 1680.

Making objects more distinct always increases the count, because there is less to divide out. The extreme is all eight different, giving the full 8!=403208! = 40\,320.

Words that omit or include a letter: split into cases

A common twist asks for words shorter than the full set, for example "how many six-letter words use the letters of PRESSES\text{PRESSES}?" Now you are not arranging all seven letters, so you cannot write a single 7!\dfrac{7!}{\dots}. The clean route is to split into cases by which letter is left out, count each case with the formula, and add. Omitting one letter leaves six letters to arrange, and the available repeats depend on which type you dropped.

  • Omit an S\text{S}: the six letters are P,R,E,E,S,S\text{P}, \text{R}, \text{E}, \text{E}, \text{S}, \text{S} (two E\text{E}s, two S\text{S}s), giving 6!2!×2!=180\dfrac{6!}{2! \times 2!} = 180.
  • Omit an E\text{E}: the six letters are P,R,E,S,S,S\text{P}, \text{R}, \text{E}, \text{S}, \text{S}, \text{S} (three S\text{S}s), giving 6!3!=120\dfrac{6!}{3!} = 120.
  • Omit the P\text{P}: the six letters are R,E,E,S,S,S\text{R}, \text{E}, \text{E}, \text{S}, \text{S}, \text{S} (two E\text{E}s, three S\text{S}s), giving 6!2!×3!=60\dfrac{6!}{2! \times 3!} = 60.
  • Omit the R\text{R}: by the same shape, 6!2!×3!=60\dfrac{6!}{2! \times 3!} = 60.

The cases drop different letters and so cannot overlap, so you add: 180+120+60+60=420180 + 120 + 60 + 60 = 420. (It is a pleasant coincidence that this equals the full seven-letter count; the two questions are different and the equality is not a rule.) The lesson is that a short-word question over a multiset is a cases question: dropping a repeated letter changes the divisor, so you must treat each dropped type separately.

The two-type special case: 2^n and choosing positions

When every object is one of just two kinds, the topic has a particularly clean shape that the next sections of the course lean on heavily. Picture a motorist passing 88 sets of traffic lights, each red or green; or an opinion poll of 88 yes/no questions; or 88 switches each up or down. Each setup is a "word" of length 88 in a two-letter alphabet.

There are two counts to know, and they are two views of the same arrangements.

All patterns: 2n2^n. Each of the nn positions is filled independently with one of two symbols, so by the multiplication principle the number of patterns is 2×2××2=2n2 \times 2 \times \cdots \times 2 = 2^n. For the eight lights, 28=2562^8 = 256.

Exactly rr of one kind: a combination. Fix how many are red, say rr, and a pattern is determined entirely by which rr of the nn positions are red; the rest are green. That is a selection of positions, nCr^{n}C_{r}. Equivalently it is the identical-elements formula for a word of rr reds and nrn - r greens,

n!r!(nr)!=nCr.\frac{n!}{r! \, (n - r)!} = {}^{n}C_{r}.

For exactly 33 red out of 88, this is 8C3=8!3!×5!=56^{8}C_{3} = \dfrac{8!}{3! \times 5!} = 56.

The two-type special case: 8 lights each red or greenEight positions each filled with one of two symbols, red or green. Allowing every pattern gives two to the power eight, which is 256. Fixing exactly three of the eight positions to be red is choosing 3 of the 8 positions, eight choose three, which equals 56.Two types only: 8 lights, each red or greenRGGRGRGGeach position is one of 2 choices → a pattern like R G G R G R G Gany pattern2⁸ = 2562 choices, 8 timesexactly 3 red⁸C₃ = 56choose 3 of 8 positionsr reds in n lights = n! ÷ (r! (n−r)!)

Two facts fall straight out of this picture and are worth carrying forward. First, symmetry: choosing the rr reds is the same as choosing the nrn - r greens, so nCr=nCnr^{n}C_{r} = {}^{n}C_{n-r}. That is why "exactly 33 of 88 red" and "exactly 55 of 88 red" give the same answer, 5656; a Cambridge exercise asks precisely this. Second, the row adds to 2n2^n: summing the exact-rr counts over every rr from 00 to nn recovers the total, r=0nnCr=2n\sum_{r=0}^{n} {}^{n}C_{r} = 2^n, since every pattern has some number of reds. For n=8n = 8 the eight-plus-one counts 1,8,28,56,70,56,28,8,11, 8, 28, 56, 70, 56, 28, 8, 1 sum to 256256. You meet nCr^{n}C_{r} formally on the combinations page; here it is just "how many words of rr of one letter and nrn - r of the other".

Separating identical items, using the complement

"Must be separated" works exactly as it does for distinct items, with one simplification: an identical pair has no internal order to track. To count arrangements where two identical items are apart, count the total, then subtract the arrangements where they are together (found by gluing them into one block), because "apart" is the complement of "together".

Take BANANA\text{BANANA}, with A\text{A} three times and N\text{N} twice. The total number of arrangements is 6!3!×2!=60\dfrac{6!}{3! \times 2!} = 60. For the unwanted "two N\text{N}s together", glue the two N\text{N}s into a single block; the items to arrange are that block plus A,A,A,B\text{A}, \text{A}, \text{A}, \text{B}, that is 55 items with A\text{A} repeated three times, giving 5!3!=20\dfrac{5!}{3!} = 20. The key subtlety is that the N\text{N} block contributes no internal 2!2!, because the two N\text{N}s are identical, so swapping them inside the block changes nothing. Subtracting,

6!3!×2!5!3!=6020=40\frac{6!}{3! \times 2!} - \frac{5!}{3!} = 60 - 20 = 40

arrangements have the N\text{N}s apart. Compare this with the distinct-letter version on the grouping, complement and cases page, where a together-block of two distinct letters does carry a ×2!\times 2!. Identical items drop that factor; distinct items keep it.

How exam questions ask about this dot point

The wording tells you which form of the count to use. Match the phrase to the move:

  • "...arrangements of the letters of the word \dots", "rearrange", "how many distinct words". The base case: write n!r1!rk!\dfrac{n!}{r_1! \cdots r_k!} with one factor for each repeated letter.
  • "...how many different numbers from the digits \dots", "patterns of identical and different objects". The same formula; the "letters" are digits or objects, and identical objects are the repeats.
  • "...each is red or green / yes or no / on or off", "how many possible answer sheets / patterns". Two-type case, all patterns: 2n2^n.
  • "...exactly rr are red / yes / heads", "rr of one kind and the rest the other". Two-type case, fixed count: nCr=n!r!(nr)!^{n}C_{r} = \dfrac{n!}{r! (n - r)!}.
  • "...what other number gives the same answer", "exactly rr versus exactly nrn - r". Symmetry nCr=nCnr^{n}C_{r} = {}^{n}C_{n-r}; the complementary count is identical.
  • "...mm-letter words from a word of nn letters" with m<nm < n. Cases by which letter type is omitted; arrange the remaining multiset and add the disjoint cases.
  • "...the two O\text{O}s (or two identical items) are separated / not together". Complement: total minus the "together" block count, with no internal 2!2! on the identical block.
  • "...vowels and consonants alternate" with repeats. Fix the alternating slot pattern, then apply the formula to each group separately and multiply.

Practice questions

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

foundation2 marksHow many distinct arrangements are there of all the letters of the word COMMITTEE\text{COMMITTEE}?
Show worked solution →

Count the letters and the repeats. COMMITTEE\text{COMMITTEE} has 99 letters. The repeats are M\text{M} twice, T\text{T} twice and E\text{E} twice; C\text{C}, O\text{O} and I\text{I} appear once each.

Divide n!n! by each repeat factorial. With n=9n = 9 and repeat counts 2,2,22, 2, 2,

9!2!×2!×2!=3628808=45360.\frac{9!}{2! \times 2! \times 2!} = \frac{362\,880}{8} = 45\,360.

Answer. There are 4536045\,360 distinct arrangements. Forgetting any one of the three 2!2! factors would multiply the answer by 22.

foundation2 marksThe six digits 2,2,5,5,5,82, 2, 5, 5, 5, 8 are used to form a six-digit number (every digit used once). How many different numbers can be formed?
Show worked solution →

Identify the repeats among the six digits. There are 66 digits, with 55 appearing three times and 22 appearing twice; 88 appears once.

Apply the formula. With n=6n = 6 and repeat counts 33 and 22,

6!3!×2!=72012=60.\frac{6!}{3! \times 2!} = \frac{720}{12} = 60.

Answer. There are 6060 different six-digit numbers. No digit is 00, so there is no leading-zero case to remove.

core3 marksA row of 1010 identical light switches is set up, and each switch is flicked either up or down. (i) In how many ways can the whole row be set? (ii) In how many of those settings are exactly 44 switches up?
Show worked solution →

Part (i): two choices at each of ten positions. Each switch is independently up or down, so by the multiplication principle the number of settings is

210=1024.2^{10} = 1024.

Part (ii): choose which positions are up. A setting with exactly 44 ups is fixed once you choose which 44 of the 1010 positions are up; the rest are down. That is a selection of positions,

10C4=10!4!×6!=210.^{10}C_{4} = \frac{10!}{4! \times 6!} = 210.

Same answer the two-type way. Treating the row as a word of 44 ups and 66 downs gives 10!4!×6!=210\dfrac{10!}{4! \times 6!} = 210, the identical count.

Answer. (i) 10241024 settings; (ii) 210210 of them.

core3 marksHow many five-letter words can be formed using five of the six letters of the word BANANA\text{BANANA}? (A 'word' is any arrangement; it need not be in a dictionary.)
Show worked solution →

See that one letter must be left out. BANANA\text{BANANA} has letters A\text{A} three times, N\text{N} twice and B\text{B} once. A five-letter word uses five of the six letters, so exactly one letter is omitted. Split into cases by which letter type is dropped.

Case: omit an A\text{A}. The remaining letters are B,A,A,N,N\text{B}, \text{A}, \text{A}, \text{N}, \text{N} (22 As, 22 Ns),

5!2!×2!=30.\frac{5!}{2! \times 2!} = 30.

Case: omit an N\text{N}. The remaining letters are B,A,A,A,N\text{B}, \text{A}, \text{A}, \text{A}, \text{N} (33 As),

5!3!=20.\frac{5!}{3!} = 20.

Case: omit the B\text{B}. The remaining letters are A,A,A,N,N\text{A}, \text{A}, \text{A}, \text{N}, \text{N} (33 As, 22 Ns),

5!3!×2!=10.\frac{5!}{3! \times 2!} = 10.

Add the disjoint cases. The three cases drop different letters, so they cannot overlap:

30+20+10=60.30 + 20 + 10 = 60.

Answer. There are 6060 such five-letter words.

exam4 marksConsider all distinct arrangements of the letters of the word BANANA\text{BANANA}. (i) How many are there in total? (ii) In how many of them are the two N\text{N}s separated (not next to each other)?
Show worked solution →

Part (i): divide n!n! by the repeats. BANANA\text{BANANA} has 66 letters, with A\text{A} three times and N\text{N} twice,

6!3!×2!=72012=60.\frac{6!}{3! \times 2!} = \frac{720}{12} = 60.

Part (ii): count the complement (the N\text{N}s together). Counting "separated" directly is awkward, so count the arrangements with the two N\text{N}s together and subtract. Glue the two N\text{N}s into one block. The items to arrange are then the block plus A,A,A,B\text{A}, \text{A}, \text{A}, \text{B}, that is 55 items with A\text{A} repeated three times,

5!3!=20.\frac{5!}{3!} = 20.

Because the two N\text{N}s are identical, the block has only 11 internal order, so there is no extra 2!2! factor here.

Subtract from the total.

6020=40.60 - 20 = 40.

Answer. (i) 6060 arrangements; (ii) 4040 with the N\text{N}s apart.

exam5 marksIn how many distinct arrangements of the nine letters of the word DECISIONS\text{DECISIONS} do the vowels and consonants alternate?
Show worked solution →
Separate the letters into vowels and consonants
DECISIONS\text{DECISIONS} has 99 letters. The vowels are E,I,I,O\text{E}, \text{I}, \text{I}, \text{O} (44 vowels, with I\text{I} repeated), and the consonants are D,C,S,N,S\text{D}, \text{C}, \text{S}, \text{N}, \text{S} (55 consonants, with S\text{S} repeated).
Fix the alternating pattern
With 55 consonants and 44 vowels, the only way to alternate across nine places is consonant, vowel, consonant, \dots, consonant, that is C V C V C V C V C\text{C V C V C V C V C}. There is exactly 11 such pattern of slots (starting and ending on a consonant); the other start, V C V C\text{V C V C} \dots, would need 55 vowels.
Arrange the consonants in their five slots
Five consonants with S\text{S} repeated twice give

5!2!=60.\frac{5!}{2!} = 60.

Arrange the vowels in their four slots. Four vowels with I\text{I} repeated twice give

4!2!=12.\frac{4!}{2!} = 12.

Multiply (independent choices).

60×12=720.60 \times 12 = 720.

Answer. There are 720720 alternating arrangements.

Related dot points