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
- Multiplication and factorials; the idea of a set and of a sequence.
- For divisor counting, prime factorisation from Powers, Exponents and Logarithms.
Core concepts
| Concept | Formula | Counts |
|---|---|---|
| Sum rule | One task done in one of two disjoint ways | |
| Product rule | A task done in two stages, choices then | |
| Factorial | , | Orderings of distinct objects |
| Permutation | Ordered choices of from distinct, no repetition | |
| With repetition | Ordered choices of , each from options | |
| Multiset arrangements | Orderings of objects with identical copies of type | |
| Combination | Unordered choices of from distinct | |
| Circular arrangement | Seatings of distinct people round a table (rotations equal) | |
| Necklace (flip allowed) | for | Circular arrangements where a mirror image counts as the same |
| Stars and bars | Ways to give identical items to 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. ; (Pascal); ; .
Decision procedure
- Distinct or identical objects? Identical objects divide out by the factorial of each group.
- Order matters? Use the order test.
- Repetition allowed? If yes, each position has the full set of options ().
- Line or circle? In a circle, fix one person to remove rotations.
- 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 ": 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.
- Distributions. Identical items to distinct people: stars and bars. Distinct items to distinct people with no limit: .
- Check a small case by listing, when time allows; this catches double counting.
Mathematical explanation
Permutations. The first position has options, the second , and so on for positions, so by the product rule .
Combinations from permutations. Each unordered selection of objects appears times among the ordered selections, once per ordering. Dividing, .
Identical objects. If objects are identical, the orderings among them give the same visible arrangement, so each visible arrangement is counted times in . Dividing by each gives the multiset formula.
Circular seating. The linear orders fall into groups of rotations that give the same seating, so there are seatings.
Stars and bars. Write the identical items as stars and separate the people's shares with bars. Every arrangement of stars and bars in a row is one distribution, so the count is . If each person must get at least one item, hand one to each first and distribute the remaining : .
Grid paths. A path from to using unit steps right and up is a word of R's and U's, so there are paths. Paths through a point multiply the counts before and after .
Divisors. If , a divisor chooses an exponent from to for each prime, giving divisors.
Related material. A derangement is a permutation with no element in its original place. Inclusion-exclusion gives ; the first values are , , , , .
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: . Digits: . Codes: .
Example 2 (identical letters). Arrangements of the letters of LETTER: 6 letters with E twice and T twice, so .
Example 3 (at least). A committee of 5 is chosen from 6 men and 4 women, with at least 2 women.
- All committees: .
- No woman: . Exactly one woman: .
- At least 2 women: .
- Trap: "choose 2 women first, then any 3 of the remaining 8" gives , 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: .
- Two particular people together: glue them, giving 6 units round the table, seatings, times 2 orders inside the block: 240.
- Those two not together: .
Example 5 (gap method). Five boys and three girls stand in a row with no two girls adjacent.
- Arrange the boys: . They create 6 gaps (ends included).
- Place the 3 distinct girls in 3 different gaps, in order: .
- Total: .
Example 6 (leading zero). How many 4-digit even numbers have all digits distinct?
- Units digit 0: the other three positions take .
- 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 .
- Total: . 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: .
- Each child at least one: .
Example 8 (grid paths). Paths from to with unit steps right or up: . Through : .
Example 9 (geometry counts). A decagon has diagonals (pairs of vertices minus sides), which is with . Twelve people shaking hands once each make handshakes.
Example 10 (divisors). has divisors.
Example 11 (derangements). Four letters are put in four addressed envelopes so that no letter is in its own envelope: ways out of .
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 ways, and the block can be AE or EA: . Out of arrangements, so the vowels are apart in .
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: .
- 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: .
- 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: . Subtract those missing a given box: ; add back those missing two boxes: . Answer: . The slip allows empty boxes. A second route as a check: one box gets 2 balls ( ways to pick them, 3 choices of box) and the other two balls fill the remaining boxes in ways: .
Important properties and observations
- Common misconceptions. "At least one" is not "choose one, then any": that double counts (Example 3). Circular seatings are not . Identical objects are not arranged as if distinct.
- Choosing is the same as leaving. : choosing 3 players to sit out of 11 is the same count as choosing 8 to play.
- Permutation versus combination. For the same and , , 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. and ; for .
- 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 .
GATE examination perspective
- Model-choice questions. Apply the order and repetition tests first; , and 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
- 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).
- J. Abramson et al., College Algebra 2e, OpenStax, 2021: Section 9.5 Counting Principles; Section 9.6 Binomial Theorem. (consulted 2026-11-11).