Math paradoxes

Parrondo's paradox Game A loses. Game B loses. What if you play both at random?Together they win.

Two simple coin games, each of which takes your money in the long run. Before every round you toss one more, fair coin and use it to pick which of the two to play. What happens to your money over thousands of rounds? Lock in your answer, then play yourself, run thousands of players and see where the result comes from.

Game A loses $1 per 100 rounds on average, game B $0.87. But if you pick A or B at random before each round, you win $1.57 per 100 rounds on average. The secret is that game B depends on your capital: on its own it lands you in a bad spot for itself too often, and game A knocks you out of it. Here you play yourself, work out the exact Markov chain and meet the same trick in the physics of molecular motors.

Make a guess
+1,57A or B at random, per 100 rounds
−1,00only A
−0,87only B
The puzzle

Three coins and one capital

The casino has two tables. At each one you bet $1 on a coin toss: win and your capital goes up by 1, lose and it goes down by 1. The only difference is which coin they toss.

  1. 1

    Capital

    We count from zero: +5 means you are $5 ahead, −4 means $4 behind. You can borrow as much as you like, so the game never stops.

  2. 2

    Game A

    One coin, slightly unfair: it wins with chance 49.5%. Each round takes 1 cent on average, $1 per 100 rounds.

  3. 3

    Game B

    Two coins, and which one is tossed depends on your capital. If it is a multiple of 3 (…, −6, −3, 0, 3, 6, …), they toss a bad coin that wins with chance 9.5%. Otherwise a good one, with chance 74.5%. Played on its own, B also loses on average, a little less than A: $0.87 per 100 rounds.

  4. 4

    The question

    Before each round you toss a fair coin: heads you play A, tails you play B. What happens to your capital over thousands of rounds?

Intuition says

"Two losers make a loser"

In fact the capital grows: +$1.57 per 100 rounds on average. Game B is bad only because on its own it often puts you on a multiple of 3, where its coin is bad. Game A is almost fair, and it shuffles the capital so that B more often plays with its good coin.

Model assumptions

  • All coins are independent and their odds never change.
  • The stake is always $1, a win and a loss are the same size.
  • The choice between A and B ignores the capital: a fair coin makes it.

These odds come from Gregory Harmer and Derek Abbott, 1999: 1/2 − ε, 1/10 − ε and 3/4 − ε with ε = 0.005.

Round 1 · Guess

What happens if you pick the game at random?

Pick an option before reading on. Before each round a fair coin decides: A or B. You play thousands of rounds.

Capital in the long run

Reminder: only A loses $1 per 100 rounds, only B $0.87.

A breakdown of your answer will appear here.

Hints

Hard to decide? Open the hints one at a time: the easy one first, then stronger ones.

Round 2 · Game

Choose how to switch tables

Switch on one of the ways and play 100 or 1,000 rounds: only A, only B, in turn ABAB, in pairs AABB or at random. One run is a lottery, so compare it with the dashed line, the exact average. And in "By hand" mode pick the table before each round: 50 rounds, how high can you get?

How to pick the game
Capital0
Rounds0
–

Capital after each round

–
–
Round 3 · Simulation

Two thousand players for each way

Every player starts from zero and plays 1,000 rounds. Solid lines are the players' average capital in the simulation, dashed lines the exact average from the Markov chain. On the right, the exact gain per 100 rounds next to the simulation, and the share of players who finished ahead.

WayExact, /100SimulationAhead

Round 4 · Why

Game B is not bad. The place it takes you is

Game B's odds depend on where the capital stands. So what matters is not only which coins are in the game, but how often each of them is tossed.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

In short, no formulas (and not the whole story)

B loses only because of one trap, and A pushes you out of it

Game B nearly always plays its good coin, 74.5%. There is only one bad coin, on multiples of 3. If the capital landed on them in one round out of three, B would win. But game B itself keeps bringing you back to those numbers. Game A is almost fair and gives nothing on its own, but it nudges the capital randomly up or down and knocks it out of the trap. Why B drives you into the trap and what it costs is taken apart below.

Ping-pong

The good coin leads straight into the trap

Capital 2, 5, 8… (1 below a multiple of 3)74.5% ↑the good coin lifts you onto a multiple of 3
Capital 3, 6, 9… (multiple of 3)90.5% ↓the bad coin drops you back

Here is the trap: from 5 the good coin most often lifts you to 6, and from 6 the bad coin drops you back to 5. The capital runs back and forth between 5 and 6, and the bad coin is tossed again and again. To break out upwards you have to pass 6, where the chance is only 9.5%. So in game B the capital sits on a multiple of 3 not in a third of the rounds but in 38.4%.

Where B plays

The same coins, a different result

B's rounds played…on a multiple of 3B wins

A few percentage points decide everything, because the coins are so different: each extra percent of time on the trap costs about 0.65 percentage points of wins. When a coin picks the game, half the rounds are A, and the capital steps onto the trap less often. B's rounds now win 52.1%, A's 49.5%, together 50.8%. That is what gives +$1.57 per 100 rounds.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

A Markov chain

Only the remainder mod 3 matters

RemainderWin chanceShare of time

The coin is chosen only by the capital's remainder mod 3: 0, 1 or 2. A win moves the remainder one step clockwise, a loss one step back. This is a Markov chain with three states. Over thousands of rounds the share of time in each state stops changing: that is the stationary distribution π. It comes from the balance condition: as much probability flows into a state each round as flows out. Then the gain per round is π₀ · (2p₀ − 1) + π₁ · (2p₁ − 1) + π₂ · (2p₂ − 1), where pᵢ is the chance of winning in state i.

One lap

Three steps up against three down

Only B–
A or B at random–

There is a shorter test. To climb by 3, the capital has to pass each remainder once: 0 once and "not 0" twice. For game B, growth or decline comes down to comparing p₀ · p₁² with (1 − p₀) · (1 − p₁)²: the product of chances of three steps up against three down. In the randomly mixed game each coin is the average of A's and B's: 29.5% on a multiple of 3 and 62% elsewhere. The trap gets softer, and the up product wins.

Not every mix

ABAB loses, AABB and ABB win

OrderB on a multiple of 3Per 100 rounds

A periodic order is worked out the same way: take the chain over one full period (four rounds for AABB) and its stationary distribution. In ABAB, game A comes right before every B and shuffles poorly: before a B round the capital is on the trap 38% of the time, almost as without A. The pair AA moves the capital by −2, 0 or +2 and knocks it off the trap better.

For formula lovers

The stationary distribution and the exact gain

A game with coins p₀ on a multiple of 3 and p₁ elsewhere. The balance condition for the three states (q = 1 − p):

π0=p1π2+q1π1,π1=p0π0+q1π2,π0+π1+π2=1

Without ε game B (p₀ = 1/10, p₁ = 3/4) is exactly fair: the capital is on a multiple of 3 in 5/13 of the rounds, and the chance of winning is exactly 1/2.

π=(513,213,613),513·110+813·34=12

The one-lap test: the game wins when three steps up are likelier than three down.

p0p12>q0q12

The exact average gain per round with ε = 1/200, as plain fractions:

gA=−1100,gB=−734438446300≈−0.0087 gA+B=22314200≈+0.0157

Note where exactly the paradox hides. The mixed game has coins that are the averages of A's and B's. But its gain is not the average of the gains, because the share of time in each state changes along with the coins. The gain depends on the coins non-linearly, so the average of two losing games can win.

Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

Where the games come from

A ratchet translated into coins

Juan Parrondo, a physicist in Madrid, was studying a Brownian ratchet in 1996: a particle kicked about at random by heat, with an asymmetric sawtooth potential switched on and off. Neither mode alone carries the particle anywhere, but alternating them does. Games A and B are a discrete version of this picture: A is like free diffusion, B like a saw with a steep and a gentle slope.

He presented the idea in an unpublished talk in Turin the same year. It became widely known after a short paper by Gregory Harmer and Derek Abbott in Nature in 1999, "Losing strategies can win by Parrondo's paradox", which gave the effect its name.

Paradox or not

Dependence breaks the naive count

There is no contradiction here. If the games did not depend on the capital, any mix of two losing games would lose: the average of two chances below 1/2 is below 1/2 too. The paradox appears only because B "remembers" the capital, that is, its own past. Abbott himself called such paradoxes apparent: not a logical contradiction, but a result that defies intuition.

There is no free lunch either. The player does not pick the game by the capital: a coin does. But game B itself is a rule that looks at the capital. The information about the capital is built into B, and A only keeps B from getting stuck where the rule works against you.

Round 5 · Scaling up

Any mix share, games with memory and molecular motors

From one 50-50 mix to the whole family: which share of A is best, and whether it has to be the capital. Then the logic: what makes the paradox possible. And the physics the games grew out of: a ratchet that carries particles although none of its modes does.

Mathematics

How much A to play?

B depends on the capital B depends on the last two rounds
Capital, per 100 rounds–
History, per 100 rounds–

Capital or history

The paradox needs a state, not the capital as such

Any share of A will do. With ε = 0.005 the mix wins for roughly 7% to 85% of A rounds, and the best share is about 41%: +1.66 per 100 rounds. But the unfairness has to be small: for a 50-50 mix the paradox is gone by ε ≈ 0.013.

In 2000 Parrondo, Harmer and Abbott took the capital out of game B. In the new game B the coin depends on the two previous results: after two losses 9/10 − ε, after a win and a loss in either order 1/4 − ε, after two wins 7/10 − ε. The state is now the game's memory, not money, and the effect is the same: this B and A lose apart and win together when ε is below 1/168. The effect is weaker here, but the capital need not be known.

Logic

Take B's memory away

GameExact, /100Simulation

Two "bad" things together

One game creates a state, the other upsets it

Replace B's two coins with one that wins with the same overall chance, 49.57%, but ignores the capital. On its own the new B loses as much as the old one. But the mix with A now loses: every round's chance is the average of two numbers below 1/2.

Hence a general rule. Two losing actions can win together only if one depends on a state that the other changes. Then "B loses" is true only for the state that B itself creates. In other surroundings the same B wins. Judging such an action apart from everything around it means judging the wrong thing.

Practice

A flashing ratchet

Exact, periods per cycle–
Simulation, 400 particles–

Brownian motors

Neither heat nor the saw carries, together they do

Particles in water are jostled by heat. When the sawtooth potential is on, each one slides to the bottom of its well and stays. When it is off, the particles spread out equally both ways. But switch it on and off in turn, and the particles travel: the nearest crest of the saw is on one side, and while diffusing a particle crosses that one more often.

This was tested by experiment: in 1994 Rousselet, Salome, Ajdari and Prost moved plastic beads in a liquid one way by switching an asymmetric electric field on and off. Small beads diffuse faster and travel faster, which you can see in the simulation too. The energy comes not from heat but from whoever switches the field, so the laws of thermodynamics are not broken.

Physicists and biologists use similar models for molecular motors in cells, such as proteins that walk along microtubules: Dean Astumian in Science in 1997, Frank Jülicher, Ajdari and Prost in a review the same year. The flashing ratchet is one of the basic models in the field.

Bonus · Fun facts

Things to tell your friends

1996

How to cheat a bad mathematician

That was the title of Juan Parrondo's talk in Turin where he first showed the games. It was never published, but it is still cited as the start of the story.

1999

One page in Nature

Harmer and Abbott's paper "Losing strategies can win by Parrondo's paradox" in Nature takes one page, page 864 of volume 402. It is what made these games known as Parrondo's paradox.

38,4%

The whole paradox in five points

That is how many of its rounds game B plays on a multiple of 3 instead of a fair third, 33.3%. Those five percentage points are enough to turn a game that could win into one that loses.

ABAB

Not every alternation saves you

Strict alternation ABAB… loses 0.67 per 100 rounds. AABB… wins 1.47, and ABB… as much as 5.74. What matters is not that the games are mixed, but how exactly A knocks the capital before B.

1963

Feynman's ratchet

In chapter 46 of the first volume of The Feynman Lectures on Physics, Richard Feynman takes apart a ratchet and pawl that should turn from the thermal kicks of molecules. He shows why at a single temperature such an engine does not work. Brownian motors get around this because outside switching powers them.

1/168

Games with memory

In the 2000 version, game B looks not at the capital but at the last two results. There the paradox works when the unfairness ε is between zero and 1/168, that is, up to 0.006. The authors stressed that such games work for a wider range of parameters.

Discussion

What do you think?

Share your own explanation, an objection or a variant of the puzzle. You need a GitHub account to comment.

Is “Advanced” the right level for this puzzle?

Thank you! This helps set the levels right.

Newsletter

New puzzles, explanations and discussions

I keep adding new puzzles, new ways to explain them and write-ups of the discussions they start. Leave your email and I'll write when something new is out. No spam, one-click unsubscribe.

The sign-up form will appear here soon.