The K Desktop Environment

Next Previous Table of Contents

7. Technical background

7.1 TSP

The Traveling Salesman Problem is a well discussed problem in comuter science. It got its name from a traveling salesman who had to visit a number of different towns. He started his journey in his home town and wanted to be back to it at the end of his trip. So, we are talking about a round course through a couple of towns. Of course, the salesman wanted to find the shortest possible course in order to save time and patrol. A drilling automat that has to drill a couple of holes into a workpiece is in the same situation. The shortes its round course through all holes the faster the workpiece is ready.

For a small number of towns (or holes), humans are good at finding at least a short (if not the shortest) course intuitively. If the number increases humans experience difficulties to find a good course. With all the computing power available today, it seems a good idea to let computers find a short course. Unfortunately, there is no algorithm known other than computing all possible courses and taking the shortest one.

How many courses are possible? We can assume the different courses as permutations of the towns. Say, we have 4 town, A through D:

A - B - C - D
A - B - D - C
A - D - B - C
D - A - B - C
and so on

If n is the number of towns then n! (faculty) is the number of possible round courses. This is bad news because n! increases very fast with n. Let's assume the fastest computer we can afford solves a TSP of 100 towns in one hour. That sounds reasonable. Now let's assume that our next workpiece needs 101 holes drilled into it. That means that the computer needs about 100 hours to compute the shortest course. That doesn't sound reasonable at all.

7.2 GDA

There are a couple of algorithms aroud which approximate good solutions to problems like TSPs. Most of them are either not doing a good job at it or need a lot of computing power as well. Gunter Dueck developed the Great Deluge Algorithm (GDA) at the IBM Scientific Center in Heidelberg, Germany in 1990.

The idea behind GDA is simple: The shorter a round course is the higher its quality. We take all possible courses and their qualities and project them into a 3d space. In X/Y all the different courses are arranged. Similar courses are close to each other. Z represents the quality of the courses. This will give us something like a landscape where high mountains represent good (short) courses. Now we start GDA at a randomly chosen point in that landscape. The algorithm can freely travel around but it rains without end. The algorithm can travel from one point (course) to a neighbouring point (a different but similar course) but it must not get into the water.

In his article "New Optimization Heuristics" (Journal of Computational Physics 104, 86-92, 1993), Gunter Dueck writes: "Imagine, the GDA is to find the maximum point on a certain surface, for instance the highest point in a fictious empty country. Then, we let it rain withour end in this country. The algorithm walks around in this country, but it never makes a step beyond the ever increasing water level. And it rains and rains... Our idea is that in the end the GDA gets wet feet when it has reached one of the very highest points in the country so that it has found a point close the optimum."

In a 3d space, this wouldn't really work because GDA would be caught on a small mountain or an island soon. Fortunately, we use the 3d space for our limited imagination only. The real space this is happening in is a high-dimensional space which allows for escaping traps easily.

As countless experiments have shown, GDA is very fast even on usual workstations and delivers solutions which are close to the global optimum. Of course, even GDA can be trapped resulting in poor solutions. Therefore we let it run 50 or 100 times and take the best result.

Next Previous Table of Contents