Friday, November 9, 2007

Who remembers math class?

In a group of 200 people, everybody has a non burning candle. On person has a match at lights at some moment his candle. With this candle he walks to somebody else and lights a new candle. Then everybody with a burning candle will look for somebody without a burning candle, and if found they will light it. This will continue until all candles are lit. Suppose that from the moment a candle is lit it takes exactly 30 seconds to find a person with a non burning candle and light that candle. From the moment the first candle is lit, how long does it take before all candles are lit?

found here w/ solution



Correct the equation above by inserting one straight line.
found here w/ solution

Put a mathematical character between "2" and "3" to get a number that is more than two and less than three. (You can't change their order, so (3/2) is not a correct answer) <- Which is not more than two anyway

found here w/ solution

5 comments:

Benjamin P Lee said...

I quickly came up with an overlycomplex solution to the first one, and then just did it the simple way

I came up with a completely different solution for the second one which I will post later if no one else does

The third one I only figured out b/c of my poor handwriting :)

matt said...

first one: it'd be easier if the lazy no-light bastards would just come to you. you could light at least 6 candles at a time that way

second one: ben, i presume the solution you're referring to is the same i thought up. i didn't think of the webpage's solution, but only because it said to "Correct the equation"

third one: i know one solution, but i have a question about a second one -- what's the symbol for a remainder? like 11/4 = 2 and 3/4 or 2 R 3... or 2 mod 3 or something like that in programming, right?

Kevin Berridge said...

Those last two are very cleverly worded.

I solved the candle one with logs for fun because I can never remember how exponential functions and logs relate. It was a nice refresher: ln(2^x) = x*ln(2). After working the algebra and adding a little calculator magic it would take 7.64 "rounds", or 7.64 * 30 seconds = 229.2 seconds, or 3.82 minutes to light all candles.

Benjamin P Lee said...

yeah, I used logs to figure out the first but ended up screwing up my logic somewhere (right idea, bad execution). Just adding up the powers of two worked just as well in the end :)

my solution for the second one was to make the equals sign a NOT equals sign. ;-) I didn't think about changing the symbol to a number (although that is a common trick in "add one line" questions)

I think in C/C++ it was the % sign. But yeah, you are talking about MOD. I only figured that one out b/c I happened to write out the symbols and had the multiplication symbol as a dot. I was scanning through all of the symbols I could come up with and mistook the multiplication symbol for a point and figured it out.

Anonymous said...

I get

Time required to light n candles [sec] =
30*Ceiling(log2(n))

Where ths works for all n >= 1

and log2(n) means logarithm to the base 2 of n

If you have 9 total candles to light including the first match lit one, you will still need a forth generation to light the 9th one, even though 7 of the 8 people with already lit candles will be idle, waiting for the one guy to help the 9th guy get his going. There is no realistic definiton of a continuous increase in number of canldes lit during a fraction of the 30 second period.
---------------------
I did not see the + sign becoming a 4, but I did see the equal sign changing to a non-equal sign
---------------------
On the third one, is it allowed to put any root sign between them, not just a square root sign?
If so then cube root, quartic root, etc will all be valid. Only the square root gives and answer > 1.5

Thus
2 < 2 cube root(3) < 3
2 < 2 quartic root (3) < 3
etc

I lack a way to post the actual root symbols with their subscript showing which root.

This solution works if you allow me to include the subscript as part of the "symbol"