Economist.com




Big sums

Of greed and ants
Sep 13th 2007
From The Economist print edition


Nature could help design even smarter algorithms
Illustration by Gillian Blease
Illustration by Gillian Blease

OF ALL the pleasures offered by the algorithmic world, the colourful names of its inhabitants rank pretty highly. Bubble sort is a sorting algorithm that swaps items in a list if they are in the wrong order, enabling smaller items to bubble to the top. The bully algorithm selects a lead computer in distributed computing processes. Even algorithms named after their parents can amuse: Blum Blum Shub may sound like the title of a Motown record but is actually the name of a number-generating algorithm.

Greedy algorithms take a shoot-from-the-hip approach, making the choice that gives the best possible outcome at any particular moment. To solve the travelling-salesman problem, a greedy algorithm would simply instruct a driver to go to the nearest unvisited destination. To decide where to place mobile-phone masts for the widest possible coverage, the algorithm would put the next mast where it covers the maximum amount of uncovered space.

Greedy algorithms can be very effective. They are used in network routing to find the shortest possible path to a destination, for example. But greed also makes them short-sighted, says Erik Demaine, a computer-science professor at MIT. Greedy algorithms make bad chess-players, for example, taking an opponent's pawn for an immediate but slight advantage even if it means losing a queen as a result.

For the same reason algorithms are not very good at coping with fast-changing environments, such as transport networks that are prone to disruption. But they are getting better. The mass of data combined with the power of computers now makes it possible to surpass human experts in some fields, says Ian Ayres, a professor at Yale University, in a new book, “Super Crunchers” (see article).

Thorsten Schnier, a researcher at Cercia, an offshoot of the computer science department at Britain's University of Birmingham, believes that algorithms based on biological systems offer great potential. Ants, for instance, drop pheromones as they search for food to bring back to the colony. Other ants follow these trails and converge on those where pheromones are the strongest (they are topped up more frequently on shorter routes). These principles can be mimicked in ant-colony algorithms that send virtual ants into a simulated network, randomly at first but then with instructions to follow the strongest pheromone trail. If it is blocked by some kind of disruption, the old trail dries up and the ants scurry to the next-best route.



Copyright © 2007 The Economist Newspaper and The Economist Group. All rights reserved.