In short
When repetition is allowed, r positions from n types give n^r arrangements. When some objects are identical, the count of distinct arrangements of n objects (with groups of size p_1, p_2, \dots) is \frac{n!}{p_1!\, p_2!\, \cdots}. Circular permutations of n distinct objects number (n-1)!, and necklaces (which can be flipped) halve that to \frac{(n-1)!}{2}.
A lock on a gym locker has 4 dials, and each dial can be set to any digit from 0 to 9. How many 4-digit codes are possible?
If you reach for the permutation formula {}^{10}P_4 = 10 \times 9 \times 8 \times 7 = 5{,}040, you will undercount badly. The code 7777 is valid — all four dials can show the same digit — but {}^{10}P_4 forbids reuse. Each dial operates independently, with 10 choices regardless of what the other dials show. By the multiplication principle:
The lock has 10{,}000 possible codes, nearly double the 5{,}040 from the no-repetition formula. The difference comes from a single word in the problem: repetition allowed. This article covers four situations where the standard {}^nP_r = n!/(n-r)! needs modification — permutations with repetition, permutations of objects not all different, circular permutations, and necklace (garland) problems.
Permutations with repetition
When repetition is allowed — meaning each object can be used as many times as you like — the counting argument changes in a fundamental way. The choices at each position do not shrink. Position 1 has n options; position 2 also has n options (the same pool, since objects are not "used up"); position 3 also has n options; and so on through position r.
Permutations with repetition
The number of ordered arrangements of r positions, where each position can be filled by any of n types (repetition allowed), is:
The formula is the multiplication principle in its simplest form: r independent choices, each with n options.
Contrast with the no-repetition formula. When repetition is forbidden, the choices shrink: n, n-1, n-2, \dots, n-r+1, giving {}^nP_r = n!/(n-r)!. When repetition is allowed, the choices stay flat at n, n, n, \dots, n, giving n^r. The no-repetition count is always \leq the repetition count (for r \geq 2, it is strictly less).
Some more instances:
- Binary strings of length 8: 2^8 = 256 (each position is 0 or 1).
- 3-letter "words" from the English alphabet (repetition allowed): 26^3 = 17{,}576.
- PIN codes of length 6 using digits 0-9: 10^6 = 1{,}000{,}000.
Permutations of objects not all different
Take the word MISSISSIPPI. It has 11 letters, but they are not all distinct: 1 M, 4 I's, 4 S's, 2 P's. If all 11 letters were different, the number of arrangements would be 11!. But swapping two identical S's does not produce a new word — MISSISSIPPI looks the same. The formula 11! overcounts.
The fix is clean. Among the 11! arrangements, every distinct word has been counted multiple times — once for each way you can rearrange the identical letters among themselves without changing the word. The 4 I's can be rearranged in 4! ways, the 4 S's in 4! ways, the 2 P's in 2! ways, and the 1 M in 1! way. Each rearrangement of identical letters produces the same word. So the number of distinct arrangements is:
Permutations of objects not all different
Given n objects where p_1 are of type 1, p_2 are of type 2, \dots, p_k are of type k (with p_1 + p_2 + \dots + p_k = n), the number of distinct arrangements is:
Why the formula works. Start by imagining all n objects are distinguishable (paint different shades on identical letters). The total arrangements would be n!. Now erase the paint — identical objects become indistinguishable. Each distinct arrangement of the "painted" objects maps to one of the "unpainted" arrangements, and exactly p_1! \cdot p_2! \cdots p_k! painted arrangements map to each unpainted one (because the identical items in each group can be permuted among themselves in p_i! ways). So the distinct count is n! divided by the product of all those factorials.
This formula is sometimes called the multinomial coefficient and written \binom{n}{p_1, p_2, \dots, p_k}. It appears in the multinomial theorem, which generalises the binomial theorem.
Circular permutations
Seat 4 friends — Anil, Bina, Charu, Devi — around a round table for dinner. In a row, there would be 4! = 24 arrangements. But a round table has no "first chair." If everyone shifts one seat clockwise, the relative arrangement is unchanged — Bina is still to Anil's right, Charu is still across from Anil, and so on.
How many of the 24 linear arrangements map to the same circular seating? Exactly 4 — the four rotations of the circle (shift by 0, 1, 2, or 3 seats). So the number of distinct circular arrangements is:
In general, for n distinct objects in a circle, every group of n rotated linear arrangements is the same circular arrangement. The count is:
Circular permutations
The number of ways to arrange n distinct objects in a circle is:
An equivalent way to see it. Fix one person's seat (say Anil always sits in the "north" chair). Now the remaining 3 friends can be arranged in 3! = 6 ways in the remaining 3 chairs. Fixing one person eliminates the rotational symmetry, and the count is (n-1)! directly.
When does circular permutation apply?
Use (n-1)! whenever the arrangement is on a circle and rotations are considered identical. Sitting around a round dining table, dancers in a ring, beads on a wire loop (where the loop cannot be flipped) — all of these are circular permutation problems.
If the circle has a distinguished point (a head of the table, a starting gate), rotations are not identical, and you revert to n!.
Necklace and garland problems
A necklace (or a garland of flowers) can be flipped — turned over so that clockwise becomes anticlockwise. This introduces a second symmetry beyond rotation.
Consider 5 differently coloured beads on a necklace. As a circular arrangement, the count would be (5-1)! = 4! = 24. But a necklace can be flipped (picked up and turned over), and the flipped version is considered the same necklace. Each circular arrangement pairs with its mirror image. So the number of distinct necklaces is:
Necklace permutations
The number of distinct necklaces (or garlands) formed by n distinct beads is:
Why divide by 2? A circular arrangement and its mirror image are the same necklace. Since every circular arrangement has exactly one distinct mirror (which is different from itself when n \geq 3), the circular arrangements pair up, and the necklace count is (n-1)!/2.
The n = 2 edge case. With 2 beads on a necklace, there is only 1 arrangement (the two beads are just neighbours, and flipping changes nothing). The formula gives (2-1)!/2 = 1/2, which is not an integer — so it does not apply for n = 2. In practice, necklace problems with n \geq 3 are the ones that appear in exams.
When to use which formula: If the arrangement can be rotated but not flipped (people at a round table — you cannot pick up the table and flip it), use (n-1)!. If the arrangement can be both rotated and flipped (beads on a string, flowers on a garland), use (n-1)!/2.
Two worked examples
Example 1: How many distinct arrangements of the letters of BANANA are there?
The word BANANA has 6 letters: B (1), A (3), N (2). This is a "not all different" problem.
Step 1. Identify the letter counts.
n = 6 total letters. The groups are: B appears 1 time, A appears 3 times, N appears 2 times. Check: 1 + 3 + 2 = 6.
Why: you need to know how many objects are of each type before applying the formula. The sum of all group sizes must equal n.
Step 2. Apply the formula.
Why: 6! = 720 counts the arrangements as if all letters were distinct. Dividing by 3! removes overcounting from the 3 identical A's, dividing by 2! removes overcounting from the 2 identical N's, and dividing by 1! (which is 1) does nothing for the single B.
Step 3. Sanity check with a smaller example.
Take the word ANA (3 letters: A appears 2 times, N appears 1 time). The formula gives 3!/(2!\cdot 1!) = 6/2 = 3. Listing: AAN, ANA, NAA. That matches.
Why: checking with small cases builds confidence that the overcounting division is correct. Three distinct words from three letters with one repeat — the formula works.
Step 4. Interpret the result.
Out of the 720 "painted" arrangements (where each A is uniquely labelled), groups of 3! \times 2! = 12 map to the same word. So 720 / 12 = 60 distinct words.
Result. The letters of BANANA can be arranged in 60 distinct ways.
The number 60 is far smaller than 720 — the repeated letters collapse a large fraction of the arrangements into duplicates. If even one more letter were repeated (say BAAANA with 4 A's), the count would drop further to 6!/(4!\cdot 1!\cdot 1!) = 720/24 = 30.
Example 2: In how many ways can $6$ people be seated around a circular table? How many necklaces can be formed from $6$ distinct beads?
Step 1. Identify the problem type.
Six distinct people, circular arrangement. This is a circular permutation.
Why: a round table has no head — rotations of the same seating are identical. So you use (n-1)!, not n!.
Step 2. Compute the circular permutation count.
Why: fix one person (say Rahul) in a chair. The remaining 5 people can fill the remaining 5 chairs in 5! = 120 ways. Each of these 120 arrangements is a genuinely different seating — no two are rotations of each other.
Step 3. Compute the necklace count.
A necklace (or garland) can be flipped, so clockwise and anticlockwise versions are the same.
Why: each circular arrangement and its mirror image form a single necklace. Since every arrangement pairs with exactly one distinct mirror (for n \geq 3), the necklace count is half the circular count.
Step 4. Compare all three counts.
Linear arrangements: 6! = 720. Circular: (6-1)! = 120. Necklace: (6-1)!/2 = 60. Each successive symmetry (rotation, then reflection) halves or reduces the count.
Result. 120 circular seatings; 60 necklaces.
The pattern is consistent: linear count = n!, circular count = n!/n = (n-1)!, necklace count = (n-1)!/2. The "fix one and permute the rest" method gives the circular count directly; dividing by 2 gives the necklace count.
Common confusions
-
"Circular permutations of n objects = n!." This is the most common error. The correct answer is (n-1)!. The factor of n is lost because n rotations of the same arrangement all look identical around a circle.
-
"A necklace is the same as a circular arrangement." A necklace adds the possibility of flipping (turning it over), which a round-table seating does not have. A necklace of n beads has (n-1)!/2 arrangements; a round table of n people has (n-1)! — exactly double the necklace count.
-
"Permutations with repetition use the formula n!/(p_1! \cdots p_k!)." That formula is for arranging n objects where some are identical. Permutations with repetition (filling r slots from n types, reuse allowed) use n^r. The two situations are different: in one you have a fixed collection of objects, some identical; in the other you have a limitless supply of each type.
-
"The formula n^r also works when repetition is not allowed." It does not. If repetition is forbidden, the choices at each position shrink (from n to n-1 to n-2, etc.), and the count is {}^nP_r = n!/(n-r)!, which is less than n^r.
-
"For a keychain (which can flip), always divide (n-1)! by 2." This is correct for n \geq 3 distinct objects. But be careful: if the objects are not all distinct, or if the problem specifies that the keychain has a clasp (a fixed point), the formula changes.
Going deeper
If you can apply the four formulas — n^r, n!/(p_1!\cdots p_k!), (n-1)!, and (n-1)!/2 — to standard problems, you have what you need for permutations with restrictions and combinations. The rest of this section is for readers curious about the group-theoretic framework behind these symmetry arguments.
Burnside's lemma and the orbit-counting theorem
The reason we divide n! by n for circular permutations (and by 2n for necklaces) is a special case of a general principle. A group of symmetries G acts on a set of arrangements. Two arrangements are "the same" if one can be transformed into the other by some symmetry in G. The number of distinct arrangements (called orbits) is given by Burnside's lemma:
where |X^g| is the number of arrangements fixed by the symmetry g.
For circular permutations of n distinct objects, the symmetry group is the cyclic group of n rotations. Only the identity rotation fixes any arrangement (the others shift everything), so the sum is n! (from the identity alone), and dividing by |G| = n gives n!/n = (n-1)!.
For necklaces, the symmetry group is the dihedral group of n rotations and n reflections (total size 2n). The calculation is a bit more involved, but for distinct beads the result is (n-1)!/2 — matching the simple division.
Burnside's lemma generalises to cases where some beads share colours, where the formula becomes less obvious. The even more powerful Polya enumeration theorem handles such problems systematically — it appears in advanced combinatorics and competitive mathematics.
Multinomial coefficients and the multinomial theorem
The expression \frac{n!}{p_1! p_2! \cdots p_k!} appears in the multinomial theorem:
where the sum runs over all non-negative integer solutions of p_1 + p_2 + \cdots + p_k = n. The connection to permutations is direct: each term in the expansion corresponds to a way of distributing n factors among k variables, and the coefficient counts the number of such distributions — which is the same as the number of distinct arrangements of n objects with p_i of type i.
When k = 2, this reduces to the binomial theorem, and the multinomial coefficient becomes the familiar \binom{n}{r} = \frac{n!}{r!(n-r)!}.
Where this leads next
- Permutations with Restrictions — objects forced together, objects kept apart, positions constrained: the next level of arrangement problems.
- Combinations — Basics — when order does not matter, the formula becomes \binom{n}{r} = {}^nP_r / r!.
- Permutations — Basics — review the foundation: the {}^nP_r formula and its derivation from the multiplication principle.
- Factorial Notation — the properties of n! that power every formula above.
- Fundamental Principle of Counting — the addition and multiplication principles that every counting argument rests on.