Skip to main content
AMC 10 & 12

Word Rearrangements

Anagram counting is permutations with repeated letters — and the gaps method returns whenever letters can't be adjacent.

The base case: all distinct letters

An nn-letter word with no repeated letters has n!n! distinct rearrangements.

Repeated letters: the multinomial formula

When letters repeat, dividing by the repeat-group factorials removes the overcounting from treating identical letters as distinguishable:

n!n1!n2!nk!\dfrac{n!}{n_1!\,n_2!\cdots n_k!}

where n1,n2,n_1, n_2, \ldots are the multiplicities of each repeated letter.

Fixed positions and adjacency

If some letters must occupy specific positions, fix those spots and arrange only the remaining letters in the remaining spots. If some letters must not be adjacent — including a repeated letter avoiding adjacency with itself — apply the gaps method: arrange everything else first, then choose (and order) gap positions for the restricted letters.

Worked example

Problem: How many distinct rearrangements of the letters in BANANA have no two A's adjacent?

Solution: BANANA has 6 letters: 3 A's, 2 N's, 1 B. First, arrange the non-A letters (B, N, N) in a row:

3!2!=3 ways\dfrac{3!}{2!} = 3 \text{ ways}

This creates 4 gaps (before, between, and after the 3 letters). Choose 3 of those 4 gaps for the identical A's (order doesn't matter, since the A's are indistinguishable):

(43)=4 ways\binom{4}{3} = 4 \text{ ways}

Total: 3×4=123 \times 4 = 12 arrangements.

Practice problems

1.How many distinct arrangements are there of the letters in LEVEL?

2.How many distinct arrangements of the letters in APPLE start with a P?

3.How many distinct arrangements of the letters in BOOKKEEPER are there? (10 letters: B, O×2, K×2, E×3, P, R)

4.How many arrangements of the letters in ORANGE have the vowels (O, A, E) in alphabetical order relative to each other (not necessarily adjacent)?