Snails climb up the well

less than 1 minute read

Published:

A snail climbs a well $x$ feet during the day, and during night, it slips $y$ feet. If the well is $h$ feet deep, how long will it take for the snail to climb?

Solution:

Let $k$ denotes the number of days for the snail climb up the well, $k \in \mathbb{N}$.

If $n \leq x$, $k = 1$.

If $n > x$,

  • If $ x \leq y$, $k = \infty$,
  • If $ x > y$ : k is the minimum value satisfies this inequality:
\[(k -1)(x-y) + x \geq h,\] \[\implies k - 1 \geq \frac{h - x}{x - y},\] \[\implies k \geq \frac{h - x}{x - y} + 1,\] \[\implies k = \lceil \frac{h - x}{x - y} + 1 \rceil\]