FENS103-S03
NP-Hard

Traveling Salesman · Turkey Map

Click a city to add or remove it from the tour. Distances are real (Haversine); travel times assume an average highway speed of 90 km/h.

İstanbulİstanbulAnkaraAnkaraİzmirİzmirBursaBursaAntalyaAntalyaAdanaAdanaKonyaKonyaGaziantepGaziantepMersinMersinDiyarbakırDiyarbakırKayseriKayseriEskişehirEskişehirSamsunSamsunTrabzonTrabzonDenizliDenizliErzurumErzurumVanVanŞanlıurfaŞanlıurfaMalatyaMalatyaEdirneEdirne
Optimal
Nearest Neighbor
8 cities · 2,520 routes
Brute Force
Optimal

Tries every possible route. Guaranteed optimal — but the count grows as N!.

Distance
Drive time
Compute time
Gap to optimal
≈ < 1 ms estimated
Nearest Neighbor
Heuristic

At each step, jump to the closest unvisited city. Fast — usually ~20–25% above optimal.

Distance
Drive time
Compute time
Gap to optimal
O(n²) · finishes in milliseconds

Run

Brute Force ≈ < 1 ms.

How it scales

(N−1)!/2 distinct tours

NRoutesBF time
512< 1 ms
82,520< 1 ms
10181,4404 ms
1219,958,400399 ms
1543,589,145,60014.5 min
206.08 × 10^1639 yr
Currently 2,520 distinct tours.