jack: (Default)
[personal profile] jack
Puzzle: I have two identical cylindrical lemonade bottles I punched small holes into the sides of, just above the bottom1. I find that when I fill them each with water the first empties in 225 seconds and the second more quickly in 75 seconds. Without any other form of measurement, how do I use them to time 25 seconds?

Q. That's just one of those hourglass/numerology puzzles. If one hourglass empties in time p minutes, and the second in time q, then calculate p-1 mod q, and you know pp-1=1 (mod q) so pp-1=1+nq. Run glass Q n times and glass P p-1 times; when the first has finished you have exactly one minute before the second does.
A. If you think that's easy, try it.

Q. It's a trick, isn't it.
A. Probably.

Q. Tilt one of the bottles...
A. If you like. They *are* cylindrical, so you *can* halve the amount of water by tilting them until the water only just covers the base, if you think it'll help.

Q. I could use a...
A. No other equipment is necessary. You can use additional vessels of unknown size if you want to.

Q. How quickly did you solve it?
A. Actually, I made the puzzle up myself last night.

Q. Are you sure your solution works?
A. I may be mistaken. In which case I apologise, and promise to feel very embarassed.

Q. Do I need to use much maths for this?
A. Some. Nothing not taught at A-level IIRC.

Q. Can I find a different solution?
A. I don't think so, but try; it might be better.

[-1] That's not a footnote, that means 'inverse of p'
[1] Really.

Date: 2006-03-01 01:45 pm (UTC)
fanf: (Default)
From: [personal profile] fanf
Fill both bottles, and let them empty through their holes. When the fast one empties, block the hole on the other one while you re-fill the first. Let it empty again, and when it finishes block the hole on the other again. It will be 1/3 full. Pour the contents of the slow bottle into the fast bottle. You now have a 25s timer.

Date: 2006-03-01 01:52 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
I believe the change in volume is not linear in time.

This is the maths I was doing: a drip is constant, but if it's ejected under pressure I think it isn't. And I hope I haven't messed up the maths.

If I'm right I should have chosen the numbers so your solution didn't work, but I didn't think to.

Date: 2006-03-01 02:07 pm (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
I believe the change in volume is not linear in time.

In that case the volume remaining in the slow bottle won't be 1/3 of its total volume; but it will still be the correct volume to empty out of the slow bottle in 75 seconds. Therefore, assuming that the fast bottle empties at an instantaneous rate three times that of the slow bottle when they're equally full (which seems reasonable in spite of the nonlinearity you mention), it should still be the right amount to empty out of the fast bottle in 25 seconds.

Date: 2006-03-01 02:21 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Damn. You're right, that does work. I think my solution would require less setup time, but, even if I got my equations right, it's probably less general.

Date: 2006-03-01 02:07 pm (UTC)
aldabra: (Default)
From: [personal profile] aldabra
Am I allowed a pen?

You want 1/3 of 75. 75 is 1/3 of 225. Run the 75 one through twice while the 225 one is running. When the 75 one finishes the second time, mark how much water is left on the 225 one. Make a mark at the same height on the 75 one, and that shows you the level for 1/3 of the time.

Date: 2006-03-01 02:16 pm (UTC)
From: [identity profile] feanelwa.livejournal.com
I think your estimation of the content of an average A-level is wrong. With my A-level maths, and with my (admittedly I ran away from physics because they assumed more maths than I had) physical science degree, I don't know what you mean by the inverses and mods of a number that can be measured in seconds. (I would know what you meant if they were matrices, but not from what I learnt at A-level.) I think a lot of people have had A-levels inflicted on them that are easy to pass but almost devoid of useful content.

Date: 2006-03-01 02:19 pm (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
To be fair, all the modular inverses blurb is part of a solution process which doesn't work, so it isn't necessarily inconsistent for Jack to state that the solution which does work is A-level friendly.

Date: 2006-03-01 02:24 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Yes, exactly.

Trial and error will probably satisfy you that you couldn't solve this problem if you had two hourglasses that took 75s and 275s.

Admittedly, my expected answer involved integration and newton's second law, so someone who wasn't good at A-level maths probably wouldn't be able to do it even if they'd studied the things once; for that I apologise.

Date: 2006-03-01 02:28 pm (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
I'm confused now. Have you intentionally changed 225 into 275 in the above comment, or is that a typo?

Date: 2006-03-01 02:32 pm (UTC)

Date: 2006-03-01 07:03 pm (UTC)
From: [identity profile] naath.livejournal.com
As an aside mod N in this context is arithmetic modulo N so count 1,2,3,4,1,2,3,4... rather than continuing to 5, also sometimes called 'clock' arithmetic. I did this at school when discussing ciphers, but this may not be universally true.

Date: 2006-03-01 07:08 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
I think we were taught it early on, but not as something *useful*. I can't remember if it was in GCSE or A-level anywhere.

Date: 2006-03-01 08:32 pm (UTC)
From: [identity profile] feanelwa.livejournal.com
Arithmetic modulo? Ciphers? I know nothing about that, either.

Date: 2006-03-02 12:05 am (UTC)
From: [identity profile] naath.livejournal.com
So normally if I want to add 6 to 7 I get 13 but if I'm telling the time I might get 1, that's modulo 12 arithmetic.

Ciphers as in where you take A and add 2 to get C and also you take Z and add 2 to get B, that's modulo 26.

It's also a key component of RSA, but we didn't do that in school.

Date: 2006-03-02 12:12 am (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Whoah! Syncronicity.

Date: 2006-03-02 12:59 am (UTC)
From: [identity profile] feanelwa.livejournal.com
Ooh shiny. I will learn that, after first year physics, first year NSmaths and Japanese refreshing.

Date: 2006-03-02 12:12 am (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
For the record: http://en.wikipedia.org/wiki/Clock_arithmetic.

I don't know if you *care* but I'm bored. Clock (aka modulo) arithmetic is where you count 1,2,3,4,5,6,7,8,9,10,11,12,1,2,3... For instance, 11+2=1. This is mod 12.

Another way of saying the same thing, this time for mod 10 now. Think about long addition, and just watch the units digits. 9+1=10, but we're just looking at the right hand column, so 10 is the same thing as 0.

This is the normal formal definition, two numbers are the "congruent mod 11" if they differ by a multiple of 11. Now we can multiply.

Division is trickier. Always think "x divided by two means 'the number which, when doubled, is x.'" Sometimes this doesn't exist. In mod 10, none of the digits double to give 3.

But modulo prime numbers, you always will be able to divide (aka it is a group). This isn't completely obvious, but is true. This becomes very important in cryptography because multiplying things is easy (do long multiplication and discard all the multiples of the modulo number), but dividing things is hard (you basically have to try all possibilities).

It's useful for hourglasses, because if they run down in times p and q, where q is bigger and a prime number, then "you must be able to divide by p" which turns out to be the same as saying "you can multiply p by something to get very close to a multiple of q", which translates into "Run this hourglass several times, and that one two, and eventually they will finish close together, ie. 1 min apart"

We cuold have done that without the modulo arithmetic, it might even have been easier. But saying modulo is funnier to mathmos :)
mair_in_grenderich: (Default)
From: [personal profile] mair_in_grenderich
put them in a large box labelled "logic puzzles" and sell them to a mathmo for £4.99. Buy a stopwatch ;)
From: [identity profile] cartesiandaemon.livejournal.com
"Barometer solution, n, lateral or unexpected way fo solving a problem, often the most efficient and straightforward. First used towards the end of the second millennium, when..."

Date: 2006-03-01 05:57 pm (UTC)
From: [identity profile] sonicdrift.livejournal.com
Use whatever it was you used to time how long it took each bottle to empty to time 75 seconds?

I suppose I should apply IB fluid dynamics to what would happen if you made the hole 3rd of the size, but then I'd have to charge you :)

Date: 2006-03-01 06:10 pm (UTC)
From: [identity profile] cartesiandaemon.livejournal.com
Use whatever it was you used to time how long it took each bottle to empty to time 75 seconds?

A1. That wasn't the question asked.
A2. If you want me to provide a rationale, pretend I happen to have a 225 second egg timer. I can't use that to measure any intermediate time.
A3. I can 75 seconds with the water, I want to time 25 ;)

I suppose I should apply IB fluid dynamics to what would happen if you made the hole 3rd of the size,

I thought of you two, actually, when I was working out the rate of flow. I calculated that the velocity expelled should be proportional to the square root of the height of water, and the time taken to the square root of the initial height -- but I wasn't sure if you'd left simple non-turbulent flows like behind :)

but then I'd have to charge you :)

*flourishes red flag*