Play a film of a bouncing ball backwards and it looks a little odd — but nothing in it is
impossible. The ball rises, slows, falls: perfectly legal physics. Now play a film of a
calculator computing
Reversible computing is the study of computations built entirely from steps that can be rewound — steps that never destroy information. Every state of the machine has exactly one predecessor, so you can run the whole thing backwards, like that film of the bouncing ball. It sounds like a curiosity. It turns out to be one of the deepest ideas in computer science: it sets the ultimate energy cost of computation, it is the reason quantum computers are built the way they are, and it is quietly at work every time a debugger steps backwards to the moment a program went wrong.
A computational step is reversible when you can always deduce its input from its
output — in the language of
The same split runs right through
Draw a gate as arrows from its possible inputs to its possible outputs. A reversible gate's diagram is a perfect pairing — every output is hit by exactly one arrow, so the arrows can be followed backwards. An irreversible gate's diagram has a funnel in it — several arrows crash into the same output, and the reverse direction is ambiguous.
Here is the whole idea in ten lines. stepForward can always be undone by
stepBack; crush cannot be undone by anything, because two different inputs
produce the same output:
No function uncrush can exist: given the output
So ordinary computers forget things constantly. Why does that matter? Three reasons, and each one is a whole module of this subject:
Strangely — yes. The microscopic laws of physics are themselves reversible: Newton's equations run
equally well in either direction, and quantum mechanics evolves states by steps that are perfectly
invertible. A film of molecules bouncing around, played backwards, breaks no law of physics. The
one-way feel of everyday life (eggs scramble, tea cools, we grow older) is a statistical
effect that emerges when trillions of particles are involved — the subject of
Your text editor's undo looks like reversibility, but it is the opposite: the editor saves a copy of the old state before destroying it, then "undoes" by pasting the copy back. That is memory spent to fake reversibility — the destructive step still happened. True reversible computing is stricter and more elegant: no step destroys anything in the first place, so no backup copies are needed — the current state alone determines the entire past. Keep this distinction in mind; the interplay between "keep a journal" and "be genuinely reversible" becomes a major theme when we meet reversible Turing machines.
This first module builds the physics: what information has to do with entropy, and exactly what
forgetting a bit costs. Then the subject opens out — reversible