30 likes | 211 Views
Traveling Salesperson Problem. Classic Problem in Math (optimization) and CS A “legal” tour of N cities visits each city once and returns to starting city Example tour: NY -> Dallas -> Boston -> LA -> Miami -> NY Problem definition “Find the minimal cost tour”. Data for our Example.
E N D
Traveling Salesperson Problem • Classic Problem in Math (optimization) and CS • A “legal” tour of N cities visits each city once and returns to starting city • Example tour: NY -> Dallas -> Boston -> LA -> Miami -> NY • Problem definition “Find the minimal cost tour”
Data for our Example • NY to LA 3400 miles • NY to Boston 130 miles • NY to Dallas 2700 miles • NY to Miami 1400 miles • LA to Boston 3450 miles • LA to Dallas 1750 miles • LA to Miami 3100 miles • Dallas to Miami 1900 miles • Dallas to Boston 2740 miles • Miami to Boston 1450 miles
“Interesting” Issues • The only known way to guarantee a minimal cost tour is to generate each possible tour, and “remember” the lowest cost as you go. • So, finding minimal tour is impractical for problems with more than 100 (or so) cities. A 20-city problem would take longer than we’re willing to wait in this class. • Therefore we uses heuristics to get a “good tour.”