« MetaJam | Main| OpenNTF Everywhere »

Understanding the Travelling Salesman Problem

Another widely-known blog posits that when the "Lotus knows" bus does its tour, it's a travelling salesman problem.  The first statement is "Not crossing the continent twice is a quick win."  But this shows a fundamental misunderstanding of the travelling salesman problem, and that is that you must START and END from the same point.

Rudimentary geometry tells us that the shortest distance between two points is a straight line, so therefore the optimal solution to any travelling salesman problem is a straight line from the origin point to the most distant point and back again.  If the requirement were as simple as NY to LA, you'd go NY - LA - NY as a straight line, and that would be it.  (the advance physicists and sf-fans among us will point out that the shortest distance between two points is zero.  Well, if you can bend space sufficiently, you're right, and when you achieve that, please let me know)

But you'll notice that even the optimal route must cross the continent twice.  That's because you have to end where you began.  Even with the simplicity of a straight line, the very definition of the problem indicates that the solution is => furthest distance x 2.

Of course, the germane point is: is there a faster route for the bus to take?  And the answer is "probably."  As you'll discover in any advanced travelling salesman challenge, not all distances are equal.  Distances that can be covered during times that would otherwise be useless are cheaper.  Thus, a bus that travels from Milwaukee to Silicon Valley over the weekend is taking advantage of the fact that weekend days are better spent moving rather than meeting with people who have classes or jobs.  It doesn't help you to arrive at a destination on Saturday when all you can do to be effective is wait around until Monday.

These calculations aren't rocket science.  But they aren't trivial either.  So I leave you with Wikipedia's description of the travelling salesman problem: "...it is assumed that there is no efficient algorithm for solving TSPs. In other words, it is likely that the worst case running time for any algorithm for TSP increases exponentially with the number of cities, so even some instances with only hundreds of cities will take many CPU years to solve exactly."

If this is the best we can invent to complain about, clearly we're on the right track.

Comments

1 - This is not wholly a Traveling Salesman problem, as IBM could hire custom coaches in each destination city (or perhaps cluster of cities -- one coach potentially serves both Chicago and Milwaukee, a mere 70 miles apart -- where's Freimark when we need him!) and then simply shuttle the crew via plane from point to point.

Of course, that would drive costs up, but that was not part of the original premise as describe.

2 - What? Is there a problem with the GPS? I thought the bus was being driven remotely by a Sametime bot using the Lotus Document Imaging Driver which scans what is ahead then reports to the bot and the bus keeps moving along.
Make sure the Solar panels are installed properly, it's gonna need a lot of juice to get across the country this way.

Sadly the bus is not making it to Florida.

3 - If this is all you can invent to complain about, I think the target of your scoffing is doing well.

4 - @4 - I suppose that's one word for it. As far as I can tell, his plan would have been to drive the bus into the ocean at the end of the tour.

@5 - huh?

5 - An unwritten, implied rule is that the salesman, bus or other traveler must travel through Las Vegas because Vegas sufficiently curves space, and otherwise warps perception, as to be zero cost. You always break even going through Vegas...right?

6 - Lotus Knows you don't need a PhD to plan a road trip.

7 - This complex problem can actually be solved pretty fast with Genetic Algorithms with an optimal solution or near optimal solution.

/Jesper

8 - There's also the question of time, if the salesman could travel sufficiently faster than the earth's rotation and arrive back where he started before he left, then has he travelled any distance at all ?

9 - Liberate tutame ex infernis!

10 - one coach potentially serves both Chicago and Milwaukee, a mere 70 miles apart -- where's Freimark when we need him!) and then simply shuttle the crew via plane from point to point.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Search 

Disclaimer 

Welcome to Escape Velocity!

Opinions expressed here by Nathan T. Freeman are not necessarily those of his employer. However, there's a decent chance they are, so check with them if you really want to know.

But really... do you need that kind of validation? Are the opinions expressed here in doubt?

MiscLinks