7.01g, 7.01h - Counting arrangements of objects

7.01g, 7.01h - Counting arrangements of objects

Count arrangements when some objects look identical, a number cannot begin with zero, or specified objects must be together or apart. You will also arrange only part of a collection, splitting into cases when repeated objects or different number lengths make a single factorial unsuitable.

Indistinguishable repeated objects

How many different three-digit numbers can be made from the cards 1,1,2,31,1,2,3, using each card at most once? The count 4P3=24{}^4P_3=24 treats the two ones as distinct. Dividing by 22 is valid here, but why does each visible number have exactly two labelled versions? We will explain that special case and build a method that also works when the collection changes.

First arrange all the objects. If two identical copies of AA were temporarily labelled A1A_1 and A2A_2, swapping their labels would produce two labelled arrangements with exactly the same visible word. Every visible word is counted 2!2! times.

You already know

n!n! counts orders of nn distinct objects. nPr{}^nP_r counts ordered selections without replacement, whereas nCr{}^nC_r counts unordered selections. Multiply successive choices and add disjoint cases.

With several groups of identical copies, each group's hidden labels can be permuted independently. Dividing by all those factorials removes the same overcount from every arrangement.

Arrangements with identical copies

Suppose all nn objects are arranged in a line, with a1a_1 identical copies of one type, a2a_2 of another, and so on, where a1+⋯+ak=na_1+\cdots+a_k=n. The number of visibly different arrangements is

n!a1!a2!⋯ak!\frac{n!}{a_1!a_2!\cdots a_k!}

Not in the formula booklet: learn it.

Different letters count as different types, even if their shapes look similar. The division concerns indistinguishable copies, not letters that happen to be adjacent.

Worked example 1: two repeated pairs

Question. Calculate the number of different arrangements of all the letters of BALLOON.

Plan. Count all labelled orders, then divide by the exchanges of the two copies of LL and the two copies of OO.

letters=7including two Ls and two Osarrangements=7!2!2!remove both hidden-label overcounts=1260evaluate\begin{aligned} \text{letters}&=7 &&\text{including two }L\text{s and two }O\text{s}\\ \text{arrangements}&=\frac{7!}{2!2!} &&\text{remove both hidden-label overcounts}\\ &=1260 &&\text{evaluate} \end{aligned}

Why this step? Each visible arrangement corresponds to 2!×2!=42!\times2!=4 labelled ones, regardless of where the repeated letters occur.

Answer. 12601260 arrangements.

Check. Choose the two LL-positions, then the two OO-positions, then order B,A,NB,A,N: 7C2×5C2×3!=21×10×6=1260{}^7C_2\times{}^5C_2\times3!=21\times10\times6=1260.

The next example adds one distinct letter. Only the total number of positions changes; the repeated-letter divisors stay the same.

Worked example 2: one extra distinct letter

Question. Calculate the number of different arrangements of all the letters of BALLOONS.

Plan. Use eight positions, still dividing only for the two copies each of LL and OO.

arrangements=8!2!2!eight letters, the same repetitions=10080evaluate\begin{aligned} \text{arrangements}&=\frac{8!}{2!2!} &&\text{eight letters, the same repetitions}\\ &=10080 &&\text{evaluate} \end{aligned}

Why this step? The added SS has no identical partner, so it adds a position but no new non-trivial divisor.

Answer. 1008010080 arrangements.

Check. Insert SS into any of the eight gaps of a BALLOON arrangement: 8×1260=100808\times1260=10080.

Factorials account for every exchange within an identical group.

Watch out

For three identical copies, divide by 3!=63!=6, not by 33. There are six ways to exchange three temporary labels, all giving the same visible arrangement.

Identify the multiplicities before writing the quotient.

Numbers with no leading zero

A string of digit cards is not necessarily a number with that many digits: a leading zero shortens the number.

For example, 01230123 is an arrangement of four cards but represents the three-digit number 123123. Count valid full-length numbers by subtracting the arrangements whose first digit is zero. Once that zero is fixed, reduce its remaining multiplicity by one.

Excluding a leading zero

If a multiset of nn digits contains z≥1z\ge1 zeros and other multiplicities a1,…,aka_1,\ldots,a_k, the number of nn-digit numbers using them all is

n!z!a1!⋯ak!−(n−1)!(z−1)!a1!⋯ak!\frac{n!}{z!a_1!\cdots a_k!} -\frac{(n-1)!}{(z-1)!a_1!\cdots a_k!}

The second term fixes a zero first. The digits are used without replacement.

Not in the formula booklet: learn it.

You can reconstruct this formula from “all minus invalid”; its conditions are more useful than memorising a long quotient.

Worked example 3: two zeros

Question. Calculate the number of six-digit numbers that can be formed using all the cards 0,0,1,1,2,30,0,1,1,2,3.

Plan. Count every visible six-card arrangement and subtract those beginning with zero.

all arrangements=6!2!2!=180two zeros and two oneszero first=5!2!=60remaining digits 0,1,1,2,3six-digit numbers=180−60=120exclude invalid arrangements\begin{aligned} \text{all arrangements}&=\frac{6!}{2!2!}=180 &&\text{two zeros and two ones}\\ \text{zero first}&=\frac{5!}{2!}=60 &&\text{remaining digits }0,1,1,2,3\\ \text{six-digit numbers}&=180-60=120 &&\text{exclude invalid arrangements} \end{aligned}

Why this step? The zeros are identical: fixing the first card as zero is one case, not two choices of which zero to place first.

Answer. 120120 six-digit numbers.

Check. A first digit of 11, 22 or 33 gives respectively 6060, 3030 or 3030 completions, totalling 120120.

The next example adds a second copy of 33. This changes the repeated-digit divisor in both the total and the invalid count.

Worked example 4: another repeated digit

Question. Calculate the number of seven-digit numbers using all the cards 0,0,1,1,2,3,30,0,1,1,2,3,3.

Plan. Repeat the subtraction, reducing the zero multiplicity after the first place is fixed.

all arrangements=7!2!2!2!=630three repeated pairszero first=6!2!2!=180one zero remainsseven-digit numbers=630−180=450all minus invalid\begin{aligned} \text{all arrangements}&=\frac{7!}{2!2!2!}=630 &&\text{three repeated pairs}\\ \text{zero first}&=\frac{6!}{2!2!}=180 &&\text{one zero remains}\\ \text{seven-digit numbers}&=630-180=450 &&\text{all minus invalid} \end{aligned}

Why this step? Fixing a zero removes one zero only. The two ones and two threes are still indistinguishable pairs in the remaining six positions.

Answer. 450450 seven-digit numbers.

Check. The first digit is 11, 22 or 33, giving 180+90+180=450180+90+180=450 completions.

The arithmetic may be short, but the invalid count must use the right remaining collection.

Watch out

After fixing a zero first, do not keep the original z!z! divisor. There are z−1z-1 zeros left, so the divisor becomes (z−1)!(z-1)!. Do not multiply by zz, because the copies are identical.

The same subtraction idea applies whenever one forbidden first position is easier to count than all the allowed first positions.

Objects together or apart

To make specified objects consecutive, join them into a temporary block, arrange the block with the remaining objects, then arrange the objects inside it.

For two distinct objects AA and BB, the block has two internal orders, ABAB and BABA. A named order such as “AA immediately before BB” allows only ABAB. A fixed position is different again: fixing AA first leaves only the other objects to arrange.

One consecutive block

Among nn distinct objects in a line, the number of arrangements in which rr specified objects are all consecutive is

(n−r+1)! r!(n-r+1)!\,r!

Treat them as one unit, with unrestricted internal order. If they must follow one specified internal order, omit the factor r!r!.

Not in the formula booklet: learn it.

“Not together” is often simplest as the complement of “together”. These two cases do not overlap and account for every arrangement.

Worked example 5: two people together

Question. Seven people, including AA and BB, stand in a line. Calculate the number of arrangements in which AA and BB stand next to each other.

Plan. Treat AA and BB as one block, and include both orders inside it.

units to arrange=6one block and five other peoplearrangements=6!×2!external and internal orders=1440evaluate\begin{aligned} \text{units to arrange}&=6 &&\text{one block and five other people}\\ \text{arrangements}&=6!\times2! &&\text{external and internal orders}\\ &=1440 &&\text{evaluate} \end{aligned}

Why this step? A block preserves adjacency wherever it is placed; multiplying by 22 allows both ABAB and BABA.

Answer. 14401440 arrangements.

Check. The block may start in any of 66 positions, the other five people have 5!5! orders, and the block has 22 orientations: 6×120×2=14406\times120\times2=1440.

The next example changes only the restriction, from together to apart. The total set of arrangements is unchanged.

Worked example 6: two people apart

Question. Calculate the number of arrangements of the same seven people in which AA and BB are not next to each other.

Plan. Subtract the adjacent arrangements from all 7!7! arrangements.

not adjacent=7!−2×6!all minus adjacent=5040−1440=3600evaluate\begin{aligned} \text{not adjacent}&=7!-2\times6! &&\text{all minus adjacent}\\ &=5040-1440=3600 &&\text{evaluate} \end{aligned}

Why this step? Counting every possible gap between AA and BB separately would create many cases; the forbidden case has the single block count already found.

Answer. 36003600 arrangements.

Check. 3600+1440=50403600+1440=5040, so the complementary counts exhaust the total.

The block's internal arrangements are part of the count.

Watch out

Wrong: 6!6! when AA and BB merely have to be adjacent. That permits only one internal order. Right: 2×6!2\times6!, unless the question specifically fixes who stands on the left.

For a larger block the same reasoning gives r!r! internal orders, provided its members are distinct and freely ordered.

Separating repeated objects with gaps

To keep identical objects apart, arrange the other objects first and place at most one identical object in each available gap.

If five distinct letters have been arranged, there are six gaps: one before the first letter, four between successive letters and one after the last. Placing identical copies of AA into different gaps prevents those copies from being adjacent.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account