Problems solving my taxi problem

I’m having some difficulty solving my own taxi problem. Thomas Viner has commented with a generic solution, suggesting that the driver’s expected distance from home is (100n)^0.5, after n 10km journeys.

Currently, I’m simply trying to figure out the expected distance after journey 2. Here’s where I’ve got.

After the first journey, she is 10km from home, by definition. As such, it’s immaterial to the puzzle which direction she took in this first journey. After journey 2, she lies on a circle with a radius of 10km and with a centre 10km from home. This circle passes through her home, and at its furthest, through a point 20km from her home.

I’ve adopted two scenarios: one in which her second journey results in her being in the semicircle nearest home (not necessarily meaning she ends up nearer home, however); another in which she ends up in the more distant semicircle.

Let’s take the first of these.

Going through the trig., assuming a is the angle between the direction of her next journey and that of her home (less than 90° in this semicircle), I think that her distance from home after the second journey will be 10*((2−2cos(a))^0.5). If a = 0°, then this is 0km (i.e. at home); if a is 90°, then it’s 14.14km. Pythagoras would support this if he were alive: root of 200.

In the farther semicircle (where a is now between 90° and 180°), the equivalent formula is 10*((2+2cos(180-a))^0.5). Again, this equates to 14.14km at 90°, and goes up to 20km at the 180° point. Things seem to be working.

Here’s the problem: I don’t know how to convert this into an expected value. (Maybe I did once, during my 17 years of maths schooling, but if I did, I don’t now.)

What I have done is calculate the average distance from each of the 3,600 0.1° intervals around the circle. This is coming out at 12.73km. Thomas’ formula calculates the expected distance as 14.14km. The discrepancy between the two suggests that one of us is most definitely wrong. Currently, I don’t know who, but 14.14km certainly seems high.

Comments

3 Responses to “Problems solving my taxi problem”

  1. Thomas Viner on October 22nd, 2006 14:00

    OK, ok, the formula that I made a stab at was wrong. You wrote about the two extreme possibilities for the 2nd journey: straight back home and directly away from home ending up 20km away. I over-extrapolated those two scenarios to get the assumption that the semi-circle facing home and the one pointing away would cancel out. So I was left with travelling perpendicular to the last journey, and that’s what my formula computed.

    I liked your method of working out the average distance from home using a large set of points on the circle. I wanted to try and reverse engineer the number you came up with (12.73km) into a formula. I needed it to a greater accuracy so I used 0.00001° intervals around the circle. This gave an average distance from home of 12.732395 km. After a bit of playing around in Excel with powers, factors and divisors I noticed that 12.732395 * pi was very, very close to 40. IE after the 2nd journey the average distance from home was 40/pi.

    I tried a number of things at this point; to make the 40; to make a formula involving the number of journeys. But I couldn’t find anything that fitted with my mental image.

    As we agreed in the last post the break even angle – the angle at which the taxi stays the same distance from home – for the 2nd journey, is 60°. As the taxi gets further away from home this break even angle will get nearer to 90°. So any formula would have to reflect this.

    At this point I’ll throw it back to you Dan and other readers for comments and further ideas.

  2. Dan on October 23rd, 2006 09:14

    I think you’re right about the 40/π, Thomas, but I’m not sure why.

    I’m thinking that a generic formula for n, however, would be difficult…

  3. Jon on October 24th, 2006 16:21

    Could be time to get the bus home – either that or find a different taxi company….

Leave a Reply