Sand-Timer egg boiling

1.6k Views Asked by At

You need to boil an egg. For this task you have to following items:

  • An egg.
  • a pot, filled with boiling water
  • a spoon (to take the egg in and out of the pot)
  • Two Sand-Timers (with amount of time as explained below)

In all the parts below, assume that flipping the Sand-Timer & using the spoon takes no time at all.

Boiling time must be continuous.

The puzzle parts are independent.

Part A.

Sand timers:

  • a Sand-Timer of 3 minutes.
  • a Sand-Timer of 4 minutes.

The egg need to be boiled for exactly 5 minutes.

Part B.

Sand timers:

  • a Sand-Timer of 9 minutes.
  • a Sand-Timer of 7 minutes.

The egg need to be boiled for exactly 12 minutes.

Part C.

Sand timers:

  • a Sand-Timer of 9 minutes.
  • a Sand-Timer of 7 minutes.

The egg need to be boiled for exactly 1 minute.

Part D.

Claim:

In generally the following sand timers:

  • a Sand-Timer of 9 minutes.
  • a Sand-Timer of 7 minutes.

Can measure ANY integer given time.

Prove this true or false.

2

There are 2 best solutions below

2
On

The parts A, B and C are explained with a drawing (sort of). # = a minute, @ = flip.

Part A

3 min   | # # #
4 min   | # # # #@# # # #
The egg |       [ 5 min ]

Part B

7 min   | # # # # # # #@# # # # # # #@# # # # # # #
9 min   | # # # # # # # # #@# # # # # # # # #      @# # # # # # # # #
The egg |                                     [ 12 min              ]

Part C

7 min   | # # # # # # #@# # # # # # #@# # # # # # #@# # # # # # #
9 min   | # # # # # # # # #@# # # # # # # # #@# # # # # # # # #
The egg |                                                 1 min ^

Part D

You can make a 1 min interval (as in part C). That means you can measure any period of time by repeating the process.

2
On

If all times are assumed to be integers, then inn general, if you have two sand timers that measure $a$ minutes and $b$ minutes respectively, and you seek to measure $c$ minutes. Then if $\operatorname{gcd}(a,b)$ divides $c$, you can use the Extended Euclidean Algorithm, to find integers $m$ and $n$ such that

$$am + bn = c$$.

If both $m$ and $n$ are positive, then run the first timer $m$ times and the second timer $n$ times after you're done with the first timer. If one of $m$ and $n$ is negative, then start both timers at the same time, run the first $m$ times back to back and the second $n$ times back to back, and the time you seek to measure will be the time between when whichever timer finishes its iterations first finishes and the finishing of the all of the iterations of the final timer. Since the time to measure is assumed to be positive, these are the only cases.