Tim Little wrote:
>
> On 2012-05-17, Yossu <
goo...@alansilver.co.uk> wrote:
> > I'm not worried about computing power, as we are only talking about
> > half a dozen deliveries, which shouldn't be too much of a problem
> > for a modern PC. I know these sorts of problems can have exponential
> > compute times, but we should be OK here.
>
> Oh! In that case even a brute-force "try all permutations and pick
> the best" would work very quickly. If there are only 6 deliveries,
> there's only 720 permutations.
720 what? There are 720 ways of ordering the destinations. But there
is still the question of what route to take to a destination. Draw a
straight line between any two points of a town (as opposed to a country)
map and ask yourself: what is the route that stays closest to that
line? There will often be a number of equally plausible answers.
Plausible, that is, from the point of view of someone just looking at
the map; but an experienced driver may know that some of the roads are
congested and some not. A straight A road may look tempting, but it
will be dug up next week while a gas main is replaced.
I don't know nothing about problems such as this, but it looks to me as
if it might be difficult even for a few destinations.
I don't know if this is possible: consider a "spy in the cab" that
records each route and produces data that can be fed into a computer.
The computer finds the best (in some sense) routes from those fed to
it. Next week it has a different answer because it works on different
data. But perhaps over time it will learn that certain roads are better
than others. But wait a minute, that is just what an experienced drive
will do!
> Even up to 12 deliveries would be
> within a brute-force approach -- 500 million permutations, probably
> less than a minute.
--
When a true genius appears in the world, you may know him by
this sign, that the dunces are all in confederacy against him.
Jonathan Swift: Thoughts on Various Subjects, Moral and Diverting