Maths question.

Posted by: CrackersMcCheese

Maths question. - 20/12/2003 08:10

My dad is fitting a new kitchen worktop to fit around a new cooker.

There is an arc-shape to it, but he needs to know the radius of the circle that will result from the measurements in the diagram. Measurement from the tip of the arc to the theoretical straight edge of unit is 20.

Unit is 600 in width.

Anyone know?

Posted by: CrackersMcCheese

Re: Maths question. - 20/12/2003 08:51

Got it!
Posted by: mlord

Re: Maths question. - 20/12/2003 09:55

I visited a geocache once that required solving this same exact problem.

Cheers
Posted by: CrackersMcCheese

Re: Maths question. - 20/12/2003 09:58

Its http://mathforum.org/dr.math/faq/faq.circle.segment.html#8

Just incase anyone is interested.
Posted by: wfaulk

Re: Maths question. - 20/12/2003 09:59

Since it's an interesting problem anyway, let's see:

c = 2 * sqrt(h * (2r - h))
c = 600
h = 20

600 = 2 * sqrt(20 * (2r - 20))
300 = sqrt(20 * (2r - 20))
90000 = 20 * (2r - 20)
4500 = 2r - 20
4520 = 2r
2260 = r

So the radius is 2260. Is that what you got?
Posted by: CrackersMcCheese

Re: Maths question. - 20/12/2003 10:05

Yup, same answer!
Posted by: wfaulk

Re: Maths question. - 20/12/2003 10:08

I wish I'd found some real trigonometry instead of just a straight formula for the answer, though.
Posted by: CrackersMcCheese

Re: Maths question. - 20/12/2003 10:11

Yeah, theres a strange sense of pride and accomplishment when you actually use your brain to problem solve. My dads just happy to have the answer though!
Posted by: mlord

Re: Maths question. - 20/12/2003 10:33

Well, speaking of tricky problems.. perhaps one of you can help with this one:

You are out in a high grass, sparsely-treed, level wilderness, on an overcast summer's day, on a very important quest looking for a bucket of trinkets of little value. Suddenly you startle a momma bear with cubs!!! HOLY MOLEY!!! She immediately attacks you! WHAM!!! WHAM!!!WHAM!!! Using current wisdom, you play dead, praying that it's not a rehearsal for the real thing. After an eternity of her beating and mauling you, she and her cubs disappear.

When you come to, all is quiet except your heart which is pounding like a mad drummer's tattoo. Bleeding profusely, you decide to clear out of there in a HURRY! You check your GPSr and find that it too has taken a beating. It works, but all your waypoints are gone and so is your tracklog. The only thing you are certain of, is that just before you were attacked, you were beside that tree right there which is EXACTLY 1 kilometer from a perfectly STRAIGHT trail which will lead you to safety. You have no idea in which direction to start off. Fighting the very strong temptation to head off in all directions at once, you force yourself to calm down. You realize that you must get out as soon as possible, or bleed to death. The adrenelin coursing through your body makes your brain work at the speed of light and your thoughts become crystal clear.

You immediately devise an OPTIMAL geometric plan that will guarantee that you find the trail in the SHORTEST travelling distance from that tree compared to ANY other plan, even if you start off using the WORST possible choice of heading. There is no sun, or anything else, to guide you as to direction. You also know you won't see the trail until you are right on top of it.

As it happens, you DO choose the worst initial heading in following the optimal strategy, but your plan works and you manage to get to help just in time to save your life.


Looks like a mild calculus problem to me, but it's been over 20 years since I last did *any* calculus.

Cheers
Posted by: Ezekiel

Re: Maths question. - 20/12/2003 12:43

Browsing that Wolfram site Bitt linked to makes my head spin, and in my day I was pretty good at math (AP Calculus in 9th grade etc...). I'm getting old.

-Zeke
Posted by: Anonymous

Re: Maths question. - 20/12/2003 15:58

Alright, I'm going to say walk 1 km in any direction. Then walk in a circle that has a radius of 1 km with the tree as the center. That's a total of 7.283 km.
Posted by: mlord

Re: Maths question. - 20/12/2003 17:22

Simple, but definitely non-optimal.

how to do it with less walking in the worst case?
Posted by: mcomb

Re: Maths question. - 20/12/2003 17:42

how to do it with less walking in the worst case?

Walk the square root of 2 (approx 1.4) kilometers starting from the tree in each of 4 directions where each direction is 90 degrees from the previous direction (i.e. north, south, east, west). This should cause you to cross any straight trail coming within a mile of your current position and worst case would be walking approx 5.7 miles before finding the trail. I think?

-Mike
Posted by: mlord

Re: Maths question. - 20/12/2003 17:47

But would that not require backtracking to the center each time, adding to the mileage?

Cheers
Posted by: mcomb

Re: Maths question. - 20/12/2003 19:06

But would that not require backtracking to the center each time, adding to the mileage?

Doh! Ah, hell, I give up. In reality I am busy running in the opposite direction the bear went anyway

-Mike
Posted by: johnmcd3

Re: Maths question. - 20/12/2003 21:18

definitely non-optimal.
I like to think I'm (usually!) pretty good at these, and I don't see how [censored]'s answer is not optimal, given how I understand the problem.

If that's definitely not optimal, could you explain a counter example for us? Maybe it will help us understand the problem in a different way.

John
Posted by: mlord

Re: Maths question. - 20/12/2003 21:43

I don't actually know the solution (thus my posting here), but the case of a straight radius line plus a full circle is obvious -- a 3/4 circle is just as good as a full circle and with less distance. But is there an even better solution?

Cheers
Posted by: cushman

Re: Maths question. - 20/12/2003 22:48

1.4142 = square root of 2

Walk 1.4142km from the tree. Turn 45 degrees left, then walk 1km.
Follow an arc with the radius of 1km from the tree for 3.1416km
Walk 1km straight from the point you stopped.

This is a horseshoe shaped path.

Distance = 6.556km

This path will intersect all tangents of the circle (worst case what we are looking for, I'm guessing). That's as good as I can do! Please post the real solution when you find it, Mark!
Posted by: Anonymous

Re: Maths question. - 21/12/2003 00:25

Well I'll be damned, you're right. Nice job. I drew a little picture of it for everyone to see (a little messy)

Posted by: Anonymous

Re: Maths question. - 21/12/2003 00:34

now what if you divided it up into thirds. Would this be an even shorter path? He would only have to walk one third of the circle, but he'd have to go further out than .414 km.

Posted by: Anonymous

Re: Maths question. - 21/12/2003 01:04

negative. I got 7.558 km. So cushman's answer appears to be the shortest
Posted by: Anonymous

Re: Maths question. - 21/12/2003 01:37

One last proposition. Cushman's answer was based on dividing the circle into four equal arcs, or drawing a square around the circle:


My last answer was based on dividing the circle into 3 parts, and the path was longer than Cushman's. Dividing it into 2 parts wouldn't be possible, he would just keep walking out to infinity never reaching the point where he needs to make his turn. so...
2= infinity
3= 7.55
4= 6.55

so what would happen if you drew a pentagon around the circle.

he would walk out from the tree for 1 km plus a short distance smaller than .414 km. then he'd turn, meet the circle and walk four fifths of it, then walk another short distance off on a tangent.

I'm too tired to do any more math, but I doubt it will be shorter than 6.55. it will probably just get higher and higher for inifinity the more you divide up the circle but never reaching the circumference of the circle added to the radius. In fact, now I'm positive it will do that without doing the math. I think cush's is the shortest possible. Good job, cushman.
Posted by: Anonymous

Re: Maths question. - 21/12/2003 01:56

fuck it. The shapes are irrelavent. rather, any fraction of the circle can be traversed with going out on a tangent some to cover the parts of the circle you missed. I assume 3/4 of the circle is the peak where the path is the shortest. i reckon you need calculus, which i don't know, to find the magic number. I guess that's how you got the answer, cush, rather than using these gay shapes with geometry and trigonometry.
Posted by: mcomb

Re: Maths question. - 21/12/2003 02:36

This is a horseshoe shaped path.

A ha! You know that is kind of what I was going for (pythagorean theorem to determine the farthest you would have to walk to intersect the path of a straight line touching the circle), I just F'd up what to do once you get there

-Mike
Posted by: cushman

Re: Maths question. - 21/12/2003 08:10

Nope, I just used intuition, but it could be done with trig and a graph fairly easily. We are searching for the optimal angle a that will yield the shortest distance of line e and arc g. The tough part is the distance of line e. You would have to build an equation to find the distance of line d (trig), then an equation to determine e. Angles c and b = 90 degrees. Arg g can be determined with an equation to calculate angle f.

I haven't done all of this since I believe the best angle would be 90 degrees, but it could be proven.

Posted by: cushman

Re: Maths question. - 21/12/2003 08:47

Oh, I forgot to add in the distance to one of the staring points of the horseshoe. That would add in one more section for the equation (but still doesn't change my answer).
Posted by: DWallach

Re: Maths question. - 21/12/2003 14:35

Going back and re-reading the original problem, there's no constraint on the direction of the "perfectly straight" path. The path could be tangential to the 1km circle or it could point radially outward. Given that, here's the worst case. Imagine you walk due north to the 1km circle, stop, turn 90 degrees left, and start tracing out the circle. Imagine the path actually started just to your right and had a heading toward the left, just a few degrees above being tangential with the circle. In this case, any divergence you make from the circle until you get all the way around will guarantee that you never interesect with the path to safety.

If you're trying to minimize your worst-case walking distance, then the simple answer (walk the full circle) seems to be the right answer. However, if we change the question around to be minimizing your *expected* case walking distance, given an equal probability of the safe road being at any starting point in any direction, then things get more interesting. The concern, if you stick on the 1km circle, is that you don't get to "cut off the corner" by intersecting with the safe path somewhere beyond the 1km radius.

I suspect that a useful strategy would be some kind of increasing radius arc. You need to solve for d radius / d theta, such that the expected length of the walk is minimized. To compute the expectation, you've got to integrate over all possible paths. You also have to know how long the path is that takes you to safety, such that you don't overshoot wherever that safe path takes you. I wonder, however, whether you'd just end up with d radius / d theta = 0, getting you back to the degenerate, simple solution. (Also, since the length of the safe path isn't specified, I'll bet the problem's author never considered this sort of solution.)
Posted by: mlord

Re: Maths question. - 21/12/2003 19:05

In this case, we do know that the *minimum* distance to the perfectly straight path is 1KM -- so no worries about obfuscation there. I will test the solution sometime in a week and a bit.

Thanks all!
Posted by: lectric

Re: Maths question. - 21/12/2003 23:54

You're planning to go get mauled by a bear and then try to figure out the quickest possible way back to a trail?! Man, you're way more into this math stuff than me.
Posted by: CrackersMcCheese

Re: Maths question. - 22/12/2003 04:41

LOL
Posted by: wfaulk

Re: Maths question. - 22/12/2003 13:03

I think he's stating that the trail might come to a terminus 1 km away instead of continuing past 1 km away. That's probably not what the puzzle-maker intended, though.
Posted by: mlord

Re: Maths question. - 29/12/2003 17:18

Mmm.. well, so far we all seem to be wrong.

I don't know the exact answer, but it is *around* 6.4KM total length, as measured by me today out in the field (found the cache anyways, but it took a bit of looking).

Now.. I wonder how to calculate the correct answer?
Posted by: cushman

Re: Maths question. - 29/12/2003 19:50

I'm interested, too! I looked around and found this thread on Google groups in the rec.puzzles newsgroup. There are a few solutions there, and one solves to 6.397. It seems that all the solutions are somewhat horseshoe shaped, but you need some more complex math to solve them. My solution it seems is not optimal.
Posted by: mlord

Re: Maths question. - 29/12/2003 20:53

That's hilarious! My *actual* field measurement was 6.398KM..