Skip to main content
3 of 5
Tried to clarify.
Joseph O'Rourke
  • 150.9k
  • 36
  • 358
  • 958

A careful experimental analysis of the nearest-neighbor (NN) heuristic (among other heuristics) is described in this paper:

Johnson, David S., and Lyle A. McGeoch. "The traveling salesman problem: A case study in local optimization." Local search in combinatorial optimization 1 (1997): 215-310. (PDF download link.)

They find that the growth rate, in comparison to the Karp-Held lower bound, "appears to be proportional to $\log n$" for "random distance matrices." This is the theoretical growth rate w.r.t. the optimum. In contrast, for "random Euclidean instances" up to $n=10^6$, they find (Table 1) that the NN heuristic leads to paths nearly constantly about 25% longer than the Karp-Held lower bound. Incidentally, the observed running time grows subquadratically.

(See also the follow-up MO question, "Travelling Salesman Problem: Can the nearest neighbor algorithm be n times longer than the optimal solution?.")

Joseph O'Rourke
  • 150.9k
  • 36
  • 358
  • 958