Originally posted by rgoudie
You have two old-fashioned sand-glass timers; one takes seven minutes for the sand to filter through and the other takes eleven minutes.
The problem is to find the most efficient way of using the two sand-glasses to time the cooking of a 15-minute hard-boiled egg. Starting from the instant the first sand-glass timer is upturned, what is the minimum overall time in which cooking can be accomplished?
put the egg in and turn both timers
after 7 mins timer7=0, timer11 = 4, turn timer 7
after 7+4 minutes timer7=3, timer11=0, turn timer 7(now it has 4 left)
after 7+4+4 minutes timer7 =0