Home > Riddles > The height shelf

The height shelf

Master playsLevel 2/5

It is a miniature reconstruction: each figure seems local, but ends up fixing the entire row. The pleasure is in watching a dry sequence become almost inevitable.

Five books of different heights 1, 2, 3, 4 and 5—where 1 is the shortest and 5 the tallest—are placed in a row. Each book writes down how many books taller than it has to its left.

The notes, from left to right, are:

\[ 0,\ 1,\ 1,\ 3,\ 2. \] What order are the books in, from left to right? \]

Hints

Show hints
  1. The fourth note is 3: that already completely fixes the fourth book.
  2. Once the fourth is set, the fifth note also greatly restricts the last position.
  3. Then all that remains is to order three heights so that they produce 0, 1 and 1.

Solution

Show full solution

Answer:

$$ 5,\ 2,\ 4,\ 1,\ 3. $$ Let's call the heights from left to right $a_1,\dots,a_5$. - The fourth note is $3$. Since there are only three positions to the left of the fourth book, those three have to be higher than him. Then $$

a_4=1.
$$ - The fifth note is $2$. We already know that $a_4=1$, so among the four books on his left there must be exactly two taller than him. This forces the last book to be

$$ a_5=3, $$

because if it were $2$ it would have three higher ones on the left, and if it were $4$ or $5$ it would have less than two. The heights $2,4,5$ remain for the first three positions, with notes $0,1,1$. - The first note is $0$, so the first book has to be the highest of those three: $a_1=5$.

  • For the second and third notes to both be $1$, the remaining two positions can only be $2$ and $4$ in this order. Therefore, the complete row is:

$$ 5,\ 2,\ 4,\ 1,\ 3. $$

Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: Synchronized sources · Next: The binary bells →