image thumbnail

Dynamic Programming solution to the TSP

バージョン (3.04 KB) 作成者: Elad Kivelevitch
This function solves the Traveling Salesman Problem (TSP) using Dynamic programming (DP).

ダウンロード 2.6K 件

更新 2011/5/15


The function is based on the paper by Held and Karp from 1962. The DP is guaranteed to provide the accurate (optimal) result to the TSP, but the time complexity of this algorithm is O(2^n n^2), which limits the use of this algorithm to 15 cities or less.

NOTE: For reasonable runtime, please do not try to calculate a tour of more than 13 cities. DP is not for large sets of cities.


Elad Kivelevitch (2022). Dynamic Programming solution to the TSP (, MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2008a
Windows macOS Linux

ヒントを与えたファイル: Travelling Salesman Problem by Dynamic Programming

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!