Combinatorics (source code)

= Combinatorics
{wiki}

<Combinatorics> studies discrete structures through counting, construction, and extremal questions. Its objects include <subsets>, <permutations>, <graphs>, and <set partitions>. The question is often easy to ask: how many teams can we choose, how many arrangements avoid a collision, or how few connections are enough? The challenge is to organize the possibilities so that every permitted object is counted exactly as intended.

For example, choosing two people from five gives ten teams. Choosing a captain and deputy from those same five gives twenty assignments. The difference is whether order is part of the object: a team is a <subset>, while the two named roles distinguish an <ordered pair>. The <binomial coefficient> and the <rule of product> encode these two counting problems. Choosing the right objects comes before manipulating a formula.

The beauty is that a change of viewpoint can turn enumeration into an explanation. <Double counting> connects two descriptions of one collection; <Pascal's identity> splits a selection into cases; the <inclusion-exclusion principle> repairs overlapping counts. These methods also supply exact finite models for <probability> and help measure the possibilities an <algorithm> must handle. Richard Stanley's textbook introduces the subject through counting questions and then develops these general tools. <Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley>{ref}