Be the first to rate this file! 13 Downloads (last 30 days) File Size: 2.51 KB File ID: #25542
image thumbnail

Nearest Neighbor algorithm for the Travelling Salesman Problem

by Aleks

 

09 Oct 2009

Computes and plots the shortest path for the random 10-city Travelling Salesman Problem.

| Watch this File

File Information
Description

The 2-column vector contains cities' coordinates. The algorithm generates the optimal path to visit all the cities exactly once, and return to the starting city.

The algorithm has its limitations, and based on the cities' distribution on the map it may or may not give the optimal solution.

It resolves the problem of the equally distant cities, that some other submitted files had.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
tsp Aleks 09 Oct 2009 12:25:27
optimization Aleks 09 Oct 2009 12:25:28
nearest neighbor Aleks 09 Oct 2009 12:25:28
tsp Oscar Fernandez 08 Jul 2010 16:23:09
optimization Oscar Fernandez 08 Jul 2010 16:23:13

Contact us at files@mathworks.com