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.
The discussion splits between those who accept the parity-based solution and those who reject it on broader rational grounds. One objection argues that in larger groups, a tiger cannot trust the remaining tigers to follow the odd-even chain after it breaks the balance. A stronger challenge asserts that any non-zero risk of death makes eating irrational when grass is a safe alternative, so the sheep survives at any N. A separate line of attack questions the puzzle's premise itself, pointing out that tigers do not eat sheep.
Walk up and slap the interviewer: Do your tigers eat grass?
When N = infinity, N = N+1. Whether N is odd or even, there is a risk of being eaten. The tiger doesn't eat the sheep; it minds its own business. Whether odd or even, it doesn't increase the risk of being eaten. Any act of 'eating' carries the possibility of causing one's own death. Since 'eating grass' already allows survival, the rational choice is resolutely not to eat. When the reward (eating sheep) comes with an ineliminable lethal risk, choosing the absolutely safe suboptimal option (eating grass) is the optimal solution. The tigers are smart enough; they won't gamble on 'default premises' for a culinary craving. The conclusion is solid: the sheep won't be eaten, and can graze in peace.
'All tigers are extremely intelligent, perfectly rational, and their first goal is to ensure their own survival.' No matter what N is, the sheep won't be eaten. When N=1, it feels like the tiger won't eat the sheep. N=1: the tiger eats the sheep and turns into a sheep; 'there are no other tigers.' An assumption is made here—that there are no other tigers. Who knows if there are other tigers? Who can guarantee N won't become N+1? At this point, the tiger relies on external assumptions, default premises, static conditions, etc. But who guarantees these things for the tiger? Alternatively, to survive, the tiger doesn't eat the sheep; because not eating the sheep doesn't increase the security threat, while eating the sheep reduces the security guarantee. Besides, keeping the sheep alive means there's another species around, so it won't be boring; it also preserves the possibility of eating it later. Once eaten, there's no going back. The tiger is extremely intelligent and perfectly rational; no matter what N is, it won't eat the sheep.