JAY Project
JAY Project

The Hidden Math of the Ghost Leg Game (Amidakuji): Why Results Never Collide

2026-04-30| Jay

If you've spent time in East Asia — or just have Korean or Japanese friends — you've probably seen the ghost leg game (known as Amidakuji in Japan, sadaritagi or "ladder game" in Korea). It's the go-to way to decide who buys coffee, who does the dishes, or who gets the last slice: draw vertical lines, scribble random horizontal rungs between them, and trace your path down.

Here's the curious part: no matter how messy the ladder gets, two players never land on the same result. Every outcome gets exactly one person. That's not luck — it's guaranteed by some genuinely elegant math. Let's unpack it.

Ghost Leg Rules in 30 Seconds

Never played? Here's the whole game:

  1. Draw one vertical line per player. Write the outcomes (winner, loser, "you pay," etc.) at the bottom — hidden, ideally.
  2. Draw horizontal rungs between adjacent vertical lines, anywhere, as many as you like.
  3. Each player starts at the top of a line and traces downward. Every time you hit a rung, you must cross it, then continue down.
  4. Wherever you land is your result.

One rule — "always cross the rung" — and that single rule is what makes collisions impossible.

The Key Insight: Each Rung Is a Swap

Read the ladder from top to bottom, one level at a time:

  • No rung at this level? Everyone stays in their current lane and moves down.
  • A rung at this level? Exactly two adjacent players trade lanes — a swap. Everyone else is untouched.

So the entire game is nothing more than a sequence of adjacent swaps, applied one after another from top to bottom.

And here's the crucial fact:

No matter how many times you swap, the number of people and the number of lanes never change — and no lane ever ends up holding two people.

A swap just exchanges two positions. It never clones anyone and never merges anyone. Stack a thousand swaps and that property still holds.

In Math Terms: The Ladder Is a Permutation

Mathematicians call a rearrangement of n items — where nothing is duplicated and nothing is lost — a permutation. The ghost leg game is exactly that:

Ghost leg element Mathematical meaning
One rung A swap of adjacent elements (transposition)
The whole ladder A composition of swaps = one permutation
Start → finish mapping A one-to-one correspondence (bijection)
"No collisions" Literally the definition of a permutation

There's a well-known theorem that says every permutation can be built out of adjacent swaps — the ghost leg game is basically that theorem drawn as a picture. The same wiring-diagram structure even shows up in combinatorics research, so this humble coffee-lottery has legitimate mathematical pedigree.

Proof by Example: 4 Players

Say Alice, Bob, Carol, and Dave start on lanes 1–4. The ladder has three rungs, from top to bottom: ① between lanes 1–2, ② between lanes 3–4, ③ between lanes 2–3.

Step Lane 1 Lane 2 Lane 3 Lane 4
Start Alice Bob Carol Dave
Rung ① (swap 1–2) Bob Alice Carol Dave
Rung ② (swap 3–4) Bob Alice Dave Carol
Rung ③ (swap 2–3) Bob Dave Alice Carol
Finish Bob Dave Alice Carol

Check any row: every lane holds exactly one person, at every step. That's forced by the nature of a swap. Add 100 more rungs and nothing changes — the no-collision guarantee is baked into the rules themselves.

It works in reverse, too: trace upward from any finish point and you recover exactly one starting point. That two-way uniqueness is what "one-to-one correspondence" means, and it's why the ladder works as a lottery at all.

But Wait — Is It Actually Fair?

Here's the twist. "No collisions" and "every outcome is equally likely" are not the same thing.

What happens with very few rungs? In the extreme — zero rungs — everyone drops straight down to the spot below them. With just one or two rungs, most players still land at or near their starting lane. In other words: unless there are plenty of rungs, you're noticeably more likely to end up close to where you started. This is a well-known bias of the ghost leg game.

The intuition:

  • Each swap moves you exactly one lane sideways.
  • Reaching a far-away outcome requires hitting a chain of rungs in sequence.
  • With few rungs, those long-distance paths simply don't exist.

Which means a savvy player who spots where the "prize" is written can grab the lane directly above it — and on a sparse ladder, that's a genuinely winning strategy. Sneaky, but mathematically sound.

How to Keep It Fair

  • Draw plenty of rungs — several times the number of players, spread across different heights.
  • Hide the outcomes until everyone has picked a starting lane. Visible outcomes enable lane-camping.
  • Assign starting lanes randomly and the bias becomes harmless — it only matters when players get to choose their position.
  • Easiest fix of all: use a digital ladder that auto-generates a generous number of rungs. Hand-drawn ladders almost always end up too sparse.

👉 Try the Ladder Game


The Takeaway

The ghost leg game never produces collisions because each rung is an adjacent swap, and no pile of swaps can ever break the one-to-one mapping — the ladder is a permutation. Just remember that collision-free doesn't mean equal odds: sparse ladders favor staying near your starting lane, so draw those rungs generously. And the next time someone accuses the ladder of being rigged over coffee, you'll have a small permutation-theory lecture ready to go.

Recommended Tools for You

🚀 JAY Project · 60+ Free Web Tools

60+ free web tools built as a hobby — no signup, no payment, every input stays in your browser.

Explore related categories