The most direct way to solve TSP would be to try all
permutations and find which path is the shortest. This method
is called a brute force search, an exhaustive search
guaranteeing a global optimal solution by systematically
generating all possible routes for a given search space and
comparing each candidate to find the shortest one. While a
brute-force search is simple to implement and it always finds
the shortest route if it exists, its cost is proportional to the size
of search space (i.e. the number of candidate solutions). The
search space tends to grow very quickly as the number of the
locations in the route increases and the brute force approach to
check all possible routes become impractical as the number of
location grows, easily outstripping the capabilities of the fastest
computers. The running time for this approach lies within a
polynomial factor of O(n!), the factorial of the number of
locations. With 10 cities, there are more than 300,000 different
routes. With 15 cities, the number of possibilities balloons to
more than 87 billion. As a result, brute-force search
becomes completely impractical even for 20 locations and is
typically used when the problem size is limited to only a few.
Other approaches for optimal solution such as dynamic
programming (Held–Karp algorithm), linear programming
, and various branch-and-bound algorithms were developed
to improve the time bounds, which seems to be difficult to
achieve.
As of today, there is no known algorithm to find the
optimal solution for large sized problems in practical time but a
number of heuristic algorithms to find near-optimal solutions
for large size problems have been developed. Often times,
this approximation algorithm approach is very gratifying in
that one finds very good solutions relatively quickly to what
appear to be very difficult problems. The nearest neighbor
(NN) search algorithm is one of the heuristic greedy algorithms. The algorithm finds an effective route by selecting the
nearest unvisited location as the next move until all locations
are visited as described below. The key idea of this
algorithm is to always visit the nearest location from the
current location. This is perhaps the simplest and most
straightforward TSP heuristic algorithm. The NN
algorithm gives an effective route quickly but does not
guarantee that the shortest route is actually determined. For N
locations randomly distributed on a map, the algorithm on
average yields a path 25% longer than the shortest possible
path (Held-Karp lower bound). The time complexity of
the NN algorithm is O(n log n).
The most direct way to solve TSP would be to try allpermutations and find which path is the shortest. This methodis called a brute force search, an exhaustive searchguaranteeing a global optimal solution by systematicallygenerating all possible routes for a given search space andcomparing each candidate to find the shortest one. While abrute-force search is simple to implement and it always findsthe shortest route if it exists, its cost is proportional to the sizeof search space (i.e. the number of candidate solutions). Thesearch space tends to grow very quickly as the number of thelocations in the route increases and the brute force approach tocheck all possible routes become impractical as the number oflocation grows, easily outstripping the capabilities of the fastestcomputers. The running time for this approach lies within apolynomial factor of O(n!), the factorial of the number oflocations. With 10 cities, there are more than 300,000 differentroutes. With 15 cities, the number of possibilities balloons tomore than 87 billion. As a result, brute-force searchbecomes completely impractical even for 20 locations and istypically used when the problem size is limited to only a few.Other approaches for optimal solution such as dynamicprogramming (Held–Karp algorithm), linear programming, and various branch-and-bound algorithms were developedto improve the time bounds, which seems to be difficult toachieve.
As of today, there is no known algorithm to find the
optimal solution for large sized problems in practical time but a
number of heuristic algorithms to find near-optimal solutions
for large size problems have been developed. Often times,
this approximation algorithm approach is very gratifying in
that one finds very good solutions relatively quickly to what
appear to be very difficult problems. The nearest neighbor
(NN) search algorithm is one of the heuristic greedy algorithms. The algorithm finds an effective route by selecting the
nearest unvisited location as the next move until all locations
are visited as described below. The key idea of this
algorithm is to always visit the nearest location from the
current location. This is perhaps the simplest and most
straightforward TSP heuristic algorithm. The NN
algorithm gives an effective route quickly but does not
guarantee that the shortest route is actually determined. For N
locations randomly distributed on a map, the algorithm on
average yields a path 25% longer than the shortest possible
path (Held-Karp lower bound). The time complexity of
the NN algorithm is O(n log n).
การแปล กรุณารอสักครู่..
