wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Snow White's Untigrumpynol.
(Message started by: rloginunix on Apr 17th, 2014, 2:42pm)

Title: Snow White's Untigrumpynol.
Post by rloginunix on Apr 17th, 2014, 2:42pm
Snow White's Untigrumpynol.

Snow White decided to cure Mr. Grumpy from his everlasting grumpiness by cooking up an Untigrumpynol potion. From the dusty old recipe book she learned that: "if you use a 9-minute and a 13-minute hourglasses to boil the newt's tail, a Burdock root and a raven's claw in well water for exactly 30 minutes flipping the hourglasses for the first time only when the potion starts to boil" then it will have the intended magic powers.

As it turned out Snow White was a senior riddler and a smart little girl. She figured out how to make the Untigrumpinol potion, gave it to Mr. Grumpy over dinner as "it's just a bit of good old tea for you, darling", and Mr. Grumpy was never grumpy again.

How did Snow White do it?

Title: Re: Snow White's Untigrumpynol.
Post by jollytall on Apr 17th, 2014, 9:41pm
Measure 9 and 13 together until 9 minutes. (9 minutes)
Then turn the 9 minutes one and continue until the 13 finishes. The 9 has gone 4 minutes (13 minutes)
Leave the 13 as it is, but turn the 9 half-way back and wait for that (17 minutes)
Then start again the 13 minutes (30 minutes)

Title: Re: Snow White's Untigrumpynol.
Post by rloginunix on Apr 18th, 2014, 9:12am
Good job, jollytall, you are correct. That's a solution.

I've found it useful to formalize these types of problems a bit via a simple notation resembling a state transition diagram - "n:top, bottom" where "n" is the hourglass' capacity, "top" is the amount of sand in its upper half, "bottom" is the amount of sand in its lower half. Obviously "top + bottom == n" at any time. Next to the hourglass states we capture the running total time in "T:k".

jollytall's solution then can be written as:

9:9,0   13:13,0   T:0
9:0,9   13:4,9     T:9
9:9,0   13:4,9     T:9
9:5,4   13:0,13   T:13
9:4,5   13:0,13   T:13
9:0,9   13:0,13   T:17
9:0,9   13:13,0   T:17
9:0,9   13:0,13   T:30


Another solution would be to flip 13 and let it run out, then flip both and when 9 runs out flip it again - 4 minutes will be left in 13, running total will be 13 + 9 = 22 minutes. When 13 runs out 4 minutes later the running total will be 26 minutes and there will be 4 minutes worth of sand in the bottom half of 9, flip the 9 up side down (as jollytall did): 26 + 4 = 30:

9:9,0   13:13,0   T:0
9:9,0   13:0,13   T:13
9:9,0   13:13,0   T:13
9:0,9   13:4,9     T:22
9:9,0   13:4,9     T:22
9:5,4   13:0,13   T:26
9:4,5   13:0,13   T:26
9:0,9   13:0,13   T:30


If putting the hourglass on its side to stop the flow is acceptable then there's another solution: flip both, when 9 runs out flip it again. When 13 runs out the running total will be 13 minutes and the 9 will be 9:4,5. Put the 9 on its side. Flip 13 and let it run out. Running total will be 26 minutes. Let the 9 run the remaining 4 minutes.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board