Jsun Yui Wong
Modeled after the computer program in Wong [21], the following computer program seeks to solve the 25-city traveling salesperson problem in Held and Karp [8, p. 207]. Line 21 through line 1111 of the following computer program partly describe the problem.
Line 91 through line 113 generate a variety of initial solution vectors; different initial solution vectors can produce different levels of domino effect.
One notes that when the number of cities is 20, the number of possible routes is
121,645,100,408,832,000 [Ragsdale [17], p. 385].
0 REM DEFDBL A-Z
2 DEFINT I,J,K,X,A
3 DIM B(5),N(5),A(70),H(5),L(5),U(5),X(70),D(5),P(5),PS(3),AA(55),I(33),J(33)
8 DIM HR(49,49)
11 FOR IZ=0 TO 24
14 FOR JZ=0 TO 24
16 READ HR(IZ,JZ)
18 NEXT JZ
19 NEXT IZ
21 DATA 9999,182,086,129,211,185,185,041,174,106,018,073,186,071,026,233,288,212,201,183,290,208,093,373,453
22 DATA 182,9999,107,142,195,022,050,144,085,165,200,109,167,114,208,128,231,036,144,126,231,045,272,305,396
23 DATA 086,107,9999,167,249,099,099,058,088,151,104,026,100,050,112,208,252,126,167,162,264,122,179,308,417
24 DATA 129,142,167,9999,082,164,115,163,220,023,146,148,276,124,136,270,341,178,254,236,343,187,158,426,506
25 DATA 211,195,249,082,9999,217,175,245,280,105,228,230,349,206,218,323,423,231,336,318,425,240,240,500,588
26 DATA 185,022,099,164,217,9999,072,144,063,187,203,125,145,114,211,119,209,027,122,104,211,023,272,283,374
27 DATA 185,050,099,115,175,072,9999,144,127,138,203,117,199,114,211,167,271,075,184,166,270,085,272,355,436
28 DATA 041,144,058,163,245,144,144,9999,146,140,059,046,158,039,067,210,256,171,169,151,258,167,134,341,421
29 DATA 174,085,088,220,280,063,127,146,9999,237,192,112,082,136,200,120,178,088,079,095,180,065,267,240,343
30 DATA 106,165,151,023,105,187,138,140,237,9999,123,125,251,113,113,275,330,201,243,225,332,210,135,415,495
31 DATA 018,200,104,146,228,203,203,059,192,123,9999,091,204,089,022,251,306,230,219,201,308,226,087,391,471
32 DATA 073,109,026,148,230,125,117,046,112,125,091,9999,126,024,099,186,241,145,154,136,243,148,166,326,406
33 DATA 186,167,100,267,349,145,199,158,082,251,204,126,9999,150,212,158,189,170,096,114,187,147,279,208,321
34 DATA 071,114,050,124,206,114,114,039,136,113,089,024,150,9999,097,162,217,141,130,112,219,137,158,302,382
35 DATA 026,208,112,136,218,211,211,067,200,113,022,099,212,097,9999,259,314,238,227,209,316,234,067,399,479
36 DATA 233,128,208,270,323,119,167,201,120,275,251,186,158,162,259,9999,114,092,068,050,103,108,320,206,279
37 DATA 288,231,252,341,423,209,271,256,178,330,306,241,189,217,314,114,9999,203,099,105,036,186,375,094,165
38 DATA 212,036,126,178,231,027,075,171,088,201,230,145,170,141,238,092,203,9999,116,098,195,023,299,288,368
39 DATA 201,144,167,254,336,122,184,169,079,243,219,154,096,130,227,068,099,116,9999,018,101,099,288,193,264
40 DATA 183,126,162,236,318,104,166,151,095,225,201,136,114,112,209,050,105,098,018,9999,107,081,270,190,270
41 DATA 290,231,264,343,425,211,270,258,180,332,308,243,187,219,316,103,036,195,101,107,9999,188,377,128,195
42 DATA 208,045,122,187,240,023,085,167,065,210,226,148,147,137,234,108,186,023,099,081,188,9999,295,271,351
43 DATA 093,272,179,158,240,272,272,134,267,135,087,166,279,158,067,320,375,299,288,270,377,295,9999,460,540
44 DATA 373,305,308,426,500,283,355,341,240,415,391,326,208,302,399,206,094,288,193,190,128,271,460,9999,113
45 DATA 453,396,417,506,588,374,436,421,343,495,471,406,321,382,479,279,165,368,264,270,195,351,540,113,9999
68 FOR JJJJ=-32000 TO 32000
69 RANDOMIZE JJJJ
70 M=-1D+37
91 A(1)=1:A(2)=2:A(3)=3:A(4)=4:A(5)=5:A(6)=6:A(7)=7:A(8)=8:A(9)=9:A(10)=10
92 A(11)=11:A(12)=12:A(13)=13:A(14)=14:A(15)=15:A(16)=16:A(17)=17:A(18)=18:A(19)=19:A(20)=20
93 A(21)=21:A(22)=22:A(23)=23:A(24)=24
101 FOR J99=1 TO 48
103 J55=1+FIX(RND*24)
105 J66=1+FIX(RND*24)
108 AA(J55)=A(J55)
109 A(J55)=A(J66)
111 A(J66)=AA(J55)
113 NEXT J99
126 REM IMAR=10+FIX(RND*100)
128 FOR I=1 TO 500
129 FOR KKQQ=1 TO 24
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
194 J=1+FIX(RND*24)
196 JJ=1+FIX(RND*24)
198 X(J)=A(JJ)
199 X(JJ)=A(J)
305 PDU=0
311 FOR J88=0 TO 23
315 PDU=PDU- HR(X(J88),X(J88+1))
320 NEXT J88
355 P=PDU- HR(X(24),0)
1111 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 24
1455 A(KLX)= ( X(KLX) )
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1899 IF M<-1722 THEN 2222
1994 PRINT A(1),A(2),A(3),A(4),A(5)
1995 PRINT A(6),A(7),A(8),A(9),A(10)
1996 PRINT A(11),A(12),A(13),A(14),A(15)
1997 PRINT A(16),A(17),A(18),A(19),A(20)
1998 PRINT A(21),A(22),A(23),A(24)
2211 PRINT M,JJJJ
2222 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=-11694 is shown below. What follows is a hand copy from the computer-monitor screen; immediately below there is no rounding by hand.
7 13 11 2 12
23 24 16 20 15
19 18 8 5 21
17 1 6 4 3
9 22 14 10
-1719 -24334
10 14 22 9 3
4 6 1 17 21
5 8 18 19 15
20 16 24 23 12
2 11 13 7
-1719 -22813
10 14 22 9 3
4 6 1 5 17
21 8 18 19 15
20 16 24 23 12
2 11 13 7
-1711 -13508
7 13 11 2 12
23 24 16 20 15
19 18 8 21 17
5 1 6 4 3
9 22 14 10
-1711 -11694
On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM, and the IBM basica/D interpreter, version GW BASIC 3.11, the wall-clock time for running through JJJJ=-11694 was 37 minutes.
References
[1] L. L. Barachet (1957), Graphic Solution of the Travelling Salesman Problem. Operations Research, Vol. 5, pp. 841-845.
[2] T. Y. Chen, H. C. Chen (2009), Mixed-Discrete Structural Optimization Using a Rank-Niche Evolution Strategy, Engineering Optimization, 41:1, 39-58.
[3] Leon Cooper, U. N. Bhat, L. J. LeBlanc, Introduction to Operations Researach Models. W. B. Saunders Company, 1977.
[4] George B. Dantzig, Discrete-Variable Extremum Problems. Operations Research, Vol. 5, No. 2 (Apr., 1957), pp. 266-277.
[5] W. J. Fabrycky, P. M. Ghare, P. E. Torgersen, Applied Operations Research and Management Science. Englewood Cliffs, N. J. 07362: Prentice-Hall, Inc., 1984.
[6] Billy E. Gillett, Introduction to Operations Research: A Computer-Oriented Algorithmic Approach. McGraw-Hill, Inc., 1976.
[7] Martin Grotschel, Olaf Holland (1991), Solution of Large-Scale Symmetric Travelling Salesman Problems, Mathematical Programming 51, pp. 141-202.
[8] Michael Held, Richard Karp (1962), A Dynamic Programming Approach to Sequencing Problems, J. Soc. Indust. Appl. Math., Vol. 10, No. 1, March, 1962, pp. 196-210.
[9] Michael Junger, Thomas M. Liebling, Dennis Naddef, George L. Nemhauser, William R. Pulleybank, Gerhart Reinelt, Giovanni Rinaldi, Lawrence A. Wolsey--Editors, 50 Years of Integer Programming 1958-2008. Berlin: Springer, 2010.
[10] R. L. Karg, G. L. Thompson (1964), A Heuristic Approach to Solving Travelling Salesman Problems. Management Sciencce, Vol. 10, Number 2, pp. 225-248.
[11] A. H. Land, A. G. Doig, An Automatic Method of Solving Discrete Programming Problems. Econometrica, Vol. 28, No. 3 (Jul., 1960), pp. 497-520.
[12] E. L. Lawler, M. D. Bell, A Method for Solving Discrete Optimization Problems. Operations Research, Vol. 14, No. 6 (Nov.-Dec., 1966), pp. 1098-1112.
[13] Harry M. Markowitz, Alan S. Manne, On the Solution of Discrete Programming Problems. Econometrica, Vol. 25, No. 1 (Jan., 1957), pp. 84-110.
[14] Ken McAloon, Carol Tretkoff, Optimization and Computational Logic. John Wiley and Sons, Inc., 1996.
[15] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.
[16] Katta G. Murty, Opereations Research: Deterministic Optimization Models. Prentice Hall, Upper Saddle River, New Jersey 07458, 1994.
[17] Cliff T. Ragsdale, Spreadsheet Modeling and Decision Analysis, Fifth Edition. South-Westen, Cengage Learning, 2008.
[18] H. H. Rosenbrock (1960), An Automatic Method for Finding the Greatest or Least Value of a Function, Computer Journal Vol. 3, pp. 175-184.
[19] Wayne L. Winston, Munirpallam Venkataramanan, Introduction to Mathematical Programming: Operations Research, Volume One, Fourth Edition. Pacific Grove, CA 93950: Brooks/Cole--Thomson Learning, 2003.
[20] Wayne L. Winston, S. Christian Albright, Practical Management Science, Third Edition. Thomson/South-Western, 2007.
[21] Jsun Yui Wong (2011, April 17). The Domino Method of Solving Nonlinear Systems of Equations. Retrieved from http://computationalresultsfromcomputerprograms.wordpress.com/2011/04/17/
[22] Ji-Hui Zhang, Xin-He Xu (1999), An Efficient Evoutionary Programming Algorithm. Computers & Operations Research 26, 645-663.