A Snail, a Ten-Foot Pole, and Two Thirds of the Fifth Day
Three feet up each day, one foot back each night, ten feet to climb. Dividing ten by the net two feet a day gives five days, and it charges the snail for a night it never spends. The dawn heights settle the day, the last climb settles the moment, and the closed form the video had no room to voice is a single ceiling function.
A snail climbs a pole feet tall. During each day it climbs feet, and during each night it slides back . It starts at the bottom at dawn. When does it reach the top?
The answer is two thirds of the way through the fifth day, which is days of elapsed time. Almost everyone says the end of day five, and the interesting thing is that they get there by a method which is correct for the first four days and silently wrong on the fifth.
Where five days comes from
Each full cycle of a day and a night nets
so ten feet at two feet a day is five days. The division is right, the units are right, and the model behind it is wrong, because it charges the snail for a night it never spends. Once the snail touches the top it is done. There is no fifth night, so the fifth cycle is never completed, so the net rate of two feet a day never applies to it.
A useful way to hear the error: the net-rate model describes the trajectory correctly at dawn, and only at dawn. Between dawns the snail is above its net-rate position, sometimes by as much as three feet, and the finish line is crossed between dawns.
The dawn ladder
Sample the height once a day, at first light, and the sequence is as simple as it gets. Let be the height at dawn on day , with . One full cycle adds , so
an arithmetic progression with common difference two. The dawn heights are and the daylight peak of day is
so the peaks are . Now read off the answer. Day four peaks at , which is short. Day five opens at and peaks at , which clears the top. No day before the fifth can finish the job and the fifth does, which fixes the day without any further work.
The dawn heights say where the snail restarts each morning. The daylight peaks say how high it gets before the slide. The first sequence tells you the answer is not four; the second tells you it is five.
The last day has no night
On the morning of day five the snail is at feet and needs more. It has feet of climbing available. Spread the climb evenly across the daylight and the top arrives at
of the way through day five's climb. Total elapsed time is therefore
and the reflex answer overshoots by exactly of a day. The fraction in (4) is strictly between and , which is what makes the honest answer a moment inside a day rather than the end of one.
One caveat on (4), because it is the only place this puzzle can be legitimately argued with. "Two thirds of the way through day five" means two thirds of that day's three-foot climb. If you want it to mean two thirds of the calendar day you have to assume the climb fills the daylight and the daylight fills the day, which the problem never says. The fraction of the climb is under any reading; the fraction of the clock depends on a detail the puzzle leaves open.
The general pole
Replace the numbers with a height , a daily climb and a nightly slide , with so the snail makes progress at all. Dawn heights become , and the snail finishes on the first day whose dawn satisfies . Solving for :
The two forms are the same number, since and the ceiling of a value plus an integer is the ceiling plus that integer. The second form is the one to remember. At , , it reads , and the moment inside that day is
which returns here. Equation (6) was deliberately kept off screen in the video: reading a ceiling function out loud costs more narration than it is worth in under a minute, and a symbol nobody voices is a symbol viewers stop watching over. It belongs in writing.
Fig. 2 shows the error is systematic. The staircase never rises above the line , so the net-rate answer is never too small. For even the two agree on the day, which is the whole reason the ten-foot version is such a good trap: the reflex names the right day and the wrong moment inside it, and being half right is far more convincing than being wrong. For odd the reflex misses the day too, and the snail crosses exactly at dusk, since equation (7) then returns a fraction of one. At the answer really is the end of day five.
Where the closed form stops working
Equation (6) needs two conditions, and both are worth stating because they are the sort of thing an interviewer will probe.
First, . If the snail climbs no more than it slides it either finishes on day one, when , or never, and the quotient in (6) is meaningless or negative.
Second, . Below that the ceiling goes negative and (6) returns zero or less, which is not a day. The failure is not in the algebra but in the model: a pole shorter than one night's slide is finished before the first night is reached, and the formula was built by counting nights. Everywhere in the band the formula correctly returns day one, which covers the whole no-night regime, so the only real exclusion is the degenerate .
The trap has a name and a large family
This is an off-by-one error dressed as a rate problem. The general shape: a process repeats a cycle, the cycle has a forward part and a backward part, and the process stops mid-cycle. Any model that charges every cycle in full will overshoot by exactly the unspent backward part.
The same structure turns up in a bacterial culture that is harvested the moment it crosses a threshold, in a debt that is paid off partway through a billing period, and in loops that check their exit condition in the middle of the body rather than at the end. The fix is always the same and it is not a formula. Ask what happens on the last iteration, separately, before you divide anything.
Sources and further reading
- The dawn heights of equation (2) — Arithmetic progression
- The family this mistake belongs to — Off-by-one error
- The bracket in equation (6) — Floor and ceiling functions
- The shape of the trajectory in Fig. 1 — Piecewise linear function
Every number above was checked before publication two ways: symbolically, and by a step-by-step walk that moves the snail on a grid of steps per day and knows no formula at all. The walk and equation (6) were then compared across parameter triples, with from to and every , and they agreed on all of them.
Comments · 0
Be the first to comment.