Serpent Climbing Out of a Well

Classic Problem
A serpent lies at the bottom of a well $30$ length units deep.

It starts to climb out of the well.

Every day it climbs $\dfrac 2 3$ of a length unit, only to fall back $\dfrac 1 5$ of a length unit every night.

How long does it take to climb out of the well?

Solution

 * $63 \frac 9 {10}$ days.

Proof
We have that:


 * $\dfrac 2 3 - \dfrac 1 5 = \dfrac {10 - 3} {15} = \dfrac 7 {15}$

This is how far the serpent's efforts will take it after a day and a night.

The key point to note is that once the serpent has reached the top, it will not slip down again.

So the solution is more complicated than just calculating how long it will take to climb $30$ at $\dfrac 7 {15}$ per day.

We calculate how long it will take to climb to $30 - \dfrac 2 3$:

Now we examine the situation in detail.

At the end of $62$ days and nights, the serpent has climbed $62 \times \dfrac 7 {15} = 28 \frac {14} {15}$ from the top.

It has $1 \frac 1 {15}$ left to go.

After the end of the $63$rd day, it has climbed $28 \frac {14} {15} + \dfrac 2 3 = 29 \frac 3 5$.

At the end of the $63$rd night it has slipped back down to $29 \frac 3 5 - \dfrac 1 5 = 29 \frac 2 5$.

There remains $\dfrac 3 5$ of the way to climb.

This will take $\dfrac 3 5 \div \dfrac 2 3 = \dfrac 3 5 \times \dfrac 3 2 = \dfrac 9 {10}$ of the next day to reach the top.

Hence the result.