Drowning

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

alterant
Posts: 32
Joined: Fri Feb 15, 2008 1:34 am UTC

Drowning

Postby alterant » Tue Oct 07, 2008 4:45 am UTC

(Stolen from a problem of Richard Feynman's.)

You're walking along a beach when you hear someone cry for help. You look and see there's someone drowning offshore, farther up the beach from where you are.

(*)<-- you (0, 3)

B E A C H

________________________________________________________


W A T E R (*)<-- her (5, -2)


Let's say the waterline is along the x-axis at y=0 and you start at x=0, y=3 . She is at x=5, y=-2 .

You can move one third as fast in water as you can running along the beach.

--> Should you make a beeline for her?
--> If not, what exactly is the optimal path; i.e., at what point x should you enter the water?

The method is surprisingly simple, but you may need to go through some rather ugly algebra to implement it. I'd say if you can come up with the proper relation, that's a wrap. Life's too short, and the rest is just crunch, crunch, crunch.

Assume:
-There’s no current or anything like that.
-She won’t mind waiting, hypothermic, in the crashing surf while you find the optimal path.

Hint:
Spoiler:
Snell's law for optics

Puck
Posts: 615
Joined: Tue Nov 27, 2007 7:29 pm UTC

Re: Drowning

Postby Puck » Tue Oct 07, 2008 5:18 am UTC

Spoiler:
Well, obviously the solution must be composed of two straight lines: one from you to some point (p, 0) on the waterline, and one from that point to the victim. The travel time is given by [imath]\sqrt {9 + p^2} + 3 \sqrt {4 + (5-p)^2}[/imath], so minimizing this function for p between 0 and 5 should give you the answer you're looking for.

Unfortunately it's been years since I did any reasonably complex algebra, it is past midnight, and my brain does not want to work well enough to simplify, differentiate, and solve.


edited for failure to spoiler.
Last edited by Puck on Tue Oct 07, 2008 3:01 pm UTC, edited 1 time in total.
22/7 wrote:If I could have an alternate horn that would yell "If you use your turn signal, I'll let you in" loud enough to hear inside another car, I would pay nearly any amount of money for it.

afarnen
Posts: 157
Joined: Mon May 05, 2008 12:12 pm UTC

Re: Drowning

Postby afarnen » Tue Oct 07, 2008 5:50 am UTC

Spoiler:
My calculator told me 4.426. But I'm going to try to get an exact answer. Here's how:

First, I created a function that would return the time it takes get from (0, 3) to (x, 0). This is essentially the distance formula:
[math]f(x) = \sqrt{x^2 + 9}[/math]
Then I created a function that would return the time it takes to get from (x, 0) to (5, -2). This is also just the distance formula:
[math]g(x) = 3\sqrt{{(x - 5)}^2 + 4}[/math]
Then I found the derivative of [imath]f(x) + g(x)[/imath], which I set equal to 0, to find the critical points.
[math]0 = {\frac{1}{2}}\;\frac{1}{\sqrt{x^2 + 9}}\;(2x) + 3[{\frac{1}{2}}\;\frac{1}{\sqrt{{(x - 5)}^2 + 4}}\;(2x-10)][/math]
Which simplifies to:
[math]0 = 8x^4 - 80x^3 + 277x^2 - 810x + 2025[/math]
Then I decided to take a long break.

alterant
Posts: 32
Joined: Fri Feb 15, 2008 1:34 am UTC

Re: Drowning

Postby alterant » Tue Oct 07, 2008 1:12 pm UTC

afarnen wrote:Then I decided to take a long break.


That's where I decided life's too short as well. :P You both got perfectly good answers, to my mind.
I'm simply impressed by the fact that:

Spoiler:
[imath]\frac{\sin(\theta_{air})}{\sin(\theta_{water})} = \frac{v_{air}}{v_{water}}[/imath]

Where theta is measured from the vertical line passing through the entry point.

I really like that a law for optics can be understood as path minimization (because of the principle of least time).

Cauchy
Posts: 602
Joined: Wed Mar 28, 2007 1:43 pm UTC

Re: Drowning

Postby Cauchy » Tue Oct 07, 2008 3:23 pm UTC

Yeah, before I read the hint and saw you already had, I was thinking of posting "Hint:
Spoiler:
Snell's Law
myself. It's really a great discovery, and it's kind of surprising it has applications in a problem like this (though it makes sense when you think about it).
(∫|p|2)(∫|q|2) ≥ (∫|pq|)2
Thanks, skeptical scientist, for knowing symbols and giving them to me.

afarnen
Posts: 157
Joined: Mon May 05, 2008 12:12 pm UTC

Re: Drowning

Postby afarnen » Tue Oct 07, 2008 8:51 pm UTC

Cauchy wrote:Yeah, before I read the hint and saw you already had, I was thinking of posting "Hint:
Spoiler:
Snell's Law
myself. It's really a great discovery, and it's kind of surprising it has applications in a problem like this (though it makes sense when you think about it).

Oh I didn't read the spoiler until after I did all that differentiating and simplifying! I was about to also convert the quartic equation into a quadratic using a method I found online.

DocFaustus
Posts: 5
Joined: Sun Aug 10, 2008 6:21 am UTC

Re: Drowning

Postby DocFaustus » Wed Oct 08, 2008 5:53 am UTC

Not to insult or poke fun at your puzzle, but it'd be pretty funny if a guy started calculating this the second he heard someone cry from the ocean.

Puck
Posts: 615
Joined: Tue Nov 27, 2007 7:29 pm UTC

Re: Drowning

Postby Puck » Wed Oct 08, 2008 2:59 pm UTC

But this is xkcd! That's how we roll.
22/7 wrote:If I could have an alternate horn that would yell "If you use your turn signal, I'll let you in" loud enough to hear inside another car, I would pay nearly any amount of money for it.

alterant
Posts: 32
Joined: Fri Feb 15, 2008 1:34 am UTC

Re: Drowning

Postby alterant » Wed Oct 08, 2008 5:20 pm UTC

DocFaustus wrote:Not to insult or poke fun at your puzzle, but it'd be pretty funny if a guy started calculating this the second he heard someone cry from the ocean.


Actually, it's spelled "A-W-E-S-O-M-E".

"Help! Help!"
"I'm trying to, but hey - do you know how to solve a quartic?"
"Gurgle..."
"I can't google it, my iPhone's at home!"


Return to “Logic Puzzles”

Who is online

Users browsing this forum: No registered users and 7 guests