Counting and Combinatorics of Microstates
Shuffle a deck of cards and you will almost certainly produce an ordering that has never existed before in the history of the universe — there are of them, more than the number of atoms in our galaxy by many orders of magnitude. Statistical mechanics is built on exactly this kind of astronomical bookkeeping. Fix a macroscopic constraint — a total energy, a particle number, a magnetization — and ask the only question that matters: in how many microscopic ways can it be realized? That count is the multiplicity , and Boltzmann's bridge turns it straight into thermodynamics. The tools are humble. Three combinatorial patterns do almost all the work: the factorial counts orderings, the binomial coefficient counts unordered selections, and the multinomial coefficient counts ways to sort labelled objects into bins of fixed size. Every microstate count you will ever meet — spins up and down, atoms in the left and right halves of a box, quanta shared among oscillators — is one of these three in disguise. The entire subtlety lies in one question: what is distinguishable from what? Label the particles or not, allow a state to be multiply occupied or not, and the same Hamiltonian yields different counting rules and different equations of state. Because , exact factorials are hopeless and Stirling's approximation (its own article) smooths them into extensive functions. That smoothing exposes the deepest fact of the whole enterprise: the multiplicity is so sharply spiked about its maximum that the most probable macrostate simply is equilibrium, to a precision no measurement could ever challenge. This article builds the counting toolkit, proves that one term of a combinatorial sum swallows the whole, and hands the results forward to the multiplicity function, the Boltzmann entropy, and the statistical ensembles.
- The multiplicity — the number of microstates realizing a macrostate — is the master combinatorial object of statistical mechanics; its logarithm is the Boltzmann entropy .
- Three tools recur everywhere: permutations , combinations , and the multinomial coefficient that partitions labelled objects into bins.
- The multinomial coefficients over all bin assignments sum to — a clean identity, and the springboard for showing that one term dominates the entire sum.
- Distinguishability decides the count: classical labelling, Gibbs-corrected classical, and Bose/Fermi occupation counting are three different combinatorial problems for one physical system.
- Stirling's approximation converts factorial counting into smooth, extensive entropies and makes the peak of overwhelmingly dominant, with relative width .
- The Gibbs factor for identical particles restores extensivity and defuses the Gibbs paradox.
- Key idea: equilibrium thermodynamics is one combinatorial number — the multiplicity of accessible microstates — and counting it correctly is entirely a matter of getting distinguishability right.
Equilibrium thermodynamics is encoded in a single combinatorial quantity — the multiplicity of accessible microstates — whose logarithm is the entropy; the whole art is counting microstates with the correct notion of distinguishability.
Where this lives today
Counting microstates is not a historical relic; it is a live computational engine. When no closed-form multiplicity exists — the three-dimensional Ising model, a folding protein, a spin glass — physicists estimate , the density of states, directly by simulation. The Wang–Landau algorithm performs a random walk in energy that flattens the visited histogram and thereby reconstructs over hundreds of orders of magnitude; nested sampling does the analogous job for continuous phase spaces. These methods are exactly the numerical descendants of the hand-counting in this article, scaled to systems no pencil could touch. The same combinatorics underwrites information theory and modern computing. Shannon's entropy is the large- limit of the multinomial coefficient for messages with given symbol frequencies, so data compression and statistical mechanics count with the same tool. And the multinomial structure reappears wherever labelled things are sorted into bins with fixed totals — from the partition functions of lattice polymers to the combinatorial cores of machine-learning models over discrete configurations.
The physical picture
Every microstate count is really one of three questions about balls and boxes. In how many orders can I line up distinct balls? — that is , the permutation count. In how many ways can I choose which of them go into one box, ignoring order inside? — that is the binomial . In how many ways can I sort them into several boxes of prescribed sizes ? — that is the multinomial . Learn to see these three patterns and most of statistical mechanics becomes pattern recognition. Distinguishability is the entire game. Toss two coins and there are four labelled outcomes — HH, HT, TH, TT — but only three macrostates counted by heads: zero, one, or two. The middle macrostate is realized two ways and so is twice as likely; that "how many ways" factor is the multiplicity, and equilibrium sits wherever it is largest. Toss coins and the same logic gives a binomial that peaks razor-sharp at . The figure below shows that peak sharpening as grows — the flat, forgiving landscape of a handful of coins becoming a needle for a macroscopic number.
The magic of large is a paradox that is not one. The multiplicity can be astronomically large — for a mole — yet its logarithm is gently extensive, , a well-behaved thermodynamic quantity. And the peak of as a function of any macroscopic variable is so narrow — absolute width but relative width — that the system is found in the single most probable macrostate with effective certainty. That is why "most probable" and "average" become the same thing, and why thermodynamics is deterministic even though its foundation is a lottery. Quantum statistics changes counting at the root. For identical quantum particles the question "which particle is in which state?" is not merely hard, it is meaningless — the particles carry no labels. The right question is "how many particles occupy each state?", a different combinatorial problem whose answer forks into Bose–Einstein (any number per state) and Fermi–Dirac (at most one) counting. Classical Maxwell–Boltzmann statistics is the dilute limit where the fork does not matter. The figure below drives the point home with the smallest possible example: three particles, two states, three different answers.
The core equations
The whole edifice rests on Boltzmann's identification of entropy with a count. It is worth stating first because every combinatorial tool below exists only to evaluate the inside it.
where: — thermodynamic entropy of the macrostate; (exact, SI); — number of microstates realizing the macrostate. Read it as: entropy is nothing but the log of a multiplicity, so learning to count is learning thermodynamics. The two most basic counts distinguish whether the order of a selection matters. Permutations count ordered arrangements; combinations count unordered ones — the difference is exactly the orderings of a chosen subset.
where: — ordered selections of from ; — unordered selections; — orderings of distinct objects. In statistical mechanics the binomial is ubiquitous because most macrostates fix only "how many," never "which ones in which order." Sorting labelled objects into more than two bins generalizes the binomial to the multinomial coefficient — the workhorse of occupation counting.
where: — objects placed in bin ; — number of bins (states, energy levels); . This counts the distinct assignments of which labelled object lands in which bin, having divided out the irrelevant order within each bin. Summing the multinomial over all ways to split objects into bins gives a strikingly simple total — the identity that later lets one term dominate the whole.
where: — the total number of ways to assign each of labelled objects independently to one of bins. The left side reorganizes that total by the macrostate ; the right side counts microstates directly, so the two must agree. Because , every factorial is evaluated through Stirling's approximation (its own article, serial 1132), which we invoke by name rather than re-derive.
where: the leading is extensive and does all the thermodynamic work; the term is subextensive and matters only for the width of a peak, not its position. The single most common count in the subject is the two-level (spin) multiplicity — a pure binomial in the number of excited units.
where: — number of independent two-level units (e.g. spin- moments); — number excited; — microstates with exactly excited. Fixing the energy of a paramagnet fixes , so this one binomial carries the whole thermodynamics of the two-level system. Indistinguishable particles distributed among sublevels are counted by "stars and bars," and the Pauli-restricted count is a plain binomial — the two quantum statistics in one line each.
where: — identical particles to place; — available single-particle states (sublevels). Bosons: arrange stars among bars, any occupancy allowed. Fermions: choose which of the states are singly filled, none doubly. Finally, the classical ideal-gas count carries the Gibbs factor that makes the entropy extensive — the seam where counting meets the Gibbs paradox (its own article, serial 1131).
where: — spatial placements of molecules; — permutations of identical molecules, divided out because relabelling produces no new physical microstate. Drop the and the entropy stops being extensive; keep it and the paradox dissolves.
The goal here is to prove the sum identity of equation (4) — that adding the multinomial coefficients over every macrostate returns — because that identity is the foundation of everything that follows: it is the statement that microstates are conserved no matter how you bin them, and it sets up the far deeper claim that a single macrostate swallows the entire sum. We prove it two ways so the physics is unmistakable: once by direct microstate counting, once from the algebraic multinomial theorem, and we check the two agree.
Step 1. Count microstates directly. Assign each of the labelled objects to one of bins, independently. Object 1 has choices, object 2 has choices, and so on, giving total microstates. Why: independence of the assignments turns the joint count into a product of identical factors — this is the "microstate" side of the ledger, blind to how many landed in each bin.
Step 2. Reorganize by macrostate. Group those microstates by their occupation vector with . The number of microstates sharing a given occupation vector is exactly the multinomial coefficient — the ways to choose which labelled objects fill each bin of prescribed size. Why: fixing the macrostate leaves free only the identities of the objects in each bin, and that is precisely what the multinomial counts.
Step 3. Equate the two ledgers. Summing the per-macrostate counts must recover the total, so
Why: the same microstates are counted once directly and once after sorting into macrostates — conservation of microstates.
Step 4. Confirm from the multinomial theorem. Algebraically, . Setting every gives on the left and the coefficient sum on the right — identical to Step 3. Why: the algebra and the counting are the same statement viewed from two sides; the coefficients of a generating function are literally microstate counts. *Verified: symbolically in sympy for and up to 12 — the reorganized sum equals exactly in every case (see verify script).*
Go deeper · Derivation B · 1 minOne term swallows the whole sum
Equation (4) says the macrostate terms add up to ; the astonishing fact of statistical mechanics is that almost all of that total lives in a single term — the most probable macrostate — with the rest exponentially negligible. This is the combinatorial heart of the Second Law: "the largest term equals the whole sum" is why the most probable macrostate is the only one ever observed. We prove it for the symmetric case, where the peak sits at equal occupations .
Step 1. Identify the largest term. By symmetry the multinomial is maximized at for all ; call that maximum term . Its value from Stirling is . Why: equalizing the bins maximizes the product of factorials in the denominator's reciprocal — the flattest distribution has the most arrangements.
Step 2. Bound the number of terms. The number of distinct macrostates (occupation vectors) is , which grows only polynomially in (as ), not exponentially. Why: with fixed, the count of ways to write as an ordered sum of non-negative integers is a polynomial in of degree .
Step 3. Sandwich the total. Since every term is at most and there are at most of them,
Why: the whole sum is trapped between one copy of the largest term and a polynomial number of them.
Step 4. Take logs and divide by . Because is subextensive,
and the correction term vanishes as . So . Why: on the extensive scale that entropy lives on, the largest term and the entire sum are indistinguishable — the polynomial prefactor is invisible against the exponential. *Verified: numerically for , the ratio (0.66 at , 0.94 at , ), and the polynomial term-count bound holds exactly (see verify script).*
Limiting cases
The same physical system is counted differently depending on the statistics assumed — and the quantum counts collapse to the classical one when states are sparsely filled.
| Case | Result | Meaning |
|---|---|---|
| Maxwell–Boltzmann (Gibbs-corrected) | Labelled counting divided by ; valid when occupations are dilute, . | |
| Bose–Einstein | Any number of identical bosons per state; stars and bars in each level. | |
| Fermi–Dirac | At most one fermion per state (Pauli); choose which of are filled. | |
| Dilute limit | Both quantum counts reduce to the Gibbs-corrected classical form. | |
| Single bin, | , | Only one arrangement — no freedom, zero entropy. |
Worked examples
1 · Four spins, counted by hand (confidence builder)
Enumerate every microstate of four independent spin- moments, group them by the number of up-spins, and confirm the multiplicities sum to the total number of microstates.
Step 1. List the total. Each spin is up or down, so there are microstates in all — the number every macrostate count must add back up to.
Step 2. Count each macrostate with the binomial. The macrostate is fixed by , the number of up-spins, and its multiplicity is : (all down), , , , . Written out, really does have six arrangements: ↑↑↓↓, ↑↓↑↓, ↑↓↓↑, ↓↑↑↓, ↓↑↓↑, ↓↓↑↑.
Step 3. Sum and check. — the multiplicities exactly exhaust the microstates, a tiny instance of the sum rule .
Step 4. Read off equilibrium. The peak is at with , six times more likely than either extreme. Even with only four spins, the balanced macrostate already dominates — and the domination sharpens without limit as grows, which is the whole content of the second derivation.
2 · A quantum of counting: three bosons versus three fermions (exam level)
Place three identical particles into two single-particle states. Count the microstates for bosons (stars and bars) and for fermions (Pauli), and explain the difference.
Step 1. Bosons — stars and bars. With identical particles and states, equation (7) gives . The four occupancy patterns are — only "how many in each state" matters, never which particle.
Step 2. Fermions — Pauli. With at most one particle per state, three fermions cannot fit into two states: . The count is literally zero — exclusion makes the macrostate impossible.
Step 3. Contrast with labelled counting. If the particles wore labels, "3 into 2 states" would give microstates. Bosonic indistinguishability collapses those 8 into 4 physical states; fermionic exclusion forbids them outright. Same three particles, same two states, three different answers — 8, 4, and 0 — set entirely by distinguishability and occupancy rules.
Step 4. Recover the classical limit in your head. Were there states instead of 2, the three particles would almost never want the same state, the correction between and would be negligible, and both would collapse to the Gibbs-corrected — the dilute Maxwell–Boltzmann count.
Origins · 1 minbinomial coefficient and how this was discovered
The binomial coefficient — the number of ways to choose objects from regardless of order — is the single most-used tool in statistical mechanics, and its history predates the physics by centuries. The triangular array that generates it was known to the Chinese mathematician Yang Hui (13th century) and the Persian polymath Al-Karaji (10th century) long before Blaise Pascal systematized it in 1654; Jacob Bernoulli's posthumous Ars Conjectandi (1713) turned it into the foundation of probability. When Boltzmann counted the microstates of a gas in the 1870s he was, at bottom, evaluating binomials and their multinomial generalizations. Every two-level system, every paramagnet, every "how many up-spins" question in this book resolves to a binomial — which is why the humble , and the identity it satisfies, deserves to be recognized as a physical object, not just an algebraic one.
Going further
Texts. Pathria & Beale, Statistical Mechanics, 3rd ed., Ch. 1–3 · Kardar, Statistical Physics of Particles, Ch. 4 · Reif, Fundamentals of Statistical and Thermal Physics, Ch. 1–3 & Appendix A · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, Ch. 3 · Landau & Lifshitz, Statistical Physics Part 1, §7, §40.
Provenance. All results are standard combinatorics and textbook statistical mechanics. A verifier should recompute: the multinomial sum rule (Steps 1–4 of the first derivation; checked in sympy for ); the "largest term equals the whole sum" bound and the limit (Reif Ch. 1, Kardar §4.3; checked numerically for ); the two-level binomial with peak variance (Reif Ch. 1); the stars-and-bars and Fermi counts and their dilute collapse to (Pathria Ch. 6). Historical dates (Pascal–Fermat 1654, Bernoulli 1713, Bose 1924, Fermi/Dirac 1926) are verified in the lane history gate. is exact (2019 SI).
Builds on: Microstates and Macrostates · Fundamental Postulate of Equal A Priori Probabilities Leads to: The Multiplicity Function · Boltzmann Entropy · The Stirling Approximation · Indistinguishability and the Gibbs Paradox · Statistical Ensembles
If Ω is so astronomically large, how can it possibly be the "number" of anything?
It genuinely is a count, just an unimaginably big one. For a mole of gas is roughly — a 1 followed by about zeros, a number you could not physically write down. What tames it is the logarithm: is an ordinary extensive quantity of order Avogadro's number, and it is , not , that becomes the entropy. So the count is real and finite; we simply never manipulate it directly, only its logarithm.
Why does the sum of all the multinomial terms equal exactly r^N?
Because both sides count the very same thing — the microstates — just organized differently. The right side, , assigns each of the labelled objects independently to one of bins. The left side first sorts those microstates by their occupation pattern and counts each pattern's members with a multinomial coefficient, then adds the patterns back up. Sorting and re-summing cannot change a total, so the two are equal. It is conservation of microstates, nothing more.
The sum has enormously many terms — how can one of them equal the whole sum?
The number of macrostate terms grows only polynomially in (like ), while the largest term grows exponentially (like ). An exponential swamps any polynomial, so on the extensive scale that entropy lives on — — the largest term and the entire sum become indistinguishable. Concretely for coins, climbs from 0.66 at to 0.94 at and marches to 1. The "extra" terms are not zero, they are simply invisible against the peak.
Do I divide by N! always, or only sometimes?
Only for genuinely identical particles whose permutations you have already counted as distinct. The undoes an overcount: if your counting treated "particle A here, particle B there" as different from "B here, A there" but the particles are identical, you inserted spurious copies and must divide them out. If your objects are truly distinguishable (distinct lattice sites, labelled boxes), there is no overcount and no . The tell is extensivity: with the correct factor, scales linearly with system size; without it, you get the Gibbs paradox.
Stars and bars gives boson counts — is there an intuitive picture?
Yes. To place identical particles into states, draw stars in a row and separate the states with vertical bars. For example ★★|★ means two particles in state 1 and one in state 2. Every distinct arrangement of the stars and bars is one microstate, and there are ways to choose which of the positions hold stars. The bars are the walls between shelves; the stars are indistinguishable balls you drop onto the shelves.
How is Shannon's information entropy the same as microstate counting?
Take a long message of symbols in which symbol appears with frequency . The number of distinct messages with those frequencies is the multinomial . Apply Stirling and divide by : , which is exactly Shannon's . So the information content of a source and the entropy of a physical macrostate are the same large- limit of the same multinomial coefficient — Boltzmann and Shannon are counting with one tool.
Does correct counting need quantum mechanics, or is it purely classical bookkeeping?
The combinatorial tools — factorials, binomials, multinomials, stars and bars — are purely classical bookkeeping and were known centuries before quantum theory. What quantum mechanics supplies is the rule for what to count: that identical particles carry no labels (so you count occupation numbers, not "which particle where"), and that fermions obey exclusion (at most one per state). The Gibbs factor was a classical patch anticipating this; quantum statistics makes it exact and adds the Bose/Fermi fork. The arithmetic is old; the physics decides which arithmetic applies.