A microstate is one exact configuration of a model. A macrostate groups many microstates by a shared observable, such as how particles are divided between two regions. The distinction lets code retain enough detail for dynamics while reporting aggregate questions a reader actually asks.
Think like a programmer
Represent a microstate as serializable immutable data and a macrostate as a pure reducer. Count or sample configurations with a declared method, weighting rule, seed, and sample count; do not infer probability from a hand-picked animation frame. Keep a canonical state encoding so equivalent states are not accidentally counted twice or silently collapsed.
Microstate stream or enumerated set, macrostate counts/weights, normalization total, rejected-state count, and metadata.
Rule
Classify every accepted configuration, accumulate count or weight by macrostate, then normalize by the same accepted total.
Output
Macrostate probabilities, multiplicities or weighted frequencies, and reproducibility/normalization diagnostics.
Check
Probabilities sum to one within tolerance; impossible states have zero count; identical seed/method repeats a sampled stream; an exact enumeration count matches the reducer's accepted-state total.
\[P(M)=\frac{\Omega(M)}{\Omega_{\rm total}}\]
This formula requires a particular ensemble assumption: allowed microstates are equally weighted. For two distinguishable particles that can each occupy left or right, the four microstates are LL, LR, RL, and RR. A reducer that counts particles on the left produces macrostates 2, 1, and 0 with multiplicities 1, 2, and 1. The middle macrostate is more likely under uniform sampling because more exact configurations map to it—not because the reducer prefers balanced output.
Enumeration is useful for a small fixture because it exposes every state and provides an exact count. Sampling is necessary when enumeration is too large, but then uncertainty, burn-in/mixing policy for dependent samplers, and the seed must travel with the probability estimate. Constraints and energies can make weights unequal; in that case use the declared weighted distribution rather than raw multiplicity.
Try this experiment
Prediction: Macrostates with more compatible microstates occur more often in unbiased sampling.
Define a two-region occupancy reducer and a unit test for its possible counts.
Where this model breaks
Equal microstate probability is an assumption. Biased dynamics, energy-dependent weights, constraints, indistinguishability conventions, non-equilibrium drives, and poor sampler mixing can change the distribution. A macrostate reducer also discards detail; it cannot by itself predict future dynamics unless the model proves omitted state is irrelevant.
Summary
Model exact configurations separately from aggregate labels, then compute probabilities from reproducible counts or declared weights. Test encoding, acceptance, normalization, and sampling assumptions before interpreting multiplicity as physical likelihood.
Glossary
Microstate: exact modeled configuration.
Macrostate: grouped observable description.
Multiplicity: number of microstates in a macrostate.
Self-check
Which function maps micro to macro?
What must normalized probabilities sum to?
What assumption makes multiplicity predictive?
Sources
L. E. Reichl, A Modern Course in Statistical Physics.
Model contract
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.
Implement the idea as a model
For Probability and Microstates, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Entropy and the Second Law, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Guided experiment
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
Where this model breaks
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Summary
Treat Probability and Microstates as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Glossary
Input: a measured value or chosen parameter supplied to a model.
State: the smallest set of values needed to continue or reproduce a model.
Validation: comparing an output with a known result, limit, invariant, or measurement.
Self-check
Which values are inputs, and which values must remain state?
What observable result would tell you the model is behaving as expected?
Which assumption would you test first before applying the model to a real system?
Model review: turn Probability and Microstates into a test
Encode microstates and derive reproducible macrostate probabilities from explicit counts.
Name the inputs and units that the entropy and the second law model needs.
Separate the state you must keep from values you can calculate when needed.
Write one rule that maps the current state and inputs to an observable result.
Choose a limiting case, unit check, invariant, or known result before trusting an output.
State one assumption you would change before using this simplified model for a real decision.