# 117.

 C++ Neural Networks and Fuzzy Logic by Valluru B. Rao M&T Books, IDG Books Worldwide, Inc. ISBN: 1558515526   Pub Date: 06/01/95

Output for a Five-City Problem

` Please type number of cities, number of iterations 5 40 0.0645 0.069 0.0595 0.0615 0.0825   //input vector—there are 25 neurons in the network 0.074 0.0865 0.056 0.095 0.06 0.0625 0.0685 0.099 0.0645 0.0615 0.056 0.099 0.065 0.093 0.051 0.0675 0.094 0.0595 0.0635 0.0515 type distance (integer) from city 0 to city 1 10 type distance (integer) from city 0 to city 2 14 type distance (integer) from city 0 to city 3 7 type distance (integer) from city 0 to city 4 6 type distance (integer) from city 1 to city 2 12 type distance (integer) from city 1 to city 3 9 type distance (integer) from city 1 to city 4 18 type distance (integer) from city 2 to city 3 24 type distance (integer) from city 2 to city 4 16 type distance (integer) from city 3 to city 4 32  Distance Matrix 0   10  14   7  6 10   0  12   9  18 14  12  0   24  16 7   9   24   0  32 6   18  16  32  0 Weight Matrix    //25x25 matrix of weights. There are 25 neurons in the network. -30  -70   -70  -70   -70 -70  -630  -30  -30   -630 -70  -70   -30  -70   -70 -70  -630  -70  -630  -30 -30  -870  -70  -70   -30 -70   -30  -70   -70  -70 -630  -70  -630  -30  -30 -870  -70  -70   -30  -70 -70   -30  -630  -70  -630 -30   -30  -70   -70  -70 -70  -70   -30  -70   -70 -30  -630  -70  -630  -30 -30  -70   -70  -70   -30 -70  -30   -30  -630  -70 -630 -30   -70  -70   -70 -70  -70   -70   -30   -70 -30  -30   -630  -70   -630 -30  -70   -70   -70   -70 -30  -630  -30   -30   -630 -70  -870  -70   -630  -30 -70   -70  -70   -70   -30 -630  -30  -30   -630  -70 -870  -70  -630  -30   -30 -630  -30  -70   -70   -70 -70   -70  -630  -70   -630 -70  -630  -30  -30   -630 -30  -70   -70  -70   -70 -70  -630  -70  -630  -30 -30  -70   -30  -70   -70 -70  -750  -30  -630  -70 -630  -70  -630  -30  -30 -70   -30  -70   -70  -70 -750  -30  -630  -70  -630 -30   -70  -70   -30  -70 -70   -30  -30   -30  -630 -30  -630  -70   -630  -30 -70  -70   -30   -70   -70 -30  -30   -30   -630  -70 -630 -70   -70   -70   -30 -70  -30   -630  -30   -30 -30  -30   -630  -70   -630 -70  -70   -70   -30   -70 -30  -630  -30   -30   -630 -70  -70   -70   -70   -70 -30  -750  -70   -870  -30 -630  -30  -30   -630  -70 -70   -70  -70   -70   -30 -750  -70  -870  -30   -30 -870  -70  -750  -30   -30 -750  -30  -870  -70   -870 -70  -870  -30  -30   -870 -70  -750  -30  -30   -750 -30  -870  -70  -870  -30 -30  -750  -70  -750  -30 -30  -70   -30  -870  -70 -870  -70  -870  -30  -30 -750  -70  -750  -30  -30 -70   -30  -870  -70  -870 -30   -30  -750  -70  -750 -30   -70  -30   -30  -870 -30   -870  -70  -870  -30 -30   -750  -70  -750  -30 -70   -30   -30  -870  -70 -870  -30   -30  -750  -70 -750  -70   -870 -30   -30 -30  -30   -870  -70   -870 -30  -30   -750  -70   -750 -70  -870  -30   -30   -870 -70  -750  -30   -30   -750 -70  -70   -70   -450  -30 -870  -30  -30   -870  -70 -750  -30  -30   -750  -70 -70   -70  -450  -30   -30 -450  -70  -570  -30   -30 -570  -70  -450  -70   -450 -70  -450  -30  -30   -450 -70  -570  -30  -30   -570 -70  -450  -70  -450  -30 -30  -570  -70  -570  -30 -30  -1470 -30  -450  -70 -450  -70  -450  -30  -30 -570  -70  -570  -30  -30 -1470 -30  -450  -70  -450 -30   -30  -570  -70  -570 -30   -30  -30   -30  -450 -30  -450  -70   -450  -30 -30  -570  -70   -570  -30 -30  -30   -30   -450  -70 -450 -30   -30   -570  -70 -570 -30   -450  -30   -30 -30  -30    -450  -70   -450 -30  -30    -570  -70   -570 -30  -450   -30   -30   -450 -70  -570   -30   -30   -570 -70  -1470  -70   -390  -30 -450   -30   -30    -450  -70 -570   -30   -30    -570  -70 -1470  -70   -390   -30   -30 -390   -70   -1110  -30   -30 -1110  -70   -390   -70   -390 -70  -390   -30  -30    -390 -70  -1110  -30  -30    -1110 -70  -390   -70  -390   -30 -30  -1110  -70  -1110  -30 -30  -990   -30  -390   -70 -390   -70  -390   -30  -30 -1110  -70  -1110  -30  -30 -990   -30  -390   -70  -390 -30    -30  -1110  -70  -1110 -30    -30  -30    -30  -390 -30    -390   -70   -390   -30 -30    -1110  -70   -1110  -30 -30    -30    -30   -390   -70 -390   -30    -30   -1110  -70 -1110  -30    -390  -30    -30 -30  -30    -390   -70  -390 -30  -30    -1110  -70  -1110 -30  -390   -30    -30  -390 -70  -1110  -30    -30  -1110 -70  -990   -30    -30  -990 -390  -30  -30  -390   -70 -1110 -30  -30  -1110  -70 -990  -30  -30  -990   -70 -1950 -30  -30  -1950  -70 -70   -70  -70  -70    -30 initial activations  the activations: -290.894989  -311.190002  -218.365005  -309.344971  -467.774994 -366.299957  -421.254944  -232.399963  -489.249969  -467.399994 -504.375     -552.794983  -798.929871  -496.005005  -424.964935 -374.639984  -654.389832  -336.049988  -612.870056  -405.450012 -544.724976  -751.060059  -418.285034  -545.465027  -500.065063 the outputs 0.029577  0.023333  0.067838  0.023843  0.003636 0.012181  0.006337  0.057932  0.002812  0.003652 0.002346  0.001314  6.859939e-05  0.002594  0.006062 0.011034  0.000389  0.017419  0.000639  0.00765 0.001447  0.000122  0.006565  0.001434  0.002471 40 iterations completed  the activations: -117.115494  -140.58519   -85.636215   -158.240143  -275.021301 -229.135956  -341.123871  -288.208496  -536.142212  -596.154297 -297.832794  -379.722595  -593.842102  -440.377625  -442.091064 -209.226883  -447.291016  -283.609589  -519.441101  -430.469696 -338.93219   -543.509766  -386.950531  -538.633606  -574.604492 the outputs 0.196963  0.156168  0.263543  0.130235  0.035562 0.060107  0.016407  0.030516  0.001604  0.000781 0.027279  0.010388  0.000803  0.005044  0.004942 0.07511   0.004644  0.032192  0.001959  0.005677 0.016837  0.001468  0.009533  0.001557  0.001012 tourcity 0 tour order 2 tourcity 1 tour order 0 tourcity 2 tour order 1 tourcity 3 tour order 4 tourcity 4 tour order 3  the tour : 1 2 0 4 3  distance of tour is : 73 `