# Computer Scientists Take Road Less Traveled

## Introduction

Not long ago, a team of researchers from Stanford and McGill universities broke a 35-year record in computer science by an almost imperceptible margin — four hundredths of a trillionth of a trillionth of a trillionth of a trillionth of a percent, to be exact. The advance — made to that poster child for hard-to-solve computer science quandaries, the “traveling salesman” problem — was too minuscule to have any immediate practical significance, but it has breathed new life into the search for improved approximate solutions.

The traveling salesman problem asks: Given a collection of cities connected by highways, what is the shortest route that visits every city and returns to the starting place? The answer has practical applications to processes such as drilling holes in circuit boards, scheduling tasks on a computer and ordering features of a genome.

The traveling salesman problem is easy to state, and — in theory at least — it can be easily solved by checking every round-trip route to find the shortest one. The trouble with this brute force approach is that as the number of cities grows, the corresponding number of round-trips to check quickly outstrips the capabilities of the fastest computers. With 10 cities, there are more than 300,000 different round-trips**.** With 15 cities, the number of possibilities balloons to more than 87 billion.

## Christofides’ Algorithm

In the early days of computers, mathematicians hoped that someone would come up with a much better approach to large traveling salesman problems — some algorithm that would allow computers to solve them in a reasonable amount of time. But while computer scientists have made progress with specific scenarios — identifying the shortest round-trip route for a 49-city map in the 1950s, a 2,392-city map in the 1980s and a 85,900-city map in 2006 — no one has devised an algorithm that can efficiently solve *every* traveling salesman problem. According to a landmark paper published in 1972, such a solution might not even be possible. The computer scientist Richard Karp, of the University of California at Berkeley, showed that the traveling salesman problem is “NP-hard,” which means that it has no efficient algorithm (unless a famous conjecture called P=NP is true — but the majority of computer scientists now suspect that it is false).

After Karp’s paper was published, many computer scientists set their sights on creating an efficient algorithm to find *approximate* solutions to the traveling salesman problem — round-trip routes whose lengths come within striking distance of that of the best possible route. Here, they had better luck: In 1976, Nicos Christofides, a professor at Imperial College London, developed an algorithm that produces routes guaranteed to be at most 50 percent longer than the shortest route.

When it was created, many computer scientists assumed that Christofides’ algorithm, which is simple enough to teach to computer science undergraduates in an hour, was a placeholder that would eventually give way to a more sophisticated algorithm able to better approximate the true solution. Yet for decades, that algorithm failed to materialize.

“Almost every graduate student in theoretical computer science has at some point spent a few futile weeks or months trying to improve upon Christofides’ algorithm,” said Sanjeev Arora, a computer scientist at Princeton University.

Finally in 2011, the Stanford-McGill team edged past Christofides’ 50 percent guarantee for certain types of traveling salesman problems, showing that its algorithm’s solutions would be at most 49.99999999999999999999999999999999999999999999999996 percent longer than the true answer.

A string of improved approximation algorithms have since emerged, after computer scientists began looking at the problem with fresh eyes. Although these approximations apply only to certain types of traveling salesman problems, the approach they embody holds great promise, said Michel Goemans, a computer scientist at the Massachusetts Institute of Technology.

“We’ve barely scratched the surface,” he said. “I’m a big believer that, maybe five years down the road, there will be a much more powerful result.”

## The Shortest Tree

Christofides’ algorithm starts by looking not for the shortest round-trip route, but the shortest “spanning tree” — a collection of branches linking the cities, with no closed loops. Unlike the shortest round-trip route, the shortest spanning tree is easy to construct efficiently: Start by finding the shortest highway connecting two cities; that’s the first branch. To add the next branch, find the shortest highway connecting a new city to one of those two — and so on until all the cities have been reached.

The resulting tree is not a possible solution to the traveling salesman problem because it does not create a round-trip route. But it can be converted into a round-trip by visualizing the branches as walls and then imagining walking along the tree, with your finger touching the wall, until you get back to where you started. The resulting trip visits every city and returns to the starting point, but it is usually far from the shortest way to do so because it typically involves retracing steps many times — every wall in the tree is traversed twice, once on each side.

However, this round-trip route is, at worst, twice as long as the best solution to the traveling salesman problem. By adding some carefully chosen highways to this tree and taking some clever shortcuts, Christofides showed how to trim this round-trip to one that is at most 50 percent longer than the shortest route.

The shortest spanning tree was a natural starting point for efforts to build a short round-trip tour. But this approach also offered an opening for researchers trying to whittle down Christofides’ 50 percent guarantee. For although the shortest spanning tree seems effective at first, other trees may be better when it comes to the short-cutting process that converts the tree into a round-trip — for example, a tree that never branches needs only one added highway to become a round-trip.

So the goal was to find a spanning tree that strikes the perfect balance between length and easy conversion into a round-trip. No efficient algorithm can uncover this perfect tree (unless P=NP), but a successful approximation algorithm only needs to find a pretty good one.

## A Fractional Trip

The path toward that “pretty good” spanning tree has involved the widely used but counterintuitive technique of allowing fractional solutions to certain types of problems. A fractional round-trip, for example, might involve going on half the highway from Minneapolis to Detroit and half the highway from Cleveland to Detroit. Such a route is, of course, nonsense from a practical perspective. But it can be formulated in precise mathematical terms, and, unlike the standard traveling salesman problem, this fractional version can be solved efficiently.

Many approximation problems in computer science can be tackled by calculating the solution to the fractional version of the problem and then finding a smart way to round off the fractions to produce an approximate solution to the original problem. But until recently, no one had figured out a good way to do this for the traveling salesman problem.

In 2009, Amin Saberi of Stanford University and Arash Asadpour, then a graduate student, developed a general rounding technique that uses randomness to try to pick a whole-number solution that retains as many properties of the fractional solution as possible. Saberi saw this new rounding technique as “a strong hammer looking for a nail.” The right nail, he suspected, might be the traveling salesman problem.

A few months later, Saberi, Asadpour, Goemans, Stanford graduate student Shayan Gharan, and Aleksander Madry, now of the École Polytechnique Fédérale de Lausanne in Switzerland, showed that the new rounding technique could produce a good approximation algorithm for a variation of the traveling salesman problem, the “asymmetric” case. The following year, Saberi, Gharan and Mohit Singh of McGill University used the same approach to develop a new approximation algorithm for the ordinary traveling salesman problem.

Given a map of cities and highways, the new algorithm starts by calculating the exact fractional solution to the traveling salesman problem. Next, it rounds off that fractional solution to a spanning tree that will hopefully come close to striking the sought-after balance between length and easy conversion to a round-trip. Finally, the algorithm plugs that spanning tree — rather than the shortest spanning tree — into Christofides’ framework.

The new algorithm was “an idea we could describe in an hour or two, but proving that it actually worked took more like a year,” Saberi said.

After a lengthy analysis, the Stanford-McGill team was finally able to beat out Christofides’ algorithm by a tiny margin for “graphical” traveling salesman problems, a wide subclass. Within months, other groups, energized by the Stanford-McGill team’s success, used other rounding techniques to produce algorithms for the graphical case with better approximations; the current record stands at 40 percent, a substantial improvement over Christofides’ 50 percent.

The graphical case “encapsulates a lot of the same difficulties that you encounter in the general problem,” Arora said, adding that the same techniques that work for the graphical case may well be brought to bear on the general traveling salesman problem.

Nevertheless, Saberi said, solving the traveling salesman approximation problem in its full generality will probably require an infusion of new ideas.

“Mathematical discovery is like feeling your way in a dark room: putting your hand here and finding a chair, putting your hand there and finding a table,” he said, paraphrasing the mathematician Andrew Wiles. “At some point, your hand hits the light switch, and suddenly everything makes sense. For the traveling salesman problem, even after so many papers that have pushed the envelope in so many directions, I don’t think that we have hit that switch yet.”

*This article was reprinted on Wired.com.*