The Simple Instruction
In 1876 Josef Loschmidt pointed out that if every velocity in a gas were reversed, the laws of motion would run it straight back to where it began, so those laws alone cannot make entropy rise (Kelvin had said the same two years earlier). Here is a gas of 128 disks that really can be reversed, to the last bit, because its arithmetic is whole numbers: reverse it and it comes home exactly. Move one disk by five billionths of its width and, somewhere between 15 and 35 collisions later, it never does; ordinary floating point fails the same way. Two pre-registered tests, one of them of Kelvin's own 1874 guess about bigger gases, and the famous reply “go ahead, reverse them” traced back as far as we could, to a 1959 book that says only “reportedly”.
Here are 128 disks in a box, every one of them starting in the left half. Press run and they spread out, because that is what gases do. Now press Reverse. Every disk's velocity is turned around, and the gas runs its own history backwards, every collision undone in reverse order, until all 128 are back in the left half, each one in exactly the place it began, moving at exactly its starting speed in exactly the opposite direction. Not approximately: reverse once more and all 512 whole numbers (two coordinates and two velocity components for each disk) are identical to the start.
The gas has spread. Press Reverse every velocity, then Run, and watch it come home; it pauses at t = 0, the moment it arrives. Then press Reset, let it run to a stop again, and this time press Nudge one disk just before you reverse. (The run stops at 2,000 steps because on this gas a one-step nudge needs a trip of 1,700 or more to break the return; nudge after a shorter trip and it still comes home.)
The line is the share of disks in the left half, drawn in the order it happened: after a reversal it doubles back over itself. Press Reverse at the very start, before running, and the gas spreads into the past just as it spreads into the future.
This is the objection that Josef Loschmidt put to Ludwig Boltzmann in 1876, and it has never been made to go away. Newton's laws do not care which way time runs: film two billiard balls colliding, play it backwards, and you are watching another perfectly legal collision. So if a gas spreads out by obeying those laws, the reversed gas, obeying the very same laws, must un-spread. For every history in which the entropy climbs there is a mirror history in which it falls, and the mechanics cannot tell them apart. Where, then, does the one-way arrow of the Second Law come from?
The box answers half the question in a way you can hold. The laws really are reversible (you just watched them run backwards), and the gas really does un-spread when you reverse it. The other half is in the button marked Nudge one disk.
One grid step
Positions in this box are whole numbers. The box is 2³² = 4,294,967,296 steps wide, and a disk is 0.05 of the box across, so one grid step is about five billionths of a disk. If the disks were a centimetre wide, a grid step would be 0.047 nanometres, smaller than the radius of a hydrogen atom (0.053 nm). Reverse the gas, but at the moment of reversal move a single disk by that single step. Nothing else changes.
For a short trip the gas still comes home. For a long one it does not: the nudged disk's next collision goes very slightly differently, which makes the two disks it touches go very slightly differently, and each collision multiplies the difference. Measured here, the error grows by 13.4 to 14.8 bits per thousand steps, and a disk meets another about once every 106 to 118 steps, so the difference is multiplied by 2.8 to 3.1 times between one collision and the next: it roughly triples. Tripling each time, five billionths of a disk becomes a whole disk in about eighteen collisions. After that the reversed gas has no idea it was ever meant to go back.
Hollow rings mark where each disk started; filled disks are where the returned gas actually is.
The test of "came back" is the one used for every horizon on this page: every disk within one diameter of where it began. Your browser runs the same engine as the measurement, so seed 1's numbers in the table below are the ones you will reproduce here.
The horizon, measured
Before measuring, the prediction was written down and committed (the pre-registration): if the error grows by a fixed number of bits per step, then doubling the nudge should cost a fixed number of steps of return, and that number should be one over the growth rate, measured separately. A nudge 2²⁴ times bigger should shorten the trip by 24 of those intervals. The rate was measured on five different gases (five seeds), each by nudging eight different disks in an already-mixed gas and fitting the growth of their separation from 2⁸ to 2²⁴ grid steps: 13.4 to 14.8 bits per thousand steps. Then the horizon (the shortest trip, on a grid of 100-step trips, from which the gas fails to come home) was found for nudges of 1, 2⁴, 2⁸ … 2²⁴ grid steps.
The pre-registered verdicts. Prediction 1, that the exact gas never fails without a nudge: held on all 5 gases, at every trip length from 100 to 8,000 steps. Prediction 2, that each gas's measured slope is within 25% of the one its growth rate predicts: held for 3 of the 5 (ratios 0.75, 0.86, 1.34, 1.00, 0.68; seed 3's horizons fell faster than predicted and seed 5's slower). Averaged over the five the ratio is 0.93, but the pre-registration asked about each gas separately, and by that test the rule held on 3. Prediction 3, that floating point fails later than a one-step nudge: held on 4 of the 5; on seed 3 the one-step nudge took 3,600 steps to break the return and floating point 3,300. On seed 1, the gas you can rerun above, a one-step nudge broke the return at 1,700 steps and floating point at 3,200.
What the misses showed, looked at afterwards (not pre-registered). The irregular point is the smallest nudge. A one-grid-step nudge can hide: a disk's force is rounded to a whole number of grid steps before it acts, so moving a disk by one step often leaves every rounded force exactly as it was, and the difference sits invisible inside that disk until an encounter is close enough to notice. Measured afterwards, over 160 nudges (five gases, eight moments, four different disks), the time until any other disk's position differs had a median of 413 steps for a one-step nudge, 248 for two steps, 172 for four, 88 for sixteen and 43 steps for 256 steps (the last is probably mostly the wait for the nudged disk's next encounter, which we did not measure separately). So the smallest possible disturbance in this world is slower to start than the rule "doubling costs a fixed interval" assumes. That explains why seed 3's one-step horizon sits so high, but it does not rescue the prediction: refitting each gas without the one-step point (also after the fact) gives ratios of 0.63 to 0.85, three gases outside the band instead of two. The forward growth rate overstates, by about a quarter, how many steps each doubling of the nudge costs on the way back. Why, we have not established. The script is posthoc-hiding.mjs, written after the results were seen.
Why ordinary arithmetic cannot go home
Switch the box to floating point, the arithmetic almost every physics simulation uses, and the same gas, with the same disks, the same force and the same step, does not come back from a long trip even when nobody touches it. The equations are just as reversible. The trouble is that every x + v·dt is rounded to the nearest representable number, and the rounding has no idea which way time is running: rounding on the way out is not undone by rounding on the way back. The gap after a round trip of 500 steps is about 3 × 10⁻¹⁴ of the box on seed 1 (between 3 × 10⁻¹⁴ and 1.1 × 10⁻¹³ over the five gases), and it grows like any other nudge. Floating point failed between 3,100 and 3,600 steps on the five gases, later than a one-grid-step nudge on four of the five gases (a double's rounding error, around 10⁻¹⁶ of the box, is far smaller than 2⁻³²), but not never. Read off each gas's fitted line, as pre-registered, floating point behaves like a nudge of between 2⁻⁶ and 2⁻³⁰ of a grid step.
The integer gas comes home because the rounding is written into its law of motion. Following Levesque and Verlet (1993), the force is computed in floating point and then rounded to a whole number of grid steps before it moves anything, and the update rule, applied to whole numbers, can be run exactly backwards: given where a disk is and how far it just moved, there is exactly one place it came from. The rounding is no longer an error. It is part of the physics, the same physics in both directions. That is why the round trip returns all 512 integers: the verifier checks it bit for bit on all five gases at trips of 500, 2,000, 6,000 and 8,000 steps, and the measurement found every disk home at every trip length on its grid out to 8,000.
Who said it first
The objection carries Loschmidt's name, but William Thomson (later Lord Kelvin) had made it, in full, two years before him. On Monday 16 February 1874, with Thomson himself in the chair, the Royal Society of Edinburgh heard his paper "The Kinetic Theory of the Dissipation of Energy" (Proc. R. Soc. Edinburgh 8, 325 to 334; reprinted in Nature 9, 441 to 444, on 9 April):
“If, then, the motion of every particle of matter in the universe were precisely reversed at any instant, the course of nature would be simply reversed for ever after. The bursting bubble of foam at the foot of a waterfall would reunite and descend into the water; […] Boulders would recover from the mud the materials required to rebuild them into their previous jagged forms, and would become reunited to the mountain peak from which they had formerly broken away. And if also the materialistic hypothesis of life were true, living creatures would grow backwards, with conscious knowledge of the future, but no memory of the past, and would become again unborn.”Thomson 1874, pp. 325 to 326
A few pages on he does it to a gas, which is exactly what the first box on this page does: let the temperature become “very approximately equalised”, reverse every particle, and
“Each molecule will retrace its former path, and at the end of a second interval of time, equal to the former, every molecule will be in the same position, and moving with the same velocity, as at the beginning; so that the given initial unequal distribution of temperature will again be found, with only the difference that each particle is moving in the direction reverse to that of its initial motion.”Thomson 1874, p. 329
Thomson was not troubled by this. He took it as the explanation of the Second Law, not a threat to it: the law is a statement about what is overwhelmingly probable. He even worked an example. A sealed jar holds 2 × 10¹² molecules of oxygen and 8 × 10¹² of nitrogen; the odds against finding all the oxygen and none of the nitrogen in one chosen fifth of the jar are, he wrote, a number with “about 2,173,220,000,000 of places of whole numbers”. That is right: the odds are 5 to the power 2 × 10¹² times (5/4) to the power 8 × 10¹², and the base-ten logarithm of that is 2.17322 × 10¹², which is the (10 − 26 log 2) × 10¹² of his appendix.
Loschmidt's version came on 27 January 1876, presented to the Vienna Academy inside a long paper about the temperature of a gas held down by gravity (Wiener Berichte 73, II, 128 to 142). He imagines his gas settled into its steady state, and then every velocity turned round. For a good while the reversed gas would still look steady, “but gradually the stationary state would, as it were, deteriorate, and after the lapse of the time τ we would infallibly have arrived back at our initial state”. And then, on page 139:
„Offenbar muss ganz allgemein, in jedem beliebigen System, der gesammte Verlauf der Begebenheiten rückläufig werden, wenn momentan die Geschwindigkeiten aller seiner Elemente umgekehrt werden.
Das berühmte Problem, Geschehenes ungeschehen zu machen, hat damit zwar keine Lösung, doch eine einfache Formulirung erhalten, welche in der simplen Anweisung besteht, die momentanen Geschwindigkeiten aller Atome des Universums plötzlich umzukehren.“Loschmidt 1876, p. 139. Our translation: “Evidently, quite generally, in any system whatever, the entire course of events must become retrograde if at some moment the velocities of all its elements are reversed. The famous problem of making what has happened un-happen has thereby received, not a solution, but a simple formulation, which consists in the simple instruction: suddenly reverse the momentary velocities of all atoms of the universe.”
We searched Loschmidt's text (our own OCR of all fifteen pages) for a reference to Thomson's 1874 paper and found none; the only Thomson he cites there is the 1851 statement of the Second Law. Whether he knew of it we cannot say.
Boltzmann answered in January 1877 (“Bemerkungen über einige Probleme der mechanischen Wärmetheorie”, Wiener Berichte 75, II, 62 to 100, section II). He called it “äusserst scharfsinnig”, extremely ingenious, and granted the mechanics: the reversed gas does run backwards. Restating the argument in his own words, he drew its consequence, which puts the arrow where the first box shows it lives:
„Über das Vorzeichen dieses Integrales kann also nicht aus dem Wirkungsgesetze der Kräfte, sondern blos aus den Anfangsbedingungen ein Schluss gezogen werden.“Boltzmann 1877, p. 69 (the integral is ∫dQ/T). Our translation: “Thus no conclusion about the sign of this integral can be drawn from the law of action of the forces, but only from the initial conditions.”
Then he called the inference that the Second Law therefore cannot be proved “ein interessantes Sophisma”, an interesting sophism, and gave his answer. The counting argument that became statistical mechanics: for every starting state that leads to an un-mixed gas there are “unendlich vielmal mehr”, infinitely many more, that lead to a mixed one, so the reversed case is “ausserordentlich unwahrscheinlich”, extraordinarily improbable, and “für die Praxis” impossible, though not impossible. And on page 72 he notices the V in the plot above: that if we follow the universe back into the infinitely distant past, we are just as entitled to expect it to arrive at a state with no temperature differences as when we follow it into the future. (That paragraph is his; the page it is quoted from is in the sources file with the German.)
“Go ahead and reverse them”
The story everyone tells is that Boltzmann answered Loschmidt in four words: go ahead, reverse them. We looked for it. It is not in Loschmidt's paper, not in Boltzmann's reply, not in Boltzmann's second paper of 1877 (whose text, in our OCR, never names Loschmidt), and not in the memorial address Boltzmann gave for Loschmidt in 1895, which recalls “die Idee des Umkehrens alles Geschehens”, the idea of reversing all events, without any retort. The earliest printing we could find is Mark Kac, Probability and Related Topics in Physical Sciences (1959, from lectures given in 1957), page 61: “To this objection Boltzmann reportedly replied ‘go ahead, reverse them!’”, with no source given. Most later books hedge it (“reportedly”, “reputed”, what “tradition attributes”), though at least one, Paul Davies's The Physics of Time Asymmetry (we saw the 1977 edition), states it flatly. So: unattested before 1959, as far as we could check. We could not search Google Books, HathiTrust or Gallica from here, so an earlier printing may exist.
Thomson's other sentence, tested
Thomson did not think a slightly imperfect reversal would fail. He thought it would work, for a while:
“The number of molecules being finite, it is clear that small finite deviations from absolute precision in the reversal we have supposed would not obviate the resulting disequalisation of the distribution of energy. But the greater the number of molecules, the shorter will be the time during which the disequalising will continue; and it is only when we regard the number of molecules as practically infinite that we can regard spontaneous disequalisation as practically impossible.”Thomson 1874, pp. 329 to 330
That is a prediction about exactly this box, so we ran it, with a second pre-registration committed first. Gases of 32 to 1,024 disks at the same density, time counted in collisions (Thomson's own unit: “the average interval of free motion between consecutive collisions”). Each gas runs until its left-half share first falls to 55%, then every disk is moved by a small random amount and the gas is reversed. Three sizes of error, three seeds each.
His first sentence held, and more strongly than he needed: even when every disk was off by up to 1/256 of its own width, so that in the larger gases some disk had wandered more than a whole diameter from its exact reversed path within three to six collisions, the reversed gas still regained between 91.5% (1,024 disks, the mean of three gases; the lowest single gas 91.4%) and 100% (up to 64 disks) of the left half. The prediction that bigger gases regain less held in all 9 of the 9 cells.
His second sentence, in the form we tested, did not. We had written down beforehand that it would fail, and why: the error multiplies by a fixed factor per collision whatever the size of the gas, while a bigger gas takes more collisions to equalise in the first place (3.2 for 32 disks, 16.3 for 1,024). So the un-mixing should last longer in bigger gases, not shorter, and it did, in all 9 of the 9 cells: the reversed gas kept un-mixing for between 81% and 100% of the time the mixing had taken, at every size. What shrinks with size is not the duration but the completeness. A third prediction failed. We expected the time until some disk is a diameter off its exact path to vary by no more than 1.5 times across sizes. It could be judged on only 2 of the 9 cells (in the rest the smaller gases finished before it happened), and it failed on both (1.73 and 1.83 times). With the largest error it rose and then fell (about 4.5 collisions at 32 disks, 5 to 6 at 64 to 128, about 3 at 1,024; the fall is a small, microscopic version of what Thomson said), and with the smaller errors, where only the larger gases could be read, it lengthened (for the 2−16 error, from about 9 collisions to about 11.5).
This tests one reading of his sentence: an error of fixed size on every molecule, and gases of at most 1,024 molecules in two dimensions. Thomson was thinking of 10¹² molecules and more, and of errors he did not specify. A different reading (a fixed total error shared among more molecules, say) could come out differently.
Credit where it is owed: the idea of doing molecular dynamics on an integer grid so that it reverses bit for bit is Levesque and Verlet's (J. Stat. Phys. 72, 519, 1993). We could not read their paper from here; the description of their method we relied on is Rein and Tamayo's (MNRAS 473, 3351, 2018; we read the arXiv version, 1704.07715, section 2.1), which calls it “the first integrator for molecular dynamics that is time-reversible bit by bit”. The engine on this page is our own, written from that description.
What this does not show
It does not explain the arrow of time. It shows why the objection is right, and what a reversal would cost. The laws here are reversible, and reversed gases really do un-mix. Reversal fails in practice because the reversed state is balanced on a knife: getting one disk's position wrong by one part in four billion of the box undid the return after 1,700 to 3,600 steps on the five gases, somewhere between 15 and 35 collisions per disk. That is a statement about how hard it is to prepare the reversed state, not a law that forbids it, and this exact integer world is a working example: a mechanics in which the reversal can actually be carried out.
And the plot under the first box shows where the arrow actually comes from. Run the starting state backwards and the gas spreads out into the past exactly as it spreads into the future: the moment when all the disks were on one side is a low point, with entropy rising in both directions. Nothing in the dynamics picked that moment out. The only reason the gas's history here has a direction is that the story begins at a special, unlikely state, and we are looking forwards from it. For the universe, the corresponding assumption (that it began in a state of very low entropy) is often called the past hypothesis, and why it holds is an open question in physics, not something this page settles.
Honest limits of the model: 128 disks in two dimensions, a smooth repulsive force (the WCA potential, Lennard-Jones cut at its minimum) rather than hard spheres, periodic walls, one time step (dt = 2.5 × 10⁻⁴, energy held within 0.6% over 4,000 steps on all five gases; the floating gas within 0.04%). Starting velocities are drawn from a close approximation to the normal distribution (each is a sum of twelve uniform random numbers, minus six), because the true one needs logarithms and cosines that different browsers are not required to compute identically. The growth rate and the horizons are properties of this gas at this density, not constants of nature. Real molecules are quantum, which changes the story in ways this page does not model.
The check
- Run it yourself: node verify-loschmidts-paradox.mjs in an empty folder (Node 18+) downloads this page's engine, data and text, checks that reversing twice is the identity, that one step reversed undoes one step, that 15 round trips (five gases, 500 to 6,000 steps) return all 512 integers exactly, and that two broken engines (velocities flipped in place; forces left unrounded) do not. It checks energy, re-derives every slope and verdict in the results, remeasures seed 1's horizons and every gas's growth rate from scratch, and checks this page's numbers against them (the script). Add --full to remeasure all five gases (several minutes).
- The measurement is measure.mjs, run once after the pre-registration was committed, and not re-fitted.
- Before shipping, an adversarial fact-check read the page against every source and number and found 24 problems, among them a post-hoc explanation of ours that was false and a failed prediction we had called unjudgeable; every one of substance was fixed: the fact-check.
- Sources for the history are quoted from scans and texts saved beside the research, with page numbers; every quotation, with its page, the scan or text it was read from, and our translation, is in quotes.json, with a README saying what could not be reached.