Dovetailing the Long Tail – Part 2: Dovetailing
Mittwoch, 30. Januar 2008 | Autor: admin
Dovetailing is a method that is used in computer science, especially in algorithms. According to this algorithm various computations can be interleaved to simulate parallel processing of these computations. It can be used even if one or more of the computations are of infinite length.
To understand the principle, assume to be standing on a crossing with 4 roads, looking for an object that is located in one of the streets. Since the streets can be of (practically) infinite length, it is no option to search the first road until it ends, then the second road and so on. The solution could be to search the first 100 meters of road 1, then the first 100 meters of road 2, road 3, road 4, and then start again with the next 100 meters – so that 200 meters of each road would be searched. The search would not be efficient. It might be the most inefficient way to search, but it would work.
Now let’s assume that there are not only 4 roads but an infinite number of roads, which is even true in a way when we look at new roads starting from somewhere in the exsiting roads as roads starting from the crossing. There is no real difference. And again we assume that roads can be andless.
So the task is to search an object in an infinite number of roads with infinite length (one should get paid very well to do this…). The algorithm must be changed now. If we would have a look at road 1 first, then 2, 3, 4, 5 and so on (of course only the first 100 meters, otherwise we might not come back if one of the road is infinite), we never would be able to start with the next 100 meters. We would never come back to road number 1 if the number of roads is infinite.
The simple solution is as follows – and this is dovetailing:
Search 100m of road 1, then
search 100m+100m of road 1, then
search 100m of road 2, then
search 100m+100m+100m of road 1, then
search 100m+100m of road 2, then
search 100m of road 3, then
search 100m+100m+100m+100m of road 1, then
search 100m+100m+100m of road 2, then
search 100m+100m of road 3, then
search 100m of road 4, then
search 100m+100m+100m+100m+100m of road 1, then
search 100m+100m+100m+100m of road 2, then
search 100m+100m+100m of road 3, then
search 100m+100m of road 4, then
search 100m of road 5, then
This algorithm works. The efficiency depends on the costs that are involved when jumping from one line to the next one.

