C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao
MTBooks, IDG Books Worldwide, Inc.
ISBN: 1558515526 Pub Date: 06/01/95
Previous Table of Contents Next
Example of a Traveling Salesperson Problem for Hand Calculation
Suppose there are four cities in the tour. Call these cities, C
1
, C
2
, C
3
, and C
4
. Let the matrix of distances be the
following matrix D.
0 10 14 7
D = 10 0 6 12
14 6 0 9
7 12 9 0
From our earlier discussion on the number of valid and distinct tours, we infer that there are just three such
tours. Since it is such a small number, we can afford to enumerate the three tours, find the energy values
associated with them, and pick the tour that has the smallest energy level among the three. The three tours are:
Do'stlaringiz bilan baham: |