100 Tigers, 1 Sheep, and the Off-by-One Error That Saves a Life
The puzzle is a compact test of backward induction and recursive reasoning, the same mental model that underpins base-case thinking in algorithm design and equilibrium analysis in distributed systems. An interviewer who watches a candidate work from N=1 upward learns more about their engineering instincts than any answer blurted from memory.
The setup: N tigers and one sheep are locked together. A tiger can eat the sheep but then turns into a sheep itself, and every tiger's first priority is survival. When N=100, the sheep lives — not despite the tiger count, but because of it. The reasoning chains backward from the smallest cases: one tiger eats, two tigers don't, three eat, four don't. The pattern holds for all N: odd means the sheep is eaten, even means it isn't.
Each tiger runs the same recursive logic — if eating turns the game into an N-1 state where the new sheep dies, no one eats. At N=100, eating creates an N=99 state where the sheep dies, so every tiger abstains. The result is a subgame perfect Nash equilibrium where collective rationality protects the one creature nobody individually wants to protect.
The interviewer wasn't testing for a memorized answer. Walking through N=1, N=2, spotting the parity pattern, and verifying it demonstrates the engineering instinct to shrink a problem to its base case and reason upward — the same muscle used to write a recursive function or debug an off-by-one error.
The puzzle's counterintuitive punch is that more tigers make the sheep safer, not more endangered — a one-tiger difference flips the outcome completely, much like an off-by-one bug.
Interviewers value the visible reasoning path far more than a correct answer; walking through N=1, N=2, and N=3 aloud signals the recursive-decomposition habit that distinguishes engineers from trivia collectors.
The same backward-induction structure appears in distributed-systems problems like Byzantine fault tolerance and circuit breaking, where individually rational node decisions produce system-level outcomes no single node intended.