Skip to content
Combinatorics · Chapter 3

Word Rearrangements

Shuffle the letters of a word and count the different words you can make, even when letters repeat.

You'll need
open on YouTube
3.10%

Word Rearrangements Fundamentals

In this section you will be able to count the different ways to rearrange a word, even when some letters repeat.

Shuffle the letters of OMEGA and you get words like GAMOE and MEGAO. How many can you make? Now try SUNNY. Swap the two N’s. Did you make a new word?

When every letter is different, a word is just a row of different objects. So you count with a factorial.

When a letter repeats, swapping two copies changes nothing. The factorial counts that same word more than once. Divide out the overcount and you get the true number.

Exploreplay first, formulas later

SUNNY: 5! = 120 if every letter were different, ÷ 2! for the Ns (= 2) gives 60 arrangements

120 ÷ 2 = 60

60 different arrangements: 5! counts each one 2 times (2!).

Tip: click (or press Enter on) one tile, then another, to swap them.

S U N N Y. 120 ÷ 2 = 60 different arrangements.

Name it

Remark 3.1.1

Remember that the factorial formula only works if all the letters are different.

Theorem 3.1.2 · Word Rearrangements

The number of ways to order a word is

n!d1!×d2!×d3!×⋯\frac{n!}{d_1! \times d_2! \times d_3! \times \cdots}

where nn is the number of letters and d1,d2,d3,…d_1, d_2, d_3, \ldots are the number of times each of the duplicate letters that appear in the word.

Watch itpredict, then reveal

Example 3.1

How many ways are there to arrange the letters in the word OMEGA?

OMEGA: all 5 letters different, 5! = 120 arrangements

5! = 120

All 5 letters are different, so it's just 5!.

Tip: click (or press Enter on) one tile, then another, to swap them.

O M E G A. 120 ÷ 1 = 120 different arrangements.

  1. 1

    What does this remind you of? Are any two letters the same?

    Predict first:

Example 3.2

How many ways are there to arrange the letters in the word SUNNY?

SUNNY: 5! = 120 if every letter were different, ÷ 2! for the Ns (= 2) gives 60 arrangements

120 labelled arrangements

These 2 labelled versions all spell the same word:

  • SUN₁N₂Y
  • SUN₂N₁Y

2 Ns can swap places in 2! = 2 ways. Turn the labels off and they collapse into one.

Tip: click (or press Enter on) one tile, then another, to swap them.

S U N₁ N₂ Y. 5! = 120 arrangements if every letter is different; each word is counted 2 times.

  1. 1

    This looks similar to the previous example. Can we use the same factorial formula again?

    Predict first:

Example 3.3

How many ways are there to arrange the letters of the word APPLE?

APPLE: 5! = 120 if every letter were different, ÷ 2! for the Ps (= 2) gives 60 arrangements

120 ÷ 2 = 60

60 different arrangements: 5! counts each one 2 times (2!).

Tip: click (or press Enter on) one tile, then another, to swap them.

A P P L E. 120 ÷ 2 = 60 different arrangements.

  1. 1

    Pretend the two P's are different: P1P_1 and P2P_2. How many ways are there to arrange 5 different letters?

    Predict first:
open on YouTube

Try it

Problem 3.3.1

How many ways are there to arrange the letters of the word MATH?

Problem 3.3.2

How many ways are there to arrange the letters of the word MISSISSIPPI?

Problem 3.3.3

Find the number of ways to order the letters in PINEAPPLE.

Problem 3.3.4

How many ways are there to misspell the word MISSPELLED?

Contest cornerreal contest problems

Problem 3.3.6

AMC 10

A child builds towers using identically shaped cubes of different color. How many different towers with a height 8 cubes can the child build with 2 red cubes, 3 blue cubes, and 4 green cubes? (One cube will be left out.)

Problem 3.3.8(additional)

AMC 10

How many distinguishable arrangements are there of 1 brown tile, 1 purple tile, 2 green tiles, and 3 yellow tiles in a row from left to right? (Tiles of the same color are indistinguishable.)

Checkpoint for section 3.1

Get 2 of 3 right to master this section. One try each, no hints.
1

How many ways are there to arrange the letters of the word TIGER?

2

How many different ways can you arrange the letters of the word BANANA?

3

How many distinguishable arrangements are there of 1 brown tile, 1 purple tile, 2 green tiles, and 3 yellow tiles in a row from left to right? (Tiles of the same color are indistinguishable.)

3.20%

Word Rearrangements with Constraints

In this section you will be able to count rearrangements with rules: letters pinned in place, letters glued together, or letters kept apart.

Rearrange COMPUTER, but C, O, M and P must stay side by side. Picture them stuck together with glue. Now the block moves like one big tile!

Rules change the count. Here are three tricks:

  • Pinned letter: put it in its spot first, then arrange the rest.
  • Glue: count the block as one unit. Then multiply by the orders inside the block.
  • Keep apart: line up the other letters first. Then drop the repeated letter into the gaps.

Exploreplay first, formulas later

COMPUTER with COMP glued: 5 units in 120 ways × 24 orders inside the block = 2880

Click letters to glue them into one block:

5 units (4 loose letters + 1 block):

  1. U
  2. T
  3. E
  4. R
120 × 24 = 2,880

120 ways to line up the units (the block counts as one tile), times 24 orders inside the block.

5 units: 120 ways × 24 inside the block = 2,880

Name it

Remark 3.2.1

This formula is not only true for words! This formula can also work for the number of ways of arranging objects where some objects are of the same type. In fact, we will use this later in geometric counting.

Watch itpredict, then reveal

Example 3.4

How many ways are there to arrange the letters of the word OPOSSUM if the arrangement must end in an M?

OPOSSUM (last letter M stays put): 6! = 720 if every letter were different, ÷ 2! for the Os, 2! for the Ss (= 4) gives 180 arrangements

720 ÷ 4 = 180

180 different arrangements: 6! counts each one 4 times (2! × 2!). The M is pinned to the end, so only the first 6 letters move.

Tip: click (or press Enter on) one tile, then another, to swap them.

O P O S S U M. 720 ÷ 4 = 180 different arrangements.

  1. 1

    The M must go last. How many ways are there to fill that last spot?

    Predict first:
open on YouTube

Example 3.5

How many ways are there to rearrange the letters in COMPUTER such that the C, O, M, and P stay together (not necessarily in the same order)?

COMPUTER: nothing glued yet. Pick at least 2 letters to glue into a block.

Click letters to glue them into one block:

Nothing glued yet. Click at least 2 letters. Without glue: 40,320 ways to line up all 8 letters.

Pick at least 2 letters to glue together.

  1. 1

    How should we deal with the condition that the COMP must stay together?

Example 3.6

Omega Learn

How many ways are there to arrange the letters in LOLLIPOP if the I must be next to both an L and O?

LOLLIPOP with LIO glued: 6 units in 180 ways × 2 orders inside the block = 360

Click letters to glue them into one block:

6 units (5 loose letters + 1 block):

  1. L
  2. O
  3. L
  4. P
  5. P
180 × 2 = 360

180 ways to line up the units (the block counts as one tile), times 2 orders inside the block.

6 units: 180 ways × 2 inside the block = 360

  1. 1

    The I needs an L on one side and an O on the other. What 3-letter block must appear in the word?

    Predict first:
open on YouTube

Try it

Problem 3.3.5

How many arrangements of the word BOTTLE are there such that the 2 T's and O remain together?

Problem 3.3.7(additional)

You have 6 apples, 3 pears, and 2 oranges. Assuming the same type of fruits are indistinguishable, how many distinct ways are there to place the fruits in a line if the 2 oranges must be next to each other?

Contest cornerreal contest problems

Problem 3.3.10

AMC 8

In how many ways can the letters in BEEKEEPER be rearranged so that two or more Es do not appear together?

Problem 3.3.11

AHSME

How many distinguishable rearrangements of the letters in CONTESTCONTEST have both the vowels first? (For instance, OETCNSTOETCNST is one such arrangement but OTETSNCOTETSNC is not.)

Checkpoint for section 3.2

Get 2 of 3 right to master this section. One try each, no hints.
1

How many ways can you arrange the letters of FRIEND if the F and the R must stay next to each other (in either order)?

2

How many arrangements of the letters of BANANA have no two A's next to each other?

3

You have 6 apples, 3 pears, and 2 oranges. Assuming the same type of fruits are indistinguishable, how many distinct ways are there to place the fruits in a line if the 2 oranges must be next to each other?

3.3

Practice Problems

In this section you will be able to mix every word rearrangement trick on contest problems.

Time for a challenge! These two problems mix word rearrangements with casework and dictionary order. Every problem has three hints if you get stuck.

Want every problem from this chapter on one page? Open the problem set.

Contest cornerreal contest problems

Problem 3.3.9

MATHCOUNTS

How many distinct four-letter permutations are possible using four of the ten letters in MATHCOUNTS?

Problem 3.3.12

Omega Learn

If the letters of the word SMILE are rearranged in all possible ways, and arranged in alphabetical order like in a dictionary, then what will be the rank of the word SLIME?