1. Home
  2. Explore
  3. Mathematics
  4. Combinatorics Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Combinatorics Overview

Combinatorics: The Complete Overview

✏️ Introduction to Combinatorics

Combinatorics is the study of counting, arranging, and combining elements from a set. It forms the foundation of probability because to determine how probable an event is, one must first know in how many ways that event can occur.

Key topics covered:

  • Basic counting (multiplication principle)

  • Permutations

  • Combinations

  • Partitions (including stars and bars)

  • Multinomial theorem


Basic Counting: The Multiplication Principle

The Fundamental Principle

If there are m outcomes for event A and n outcomes for event B, then there are m×nm \times nm×n outcomes for event A and B occurring together.

Basic Principle of Counting: If event A can occur in mmm ways and event B can occur in nnn ways, then the joint event (A and B) can occur in m⋅nm \cdot nm⋅n ways.

Example: Choosing a Main and Side

Suppose there are 3 possible main dishes and 4 possible side dishes. The number of main + side pairs is:

3×4=123 \times 4 = 123×4=12

Each main can be paired with any of the 4 sides, leading to 12 distinct combinations.

Practice Problems

Problem 1: 8 waiters and 5 steak options. How many waiter–steak pairs?

8×5=408 \times 5 = 408×5=40

Problem 2: 4 shirts, 13 pants, 3 hats. How many outfits?

4×13×3=1564 \times 13 \times 3 = 1564×13×3=156

The principle extends to any number of events: multiply the number of outcomes for each event.


🔄 Permutations

Definition

A permutation is an ordered arrangement of a set of objects. The key word is ordered – two arrangements with the same objects but in a different order count as distinct permutations.

Permutation: An ordered sequence of nnn distinct objects. The number of permutations of nnn distinct objects is n!n!n! (n factorial).

Counting Permutations of nnn Distinct Objects

When arranging nnn distinct items:

  • First position: nnn choices

  • Second position: n−1n-1n−1 choices

  • …

  • Last position: 1 choice

Using the multiplication principle:

Number of permutations=n×(n−1)×(n−2)×⋯×1=n!\text{Number of permutations} = n \times (n-1) \times (n-2) \times \cdots \times 1 = n!Number of permutations=n×(n−1)×(n−2)×⋯×1=n!

Factorial notation:

  • n!=n⋅(n−1)⋅(n−2)⋯1n! = n \cdot (n-1) \cdot (n-2) \cdots 1n!=n⋅(n−1)⋅(n−2)⋯1

  • 0!=10! = 10!=1 (by definition)

  • Example: 3!=3⋅2⋅1=63! = 3 \cdot 2 \cdot 1 = 63!=3⋅2⋅1=6

  • 7!=7⋅6⋅5⋅4⋅3⋅2⋅17! = 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 17!=7⋅6⋅5⋅4⋅3⋅2⋅1 (also 7⋅6!7 \cdot 6!7⋅6!)

Example: Ordering 4 People

Number of ways to order 4 distinct people:

4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 244!=4×3×2×1=24

Practice: Baseball Batting Order

9 players, how many batting orders?

9!=362,8809! = 362,8809!=362,880

Practice: Men and Women Ranked by Height

5 men and 4 women, men ordered among themselves, women ordered among themselves.

  • Men: 5!5!5! ways

  • Women: 4!4!4! ways

  • Total: 5!×4!=120×24=2,8805! \times 4! = 120 \times 24 = 2,8805!×4!=120×24=2,880

Permutations with Identical Objects

When some objects are identical, the number of distinct permutations is reduced.

If there are nnn objects total, with n1n_1n1​ identical of type 1, n2n_2n2​ identical of type 2, …, nrn_rnr​ identical of type r (n1+n2+⋯+nr=nn_1 + n_2 + \cdots + n_r = nn1​+n2​+⋯+nr​=n), then:

Number of distinct permutations=n!n1! n2! ⋯ nr!\text{Number of distinct permutations} = \frac{n!}{n_1! \, n_2! \, \cdots \, n_r!}Number of distinct permutations=n1​!n2​!⋯nr​!n!​

Example: Arranging Letters A, A, B, C

Total letters = 5 (two A's, one B, two C's).

5!2!⋅1!⋅2!=1202⋅1⋅2=1204=30\frac{5!}{2! \cdot 1! \cdot 2!} = \frac{120}{2 \cdot 1 \cdot 2} = \frac{120}{4} = 302!⋅1!⋅2!5!​=2⋅1⋅2120​=4120​=30

Practice: Word "PROBABILITIES" (13 letters)

Breakdown: P(1), R(1), O(1), B(2), A(1), I(3), L(1), T(1), E(1), S(1)

13!1! 1! 1! 2! 1! 3! 1! 1! 1! 1!=13!2!⋅3!=13!12\frac{13!}{1!\,1!\,1!\,2!\,1!\,3!\,1!\,1!\,1!\,1!} = \frac{13!}{2! \cdot 3!} = \frac{13!}{12}1!1!1!2!1!3!1!1!1!1!13!​=2!⋅3!13!​=1213!​

(Since 2!⋅3!=2⋅6=122! \cdot 3! = 2 \cdot 6 = 122!⋅3!=2⋅6=12)


🔗 Combinations

Definition

A combination is a selection of rrr objects from a set of nnn objects without regard to order. Order does not matter; only which objects are chosen.

Combination ((nr)\binom{n}{r}(rn​) or nCrn\text{C}rnCr): Number of ways to choose rrr objects from nnn distinct objects, ignoring order.

(nr)=n!(n−r)! r!\binom{n}{r} = \frac{n!}{(n-r)! \, r!}(rn​)=(n−r)!r!n!​

Derivation

Start with permutations: n⋅(n−1)⋯(n−r+1)=n!(n−r)!n \cdot (n-1) \cdots (n-r+1) = \frac{n!}{(n-r)!}n⋅(n−1)⋯(n−r+1)=(n−r)!n!​ ways to arrange rrr objects from nnn in order. Since each combination of rrr objects can be ordered in r!r!r! ways, divide by r!r!r!:

(nr)=n!(n−r)! r!\binom{n}{r} = \frac{n!}{(n-r)! \, r!}(rn​)=(n−r)!r!n!​

Example: Choosing 3 People from 4

(43)=4!(4−3)!⋅3!=241⋅6=4\binom{4}{3} = \frac{4!}{(4-3)! \cdot 3!} = \frac{24}{1 \cdot 6} = 4(34​)=(4−3)!⋅3!4!​=1⋅624​=4

(For 4 distinct people, there are four groups of 3.)

Practice Problems

Compute (10047)\binom{100}{47}(47100​):

(10047)=100!53!⋅47!\binom{100}{47} = \frac{100!}{53! \cdot 47!}(47100​)=53!⋅47!100!​

Committee Problem: 6 fathers, 8 mothers. How many committees with 2 fathers and 3 mothers?

  • Choose fathers: (62)\binom{6}{2}(26​)

  • Choose mothers: (83)\binom{8}{3}(38​)

  • Total (using multiplication principle): (62)×(83)\binom{6}{2} \times \binom{8}{3}(26​)×(38​)


📦 Partitions

A partition divides a set of elements into disjoint subsets (groups). Two types are covered: grouping with specified sizes and the stars and bars method for groups of unspecified size.

Partition with Given Group Sizes

If nnn distinct objects are to be divided into groups of specified sizes n1,n2,…,nkn_1, n_2, \dots, n_kn1​,n2​,…,nk​ (where n1+n2+⋯+nk=nn_1 + n_2 + \cdots + n_k = nn1​+n2​+⋯+nk​=n), the number of ways is:

n!n1! n2! ⋯ nk!\frac{n!}{n_1! \, n_2! \, \cdots \, n_k!}n1​!n2​!⋯nk​!n!​

This is the same formula as permutations with identical objects, but now applied to assigning distinct items to labeled groups (or individuals).

Example: 8 Fish for 3 People

  • Jiggle Bob gets 4 fish

  • Max gets 2 fish

  • Reagan gets 2 fish

Number of ways to assign the fish (distinct fish labeled A–H):

8!4!⋅2!⋅2!\frac{8!}{4! \cdot 2! \cdot 2!}4!⋅2!⋅2!8!​

The reasoning: think of each fish as a letter in an 8‑letter sequence (e.g., JJJJMMRR) where J=Jiggle Bob, M=Max, R=Reagan. The number of distinct sequences is given by the multinomial formula.

Stars and Bars Method

Used when dividing nnn identical items into kkk groups (bins) of unknown size (group sizes can be any non‑negative integers summing to nnn).

Stars and Bars: The number of ways to put nnn identical items into kkk distinct bins is:

(n+k−1n)=(n+k−1k−1)\binom{n + k - 1}{n} = \binom{n + k - 1}{k - 1}(nn+k−1​)=(k−1n+k−1​)

Why? Represent items as stars (∗*∗) and bin separators as bars (∣|∣). With kkk bins, you need k−1k-1k−1 bars. Arrange nnn stars and k−1k-1k−1 bars in a row – that's n+k−1n + k - 1n+k−1 positions. Choose which nnn positions are stars (or which k−1k-1k−1 are bars).

Example: 12 Balls into 3 Bins

(12+3−112)=(1412)=(142)=91\binom{12 + 3 - 1}{12} = \binom{14}{12} = \binom{14}{2} = 91(1212+3−1​)=(1214​)=(214​)=91

Practice: Non‑negative Integer Solutions

How many sequences (a1,a2,a3,a4)(a_1, a_2, a_3, a_4)(a1​,a2​,a3​,a4​) satisfy a1+a2+a3+a4=27a_1 + a_2 + a_3 + a_4 = 27a1​+a2​+a3​+a4​=27?

This is equivalent to putting 27 identical "units" into 4 bins. Using stars and bars:

(27+4−127)=(3027)=(303)\binom{27 + 4 - 1}{27} = \binom{30}{27} = \binom{30}{3}(2727+4−1​)=(2730​)=(330​)

📐 Binomial Theorem

Definition

The binomial theorem gives the expansion of (x+y)n(x + y)^n(x+y)n for any non‑negative integer nnn.

(x+y)n=∑k=0n(nk)xkyn−k(x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k}(x+y)n=∑k=0n​(kn​)xkyn−k

Derivation via Example: (x+y)3(x + y)^3(x+y)3

Expand with labeled subscripts: (x1+y1)(x2+y2)(x3+y3)(x_1 + y_1)(x_2 + y_2)(x_3 + y_3)(x1​+y1​)(x2​+y2​)(x3​+y3​) yields 8 terms, each selecting either xxx or yyy from each factor. Removing subscripts and grouping like terms gives:

(x+y)3=x3+3x2y+3xy2+y3(x + y)^3 = x^3 + 3x^2 y + 3x y^2 + y^3(x+y)3=x3+3x2y+3xy2+y3

Coefficients are:

  • (30)=1\binom{3}{0} = 1(03​)=1 for y3y^3y3

  • (31)=3\binom{3}{1} = 3(13​)=3 for xy2x y^2xy2

  • (32)=3\binom{3}{2} = 3(23​)=3 for x2yx^2 yx2y

  • (33)=1\binom{3}{3} = 1(33​)=1 for x3x^3x3

The general term (nk)xkyn−k\binom{n}{k} x^k y^{n-k}(kn​)xkyn−k counts the number of ways to choose kkk of the nnn factors to contribute an xxx (the rest contribute yyy).


🧬 Multinomial Theorem

The multinomial theorem generalizes the binomial theorem to more than two terms.

Multinomial Theorem: For x1+x2+⋯+xrx_1 + x_2 + \cdots + x_rx1​+x2​+⋯+xr​ raised to the nnnth power:

(x1+x2+⋯+xr)n=∑n1+n2+⋯+nr=nn!n1! n2! ⋯ nr! x1n1x2n2⋯xrnr(x_1 + x_2 + \cdots + x_r)^n = \sum_{n_1 + n_2 + \cdots + n_r = n} \frac{n!}{n_1! \, n_2! \, \cdots \, n_r!} \, x_1^{n_1} x_2^{n_2} \cdots x_r^{n_r}(x1​+x2​+⋯+xr​)n=∑n1​+n2​+⋯+nr​=n​n1​!n2​!⋯nr​!n!​x1n1​​x2n2​​⋯xrnr​​

The sum is over all non‑negative integer solutions of n1+n2+⋯+nr=nn_1 + n_2 + \cdots + n_r = nn1​+n2​+⋯+nr​=n.

The coefficient n!n1! n2! ⋯ nr!\frac{n!}{n_1! \, n_2! \, \cdots \, n_r!}n1​!n2​!⋯nr​!n!​ is called the multinomial coefficient; it counts the number of ways to assign nnn distinct items to rrr categories with n1n_1n1​ in category 1, n2n_2n2​ in category 2, etc. (identical to the partition formula).

Example: (a+b+c)4(a + b + c)^4(a+b+c)4

Total number of terms before simplification: 34=813^4 = 8134=81 (each of the 4 factors picks one of a,b,ca,b,ca,b,c). The coefficient for a2bca^2 b ca2bc is:

4!2! 1! 1!=242=12\frac{4!}{2! \, 1! \, 1!} = \frac{24}{2} = 122!1!1!4!​=224​=12

Similarly, the complete expansion is:

(a+b+c)4=∑na+nb+nc=44!na!nb!nc!anabnbcnc(a+b+c)^4 = \sum_{\substack{n_a+n_b+n_c=4}} \frac{4!}{n_a! n_b! n_c!} a^{n_a} b^{n_b} c^{n_c}(a+b+c)4=∑na​+nb​+nc​=4​​na​!nb​!nc​!4!​ana​bnb​cnc​

Summing all coefficients gives 34=813^4 = 8134=81, confirming the total number of ordered terms.


Key Takeaway

Combinatorics provides the tools to count arrangements (permutations), selections (combinations), groupings (partitions), and expansions of polynomials (binomial and multinomial theorems). The multiplication principle is the foundation upon which all these formulas rest. Mastery of these counting techniques is essential for probability and many areas of mathematics.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent