Feynman’s Ratchet and the perpetual motion gambling scheme
Can you spot a perpetual motion machine when you see one?
In physics, that question is equivalent to “can you spot a scam when you see one?”. That’s because a perpetual motion machine is, by definition, a fraud. It is a device that claims to generate useful work in a way that violates one of the most basic laws of physics: the laws of thermodynamics. The laws of thermodynamics are extremely fundamental to physics; they belong to a set of five or so ideas that can really be called “laws”, upon which the rest of physics is built.
So if you (portrayed below by Lisa Simpson) submit an idea or invention to the physics community (portrayed by Homer Simpson) that violates one of the laws of thermodynamics, you’re opening yourself up to a world of ridicule.
If someone tells you “what you’re proposing is a perpetual motion machine” (they’ll say perpetuum mobile if they’re trying to sound snooty), they might as well be saying “you couldn’t tell a Lagrangian from a lawnmower”. It’s a pretty strong rebuke.
In my experience, though, most physics students have a false sense of confidence in their own ability to spot a perpetual motion machine. They think that such a whimsical contraption will have an obvious, glaring flaw that’s easy to notice because it will violate energy conservation. “Oh, you forgot to take into account friction,” they’ll say, and then they’ll give you a short lecture on the First Law of thermodynamics. “Energy is neither created nor destroyed,” they’ll say.
The truth, however, is that most perpetual motion machines that you are likely to encounter do not violate energy conservation. Rather, the tricky and persistent scientific “scams” violate the much more nebulous Second Law of Thermodynamics, which says (in one of its formulations):
It is impossible for a device to receive heat from a single reservoir and do a net amount of work.
It is much easier to be fooled by proposals which violate this Second Law, which ultimately has its roots in probability rather than in the deterministic notions of energy conservation. In my life I have been fooled on two noteworthy occasions by seemingly good ideas that violate the Second Law of Thermodynamics. One idea was for a hypothetical machine to generate energy from thin air (molecules). The other was a sure-fire gambling method. In this post I’ll discuss both of these fraudulent schemes and why they fail, and I’ll try to explain why the Second Law of Thermodynamics can be stated like this:
It is impossible to profit, in the long run, from a truly random process.
The remainder of this post is organized thusly: First, I’ll introduce you to Feynman’s ratchet, a fairly popular thought experiment that seemingly yields a perpetual motion machine. I won’t tell you why it fails, though, until later. In the second section I’ll introduce you to an idea that I once thought could make me a rich gambler and I’ll explain why it doesn’t work. Finally I’ll come back to Feynman’s ratchet and explain why it also must fail for a very similar reason.
Imagine that you manage to construct the following device. You take a very small, very light-weight metal rod and attach some thin, paddle-like fins to one end. Let’s say that the rod is held in place by some low-friction bearing which allows it to rotate on its axis. If the rod/fins are sufficiently light-weight, then when they are exposed to randomly-moving air molecules some of these molecules can hit the fins and cause the rod to rotate in one direction or the other. You, the inventor, are hoping to harness some of this rotation in a useful way, but you need the rod to rotate consistently in one direction before you can do anything with it. So you attach the other end of the rod to a ratchet mechanism: a saw-toothed gear that interlocks with a spring-loaded lever (called a pawl). Like this:
So there you have it. A simple perpetual motion machine. As long as the surrounding air molecules continue to move randomly, the ratchet should continue to spin (perhaps sporadically) in the counterclockwise direction, driven by occasional collisions with high-energy air molecules. You can even get useful work out of the ratchet if you want, for example by winding up a rope that lifts a small mass or by using the rod to drive a tiny electrical generator.
This clever thought experiment is generally known as “Feynman’s Ratchet”. It was popularized by Richard Feynman in his Lectures on Physics, although the original explanation belongs to Smoluchowski (of diffusion law fame) in 1912. I first heard of it as a riddle passed around by undergraduate students.
It’s not immediately obvious that such a machine should be impossible. It certainly doesn’t violate energy conservation, nor does it rely on any “zero friction” assumptions. Feynman’s ratchet gradually uses up the energy of the randomly-moving air molecules around it (cooling the air as it gains energy through collisions), but so long as the earth is heated by the sun it should continue to rotate and, seemingly, provide useful work. It seemed to me, as an undergraduate, that this was a clever little device for converting solar energy to useful work.
But, by decree of thermodynamics, Feynman’s ratchet cannot work as a heat engine. It plainly violates the Second Law, which says that useful work can only be obtained by the flow of energy from high to low temperature. This device purports to get energy from a single temperature reservoir: that of the air around it.
Where does it go wrong?
If you’re encountering this riddle for the first time, you can try and figure it out for yourself before I tell you the answer below. But it may help you to first consider another bogus scheme, which I stumbled upon as a high school student and thought for sure could make someone a fortune.
The perpetual motion gambling scheme
It was during high school that my nerdy friends and I first discovered the joys of computer programming. It seemed to me then (and still seems now) a remarkable form of instant gratification: if you want to see what happens in a particular hypothetical situation, you just ask the computer to work it out for you and you get to avoid a lot of tedious and questionable theorizing. Of course, the marvelousness of the computer can quickly lead to the programmer developing an over-reliance on its powers, and from there it’s easy to fall into a kind of intellectual laziness that gets you into all kinds of (scientific) trouble. It’s probably this computer-born laziness that first allowed me to be fooled by the “perpetual motion gambling scheme”.
Back in 11th grade, the programming platform of choice for my friends and I was the TI-83 graphing calculator. Our setting of choice was the back of physics class. On one particular day, I was playing a simple blackjack program that my friend had made when I discovered that I could make money every single time I played. What’s more, I could make an arbitrarily large amount of money, apparently only by judiciously deciding how much to bet at each hand. I only learned much later in life that I had stumbled across a system called the “martingale strategy“. And only very recently did I realize that hoping to profit from the martingale strategy amounts to a perpetual motion machine, and is in violation of the Second Law.
If you’re unfamiliar with the martingale strategy, it goes as follows. Consider the simplest possible gambling game (you can easily generalize to other games, like blackjack): you place a bet and then flip a coin. If the coin comes up tails, then you lose all the money you bet. If the coin comes up heads, then the money you bet is doubled and given back to you. It’s a completely fair game which, on average, should give you zero net profit. The martingale strategy is to place an initial bet (say, $1), and then double your bet each time you lose. In this way a victory at any given coin toss will completely compensate for all previous losses and give you a net profit of $1. In flowchart form, it looks like this:
Of course, it’s possible that you, the bettor, only have a finite amount of money to bet, which would imply another ignominious exit to this flow chart corresponding to “you have completely run out of money”. (This was impossible in my friend’s TI-83 blackjack program, which allowed you to go into arbitrarily large amounts of debt). But the finiteness of a person’s funds didn’t seem like an insurmountable problem to me.
Here’s how the strategy played out in my high school student imagination. Come to the gambling table with some unthinkably huge amount of money: say, dollars. Now follow the martingale system until you reach a profit. The only way the system could fail is in the extremely unlikely event that the coin comes up tails ten consecutive times. The probability of that happening is only , so, I reasoned, it can be ignored. Once you’ve followed the chart and won your $1, start over by resetting your bet to $1. Repeat the system ad nauseum until you’ve made all the money you want. Go home rich and happy.
And, of course, the strategy is very flexible. If you’re richer than my “unthinkable” thousandaire and you’re not content with a 1-in-1000 chance of losing, then you can start by coming to the table with dollars, which would imply a tiny chance of failure. Or if you want to make money faster (with slightly higher risk), then at each coin toss you could bet (total amount of money lost) + $10 instead of + $1. What could go wrong?
What could go wrong, of course, is the Second Law of thermodynamics. It says (in my formulation) “you cannot profit from a random process.” Long-time readers of this blog (thanks!) may notice that the martingale system sounds suspiciously similar to Matt Ridley‘s strategy for biasing the gender distribution: keep having children until you have a boy, and then stop. It didn’t work there for the same reason that it doesn’t work here: a truly random process cannot be used for directed motion.
And, actually, the martingale system isn’t too hard to pick apart once you stop being analytically lazy (as I was in high school) and actually weigh the different outcomes. Take the example where I come to the gaming table with dollars and follow the strategy from the flowchart above. Then 1023 out of every 1024 games my strategy will succeed, and I’ll receive as my prize $1. However, once in every 1024 games the strategy will fail, and when it fails it will fail spectacularly: I’ll lose $1023. So if I keep playing the game long enough, on the whole I will make zero profit.
Just to make the point visually, here is a simulated string of “martingale” rounds, showing one possible evolution of the gambler’s net profit over time.
Note that at a given round, your profit is almost certainly increasing (positive slope), which is why the martingale strategy is so alluring. If you start from zero, then you will most likely earn some money in the short term. But given enough time, those big drops will hit you and you will find the strategy unprofitable.
Let me say this more again explicitly, as a hint to those still thinking about Feynman’s ratchet. You cannot get directed motion out of a random process. You can set up a system that makes a step in one direction (profit) more likely than a step in the other direction (loss), but it will always be accompanied by a change in the size of those steps so that on the whole you go nowhere.
Feynman’s ratchet is explained after the jump
The downfall of Feynman’s ratchet
The problem with Feynman’s ratchet, as you’ve probably figured out by now, is that there is no such thing as a perfect ratchet mechanism. What I drew above was a spring-loaded lever that is supposed to prevent the gear from rotating backward. But in a thermal environment, where energy can be absorbed from randomly-moving air molecules, nothing is impossible. Things only become improbable due to the high energy they require.
So it must be possible for the gear to rotate backwards (clockwise). In this case, it requires a strong collision from some air molecules against the lever, so that the lever gets pushed up and past the tooth of the gear and the gear can slip backward. There is a corresponding small rate at which the gear skips backward by one tooth (so that the lever snaps into place in a new location).
Of course, this backwards rotation is much less probable than a small forward rotation. But consider that for the gear to rotate forward by one tooth, a whole bunch of small rotations must be chained together consecutively. The net rate of all of those small rotations coming together is also be fairly small.
And, in fact, the Second Law guarantees that the rates of a forward rotation and a backward rotation are the same. It seems surprising that this should be the case, no matter how carefully the ratchet is designed and no matter what size/shape the various pieces are. But it is. In the Lectures on Physics, Feynman estimates the rates of these two processes and shows that they are, in fact, equal (Chapter 46).
Of course, if you really wanted to make the machine work you could cool down the air on the ratchet side or heat up the air on the fin side, like this:
But in this case, you’ve only managed to generate work in the same way as a common steam engine: by creating a temperature difference and then using some of the heat that flows from hot to cold. (Here you’ll need a heat pump to prevent the temperature from equilibrating with by conduction along the metal rod).
What did we learn?
And now, like a good episode of G. I. Joe, this post concludes with a recap of the morals to be taken from it. The first moral is the Second Law itself: it is impossible to extract directed motion from a random process (a single heat reservoir). Anyone who claims they can do so is either mistaken or a charlatan.
A perhaps equally important lesson, though, is that it is easy to be fooled when it comes to the laws of thermodynamics. In the last decade or two, for example, there was much controversy over the mechanism by which muscle fibers contracted, before someone realized that one of the leading proposals amounted to a perpetual motion machine.
So be aware. Because knowing is half the battle.