You're blindfolded, disoriented, and standing one mile from the Great Wall of China. How far do you have to walk to guarantee that you will run into the wall?
Assume that the wall is infinitely long and straight.
(In reply to
re: Apparently not the shorter solution. Sorry. by Steve Herman)
He probably is getting mad with me, lol.
I thought I had solved it, but I guess by changing the lengths, I also changed the worst case solution. My error is probably the assumption that the first leg must be the same as the second.
What about this for right turns though:
Start out going 1/sin(45) miles (1.414).
Turn right and go 1/sin(45) miles (1.414).
Turn right and go 2/sin(45) miles (2.828).
Turn right and go 2/sin(45) miles (2.828).
(The last leg would actually have to be a minute fraction longer in the worst case, but is small enough to not be listed.)
This is not the shortest, but I believe it does correct the flaws in the previous?
Another way, that is guaranteed to work, but is the worst case you would want to try (there are longer, but only someone not thinking...like myself?...would try them. lol) would be to walk 1/sin(45) miles, turn around and walk 2/sin(45) miles, turn around, walk 1/sin(45) miles, turn 90 degrees and walk 1/sin(45), turn around and walk 2/sin(45) miles. This would waste 1/sin(45) over the above solution.
Feel free to correct me if any of this is wrong. I'm pretty sick right now with bronchitis and a high fever, but I don't think I've messed this one up as the first solution undoes each previous actions x and y directions and ensures that even in the worst case, (89.99 degrees starting) you should still bump into the wall. The second is even simpler, just walks the axis back and forth.
Sorry if I've upset anyone. This is not as straight forward a problem as it appears, and as such, I'm giving up on it for now. I need to get better and do some paying work. Sorry again for rambling. Good night.

Posted by Joshua
on 20110903 19:38:36 