Asked by Carolina Silva
on 18 Nov 2019 at 14:48

The problem: a traveling salesman wants to visit all cities of a given together, and route distances between the various cities are known. Consider now the problem, starting and ending in a given city, determining the route to be taken by the traveling salesman who, once passing through the remaining cities, minimizes the total distance to be traveled. This problem will be developed using the neighbor's heuristic closest to go by choosing how next city to visit that that, among the cities not yet visited, is closest to the city where you are. This heuristic can be used in the traveling salesman problem. last city visited to the city of origin. The project consists of developing a menu application that allows the any user to use the resolution of this problem.

One of the menu options is' Show Affections' and for that we have to perform a function called 'prints? to show in the command window the allocations with their costs and the total cost. What is shown should respect this format:

Opportunities for recent engineering grads.

Apply Today
## 5 Comments

## Rik (view profile)

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768506

## Steven Lord (view profile)

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768508

## Carolina Silva (view profile)

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768512

## Carolina Silva (view profile)

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768514

## Rik (view profile)

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768517

Sign in to comment.