Combinatorics

Combinatorics is the art of counting without counting. How many ways can you shuffle a deck of cards? How many passwords of length eight are there? How many ways can six people sit around a table if two of them refuse to sit together? You could never list them all — the numbers are astronomical — so instead you learn to count them cleverly, with a handful of powerful principles.

It is one of the most playful branches of mathematics, full of puzzles you can explain to a child and problems that stump the experts. It is also deadly serious: combinatorics underpins probability, is the backbone of algorithm analysis, and lies at the heart of cryptography and coding theory. Whenever a question begins "how many ways…", this is the subject that answers it.

The big idea: break it into steps and structure

One thread runs through everything here. A giant counting problem is almost never solved head on — it is broken into a sequence of simpler choices (multiply them), split into disjoint cases (add them), corrected for overcounting (divide, or subtract back the overlaps), or reshaped until it matches a pattern you already know. Master a few of these moves — the product rule, symmetry, inclusion–exclusion, recurrences — and enormous counts fall out in a single line.

The shape of the journey

This course moves in three stages, each building on the last.

Stage A — The counting toolkit

  1. Counting Principles
  2. Permutations and Combinations Revisited
  3. The Binomial and Multinomial Theorems

Stage B — Powerful principles

  1. The Pigeonhole Principle
  2. Inclusion–Exclusion

Stage C — Advanced counting

  1. Recurrence Relations
  2. Generating Functions
  3. Ramsey Theory and Extremal Combinatorics

Let's get started

We begin with the two rules that everything else is built from — when to multiply your choices and when to add them. Get these right and the rest of combinatorics is just careful bookkeeping.

Let's get started → Counting Principles