the second-opinion desk

Tour Checker

Whitespace or comma separated. Leave blank to use 1, 2, 3, and so on.

List every label exactly once, separated by spaces or commas. The return from the last point to the first is automatic.

This is not a road planner. It knows nothing about roads, turns, traffic, one-way streets, time windows, or vehicles. If you paste a road-distance matrix from elsewhere, every verdict is conditional on those pasted numbers. Everything runs in this browser, and nothing is uploaded.

What the lower-bound witness is

A tour is an upper bound: it shows what one valid order costs. The other half needs a number that no tour can beat. This page uses a 1-tree. Choose one root point, build a minimum spanning tree on every other point, then add the two cheapest edges at the root.

Node potentials alter an edge from c(i,j) to c(i,j) + pi(i) + pi(j). The page searches for useful potentials, but the search is not part of the proof. The copyable witness contains the potentials and a minimum 1-tree. Anyone can run Kruskal on the printed transformed costs, then subtract twice the sum of the potentials. That result is a valid lower bound.

The gap shown is (tour - bound) / bound. It is an upper limit on how much longer the pasted order can be than the true optimum, not a claim that the actual gap equals that percentage. When tour and bound meet, the feasibility certificate and lower-bound certificate together are a certificate of optimality.

How to check this yourself

  1. Confirm that the printed labels and matrix are what you supplied. Mark each tour index once and add every consecutive cost, including last back to first.
  2. Add the printed potential at each end of every edge. Ignore the root, sort the remaining edges, and run Kruskal until you have a spanning tree.
  3. At the root, take the two least transformed edge costs. Add those to the tree, then subtract twice the sum of every potential.
  4. Compare that lower bound with the tour total. If they meet, the tour is optimal. Otherwise divide their difference by the positive lower bound to reproduce the certified ceiling.

Limits

Sources

M. Held and R. M. Karp, “The Traveling-Salesman Problem and Minimum Spanning Trees”, Operations Research 18(6), 1970, 1138–1162. The node-potential 1-tree lower bound.

G. Reinelt, “TSPLIB: A Traveling Salesman Problem Library”, ORSA Journal on Computing 3(4), 1991, 376–384. The EUC_2D convention and research fixtures used by the verifier.

The engine and verifier are in public/tools/tour-check/ and research/tour-check/.