Introduction

To count arrangements or selections without listing them, use two principles (add for "or", multiply for "and then") and two questions about the objects: does order matter, and is repetition allowed. Permutations count ordered arrangements, combinations count unordered selections, and the remaining cases (identical objects, circular seating, restrictions such as "together" or "never adjacent", distributions, grid paths) are these with a correction.

The skill is choosing the right model and avoiding the double count or the forgotten case. A decision table, the standard corrections with a reason for each, and worked examples follow.

Prerequisites

Core concepts

ConceptFormulaCounts
Sum rulem+nm + nOne task done in one of two disjoint ways
Product rulem×nm \times nA task done in two stages, mm choices then nn
Factorialn!=n(n−1)⋯1n! = n(n-1)\cdots 1, 0!=10! = 1Orderings of nn distinct objects
PermutationnPr=n!(n−r)!^{n}P_{r} = \frac{n!}{(n-r)!}Ordered choices of rr from nn distinct, no repetition
With repetitionnrn^rOrdered choices of rr, each from nn options
Multiset arrangementsn!n1! n2!⋯nk!\frac{n!}{n_1!\, n_2! \cdots n_k!}Orderings of nn objects with nin_i identical copies of type ii
Combination(nr)=n!r!(n−r)!\binom{n}{r} = \frac{n!}{r!(n-r)!}Unordered choices of rr from nn distinct
Circular arrangement(n−1)!(n-1)!Seatings of nn distinct people round a table (rotations equal)
Necklace (flip allowed)(n−1)!2\frac{(n-1)!}{2} for n≥3n \ge 3Circular arrangements where a mirror image counts as the same
Stars and bars(n+k−1k−1)\binom{n + k - 1}{k - 1}Ways to give nn identical items to kk distinct people

Order test. Swap two chosen items. If the outcome changes (a different PIN, a different seating, president and secretary swapped), order matters and the count is a permutation. If nothing changes (the same committee, the same hand of cards), it is a combination.

Identities used below. (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r}; (nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} (Pascal); ∑r=0n(nr)=2n\sum_{r=0}^{n} \binom{n}{r} = 2^n; nPr=r!(nr)^{n}P_{r} = r! \binom{n}{r}.

Decision procedure

  1. Distinct or identical objects? Identical objects divide out by the factorial of each group.
  2. Order matters? Use the order test.
  3. Repetition allowed? If yes, each position has the full set of options (nrn^r).
  4. Line or circle? In a circle, fix one person to remove rotations.
  5. Restrictions.
    • "Together": glue the group into one block, arrange the blocks, then arrange inside the block.
    • "Never together" (as a whole group): total minus together.
    • "No two adjacent": arrange the others first, then choose gaps for the restricted ones (gap method).
    • "At least one" or "at least kk": count the complement, or split into exact cases and add.
    • Fixed positions, such as a first digit that cannot be 0: fill the restricted position first.
  6. Distributions. Identical items to distinct people: stars and bars. Distinct items to distinct people with no limit: knk^n.
  7. Check a small case by listing, when time allows; this catches double counting.

Mathematical explanation

Permutations. The first position has nn options, the second n−1n - 1, and so on for rr positions, so by the product rule nPr=n(n−1)⋯(n−r+1)=n!/(n−r)!^{n}P_{r} = n(n-1)\cdots(n-r+1) = n!/(n-r)!.

Combinations from permutations. Each unordered selection of rr objects appears r!r! times among the ordered selections, once per ordering. Dividing, (nr)=nPr/r!\binom{n}{r} = {^{n}P_{r}}/r!.

Identical objects. If n1n_1 objects are identical, the n1!n_1! orderings among them give the same visible arrangement, so each visible arrangement is counted n1!n_1! times in n!n!. Dividing by each ni!n_i! gives the multiset formula.

Circular seating. The n!n! linear orders fall into groups of nn rotations that give the same seating, so there are n!/n=(n−1)!n!/n = (n-1)! seatings.

Stars and bars. Write the nn identical items as stars and separate the kk people's shares with k−1k - 1 bars. Every arrangement of nn stars and k−1k - 1 bars in a row is one distribution, so the count is (n+k−1k−1)\binom{n + k - 1}{k - 1}. If each person must get at least one item, hand one to each first and distribute the remaining n−kn - k: (n−1k−1)\binom{n - 1}{k - 1}.

Grid paths. A path from (0,0)(0, 0) to (a,b)(a, b) using unit steps right and up is a word of aa R's and bb U's, so there are (a+ba)\binom{a + b}{a} paths. Paths through a point PP multiply the counts before and after PP.

Divisors. If N=p1e1p2e2⋯pkekN = p_1^{e_1} p_2^{e_2} \cdots p_k^{e_k}, a divisor chooses an exponent from 00 to eie_i for each prime, giving (e1+1)(e2+1)⋯(ek+1)(e_1 + 1)(e_2 + 1)\cdots(e_k + 1) divisors.

Related material. A derangement is a permutation with no element in its original place. Inclusion-exclusion gives Dn=n!∑i=0n(−1)i/i!D_n = n! \sum_{i=0}^{n} (-1)^i / i!; the first values are D1=0D_1 = 0, D2=1D_2 = 1, D3=2D_3 = 2, D4=9D_4 = 9, D5=44D_5 = 44.

Worked examples

Example 1 (product rule with and without repetition). A code is 3 letters (A to Z, repetition allowed) followed by 2 digits that must differ. Letters: 263=1757626^3 = 17576. Digits: 10×9=9010 \times 9 = 90. Codes: 17576×90=158184017576 \times 90 = 1581840.

Example 2 (identical letters). Arrangements of the letters of LETTER: 6 letters with E twice and T twice, so 6!2! 2!=7204=180\frac{6!}{2!\,2!} = \frac{720}{4} = 180.

Example 3 (at least). A committee of 5 is chosen from 6 men and 4 women, with at least 2 women.

  • All committees: (105)=252\binom{10}{5} = 252.
  • No woman: (65)=6\binom{6}{5} = 6. Exactly one woman: (41)(64)=4×15=60\binom{4}{1}\binom{6}{4} = 4 \times 15 = 60.
  • At least 2 women: 252−6−60=186252 - 6 - 60 = 186.
  • Trap: "choose 2 women first, then any 3 of the remaining 8" gives (42)(83)=336\binom{4}{2}\binom{8}{3} = 336, which counts a committee with 3 or 4 women several times.

Example 4 (circle with a pair). Seven people sit round a table.

  • All seatings: 6!=7206! = 720.
  • Two particular people together: glue them, giving 6 units round the table, 5!=1205! = 120 seatings, times 2 orders inside the block: 240.
  • Those two not together: 720−240=480720 - 240 = 480.

Example 5 (gap method). Five boys and three girls stand in a row with no two girls adjacent.

  • Arrange the boys: 5!=1205! = 120. They create 6 gaps (ends included).
  • Place the 3 distinct girls in 3 different gaps, in order: 6P3=120^{6}P_{3} = 120.
  • Total: 120×120=14400120 \times 120 = 14400.

Example 6 (leading zero). How many 4-digit even numbers have all digits distinct?

  • Units digit 0: the other three positions take 9×8×7=5049 \times 8 \times 7 = 504.
  • Units digit 2, 4, 6 or 8 (4 choices): the first digit cannot be 0 or the units digit, so 8 choices; then 8 and 7. That is 4×8×8×7=17924 \times 8 \times 8 \times 7 = 1792.
  • Total: 504+1792=2296504 + 1792 = 2296. Splitting on the units digit is needed because 0 restricts the first digit only when it is not already used.

Example 7 (stars and bars). Ten identical sweets go to 4 children.

  • Any distribution: (133)=286\binom{13}{3} = 286.
  • Each child at least one: (93)=84\binom{9}{3} = 84.

Example 8 (grid paths). Paths from (0,0)(0, 0) to (4,3)(4, 3) with unit steps right or up: (73)=35\binom{7}{3} = 35. Through (2,2)(2, 2): (42)×(31)=6×3=18\binom{4}{2} \times \binom{3}{1} = 6 \times 3 = 18.

Example 9 (geometry counts). A decagon has (102)−10=35\binom{10}{2} - 10 = 35 diagonals (pairs of vertices minus sides), which is n(n−3)2\frac{n(n-3)}{2} with n=10n = 10. Twelve people shaking hands once each make (122)=66\binom{12}{2} = 66 handshakes.

Example 10 (divisors). 360=23×32×5360 = 2^3 \times 3^2 \times 5 has (3+1)(2+1)(1+1)=24(3+1)(2+1)(1+1) = 24 divisors.

Example 11 (derangements). Four letters are put in four addressed envelopes so that no letter is in its own envelope: D4=9D_4 = 9 ways out of 4!=244! = 24.

Example 12 (block method: letters together). In how many arrangements of GARDEN are the vowels A and E together? Glue them into one block: the block and G, R, D, N make 5 units, arranged in 5!=1205! = 120 ways, and the block can be AE or EA: 120×2=240120 \times 2 = 240. Out of 6!=7206! = 720 arrangements, so the vowels are apart in 720−240=480720 - 240 = 480.

Example 13 (dictionary rank). If all arrangements of the letters of RAIN are listed in dictionary order, what is the position of RAIN? Letters in order: A, I, N, R.

  • Words starting with A, I or N: 3×3!=183 \times 3! = 18.
  • Words starting with R: next letter A (the smallest left), then the remaining I and N in order give RAIN as the first word starting with RA.
  • Position: 18+1=1918 + 1 = 19.
  • With repeated letters, divide each count by the repeats: for BOOK (letters B, K, O, O), the words before BOOK starting with B are BKOO and BOKO, so BOOK is 3rd.

Example 14 (distinct objects into distinct boxes, none empty). In how many ways can 4 different balls go into 3 different boxes with no box empty? All assignments: 34=813^4 = 81. Subtract those missing a given box: 3×24=483 \times 2^4 = 48; add back those missing two boxes: 3×14=33 \times 1^4 = 3. Answer: 81−48+3=3681 - 48 + 3 = 36. The slip 34=813^4 = 81 allows empty boxes. A second route as a check: one box gets 2 balls ((42)=6\binom{4}{2} = 6 ways to pick them, 3 choices of box) and the other two balls fill the remaining boxes in 22 ways: 6×3×2=366 \times 3 \times 2 = 36.

Important properties and observations

  • Common misconceptions. "At least one" is not "choose one, then any": that double counts (Example 3). Circular seatings are not n!n!. Identical objects are not arranged as if distinct.
  • Choosing is the same as leaving. (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r}: choosing 3 players to sit out of 11 is the same count as choosing 8 to play.
  • Permutation versus combination. For the same nn and rr, nPr=r!(nr)^{n}P_{r} = r! \binom{n}{r}, so the permutation count is never smaller.
  • Complement for "at least". When the "at least" cases are many, count the few excluded cases and subtract.
  • EDGE CASE. (n0)=(nn)=1\binom{n}{0} = \binom{n}{n} = 1 and 0!=10! = 1; (nr)=0\binom{n}{r} = 0 for r>nr > n.
  • Necklaces. Divide by 2 only when a flipped arrangement counts as the same (beads on a ring, keys on a key ring), and only for n≥3n \ge 3.

GATE examination perspective

  • Model-choice questions. Apply the order and repetition tests first; nPr^{n}P_{r}, (nr)\binom{n}{r} and nrn^r on the same numbers are different models.
  • Restriction traps. "Together", "not together" and "no two adjacent" are three different counts (Examples 4 and 5).
  • Leading-zero traps. Digit questions with 0 among the digits need a case split (Example 6).
  • Double counting in "at least". The answer obtained by fixing the minimum first is too large (Example 3).
  • Identical items. Words with repeated letters and distributions of identical items need the division or stars and bars (Examples 2 and 7).
  • Links to probability. A probability can be two counts divided; see Elementary Statistics and Probability.
  • Together versus apart. Glue the group into a block for "together"; subtract from the total for "apart" (Example 12), or use the gap method when no two may be adjacent (Example 5).
  • Dictionary rank. Count the words that come before, letter by letter (Example 13).
  • Onto distributions. "No box empty" needs inclusion and exclusion or a split by box sizes (Example 14).

Summary

Sources

  1. D. Kirk et al., Contemporary Mathematics, OpenStax, 2023: Section 7.1 The Multiplication Rule for Counting; Section 7.2 Permutations; Section 7.3 Combinations; Section 7.6 Probability with Permutations and Combinations. (consulted 2026-11-11).
  2. J. Abramson et al., College Algebra 2e, OpenStax, 2021: Section 9.5 Counting Principles; Section 9.6 Binomial Theorem. (consulted 2026-11-11).

Next steps