MathCompass

Permutations & Combinations

Combinatorics Intermediate

πŸ“‹ Prerequisites

Permutations count arrangements (order matters). Combinations count selections (order doesn't matter). \(The binomial coefficient \binom{n}{k}\) β€” "n choose k" β€” is the workhorse of combinatorics. It appears in Pascal's triangle, the binomial theorem, and countless competition problems.

πŸ“š Key Concepts

Combinations: n Choose k

The number of ways to choose k objects from n distinct objects, where order doesn't matter:

\[ \binom{n}{k} = \frac{n!}{k! \cdot (n-k)!} \]

\(Also written \binom{n}{k} or\) ^{n}Ck.

Intuition: Start with permutations P(n,k) = n!/(n-k)! and divide by k! to account for the fact that the k chosen items can be arranged in k! ways but all count as the same combination.

\(Example: \binom{5}{2} = 10 ways to choose 2 out of 5 items.\)

Key Properties of Binomial Coefficients

Pascal's Triangle

\(Each entry is the sum of the two entries above it. Row n (starting from 0), position k = \binom{n}{k}.\)

          1          row 0
         1 1         row 1
        1 2 1        row 2
       1 3 3 1       row 3
      1 4 6 4 1      row 4
     1 5 10 10 5 1    row 5
      

Row sums: each row n sums to \(2^{n}.\) (All subsets of n elements.)

Combinatorial Proofs

Instead of algebraically manipulating formulas, prove identities by telling a counting story.

\(Example: prove \binom{n}{k} = \binom{n}{n-k} by saying\) "choosing k winners = choosing n-k losers."

Example: prove Pascal's identity by saying "\(the nth element is either included (\binom{n-1}{k-1}) or excluded (\binom{n-1}{k}).\)"

Combinatorial proofs are elegant and often appear in Olympiad problems.

Stars and Bars (ιš”ζΏζ³•)

Number of ways to distribute n identical objects into k distinct bins:

\[ \binom{n + k - 1}{k - 1} \]

Why: Arrange n stars (objects) and k-1 bars (dividers). Total n+k-1 positions, choose k-1 for bars.

\(Example: distribute 7 identical candies to 3 kids: \binom{7+3-1}{3-1} = \binom{9}{2} = 36 ways.\)

Positive version \((each bin gets at least 1): \binom{n-1}{k-1}\) β€” put 1 in each bin first, then distribute the rest freely.

Block Method (捆绑法)

When certain items must be adjacent, treat them as a single "block."

Example: arrange 5 people A,B,C,D,E where A and B must sit together.

\(Treat AB as 1 block: 4 items to arrange \\to 4! ways. Times 2! for AB or BA = 4! \\times 2! = 48.\)

Gap Method (插空法)

When certain items must NOT be adjacent, place the other items first, then insert the restricted items into the gaps.

Example: arrange 5 people where A and B must NOT sit together.

Arrange C,D,E first: 3! = 6 ways. Creates 4 gaps (_ C _ D _ E _). Choose 2 gaps for A,B: P(4,2) = 12.

\(Total: 6 \\times 12 = 72. (Check: total arrangements 120, together 48, apart = 120-48 = 72\) βœ“)

Complementary Counting (Bridge to Next Module)

Often "at least one" or "not all" problems are easier via complement.

Answer = Total - Bad

We'll develop this fully in the complementary-counting module.

⚠️ Common Mistake: The #1 error: using permutations when order doesn't matter, or vice versa. Always ask: if I swap two chosen items, does it create a different outcome? \(Yes \\to permutation. No \\to combination.\) \(Also: \binom{n}{k} = 0 when k > n, and \binom{n}{0} = 1 (empty selection). Don't forget stars and bars requires\) IDENTICAL objects into DISTINCT bins β€” if objects are distinct, it's \(k^{n}\) (each object chooses its bin).
πŸ’‘ Key Insight: Binomial coefficients are everywhere because subset selection is fundamental. Pascal's identity is the engine that drives combinatorial proofs: every counting problem can be decomposed by "include the nth element or not." For competition problems, master stars and bars, block method, and gap method β€” these three techniques solve 80% of arrangement/distribution problems.

✏️ Example Problems

πŸ“ Example 1 (Basic combination)

How many ways are there to choose a committee of 3 people from a group of 10?

Order doesn't matter β€” a committee is just a set of people, no roles assigned. Use combinations.

Step 1: Identify n and k.

n = 10 (total people), k = 3 (to choose)

Step 2: Apply combination formula.

\[ \binom{10}{3} = \frac{10!}{3! \cdot 7!} \]

Step 3: Simplify before computing (always cancel first!).

\[ \frac{10 \times 9 \times 8 \times 7!}{3 \times 2 \times 1 \times 7!} = \frac{10 \times 9 \times 8}{6} = \frac{720}{6} = 120 \]

Check with Pascal's triangle: Row 10, position 3 = 120 βœ“

Answer: 120

πŸ“ Example 2 (Stars and bars)

How many ways to distribute 8 identical cookies among 3 distinct children?
(A child can get zero cookies.)

Stars and bars: identical objects into distinct bins, zero allowed.

Step 1: Identify n and k.

n = 8 cookies (stars), k = 3 children (bins)

Step 2: \(Formula: \binom{n + k - 1}{k - 1}\)

We need k-1 = 2 bars to separate 3 groups.

Total positions: 8 + 2 = 10. Choose 2 positions for bars.

\[ \binom{8 + 3 - 1}{3 - 1} = \binom{10}{2} \]

Step 3: Compute.

\[ \binom{10}{2} = \frac{10 \times 9}{2} = 45 \]

Visual: β˜…β˜…|β˜…β˜…β˜…β˜…|β˜…β˜… means child 1 gets 2, child 2 gets 4, child 3 gets 2. Each arrangement of stars and bars = one distribution.

Answer: 45

πŸ“ Example 3 (Block /捆绑法)

In how many ways can 6 different books be arranged on a shelf
if 2 specific books (A and B) must be next to each other?

Block method (捆绑法): treat the two books that must be together as one "block."

Step 1: Create the block.

Books A and B form 1 block. Total items to arrange: 1 block + 4 other books = 5 items.

Step 2: Arrange the 5 items.

\(5 items \\to 5! = 120 arrangements\)

Step 3: Arrange within the block.

\(A and B can be in order AB or BA \\to 2! = 2 ways\)

Step 4: Multiply (multiplication principle).

\[ 5! \times 2! = 120 \times 2 = 240 \]

Answer: 240

Previous
Next