Jsun Yui Wong
Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun's Problem 14.4, [7, p. 415], but with n=9000 integer unknowns and 0<=X(i)<=+1, as shown in in line 110, line 112, and line 168. One notes line 144, which is 144 GOTO 168.
In other words, the problem is to minimize the following:
n-1
SIGMA [ 100*( X( i+1 ) -X(i)^2 )^2+(1-X( i))^2 ]
i=1
subject to lower bound<=X(i)<=upper bound, X(i) integer, i=1, 2, 3,..., n. See Li and Sun [7, p. 415].
0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM A(10001),X(10001)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 9000
112 A(J44)=FIX( RND*2)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 9000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*9001)
144 GOTO 168
150 R=(1-RND*2)*A(B)
155 IF RND<.5 THEN 160 ELSE 167
160 X(B)=(A(B) +RND^3*R)
165 GOTO 168
167 IF RND<.5 THEN X(B)=A(B)-1 ELSE X(B)=A(B) +1
168 IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 GOTO 220
182 FOR J44=1 TO 5000
183 IF X(J44)<-5 THEN X(J44)=A(J44)
184 IF X(J44)>5 THEN X(J44)=A(J44)
185 NEXT J44
220 SUMM=0
222 FOR J44=1 TO 8999
223 SUMM=SUMM+ 100*( X( J44 +1 ) -X(J44)^2 )^2+(1-X( J44))^2
226 NEXT J44
333 PD1=-SUMM
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 9000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1544 IF M<-8 THEN 1557
1546 PRINT I,A(9000),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889 IF M<-999 THEN 2999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1911 PRINT A(102),A(104),A(106),A(107),A(109)
1913 PRINT A(193),A(197),A(198),A(199),A(200)
1916 PRINT A(202),A(207),A(208),A(209),A(233)
1917 PRINT A(294),A(297),A(298),A(299),A(300)
1918 PRINT A(700),A(702),A(703),A(704),A(705)
1919 PRINT A(902),A(904),A(906),A(907),A(909)
1921 PRINT A(1096),A(1097),A(1098),A(1099),A(1100)
1926 PRINT A(8996),A(8997),A(8998),A(8999),A(9000)
1927 PRINT M,JJJJ
2999 NEXT JJJJ
This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS. See [8]. The complete output through JJJJ=-31997 is copied by hand from the screen and shown below. Immediately below there is no rounding by hand.
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
-202 -32000
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
-201 -31999
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
-201 -31998
10278 1 0 -31997
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 -31997
Specified by line 1904 through line 1926, only 45 A's of the 9000 A's are shown above.
The word PRINT in the computer program above can be replaced by the word LPRINT for printing on paper.
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 obtaining the output through JJJJ=-31997 was ten hours and a half.
Acknowledgment
I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.
References
[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables. Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.
[2] E. Balas, Discrete Programming by the Filter Method. Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.
[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation. The American Mathematical Monthly , Volume 18 #2, pp. 29-32.
[4] Jack Lashover (November 12, 2012). Monte Carlo Marching. www.academia.edu/5481312/MONTE_ CARLO_MARCHING
[5] 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.
[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems. Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.
[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006). http://www.books.google.ca/books?isbn=0387329951
[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.
[9] Harvey M. Salkin, Integer Programming. Menlo Park, California: Addison-Wesley Publishing Company (1975).
[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming. Publisher: Elsevier Science Ltd (1989).
[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes. Springer-Verlag, 1987.
[12] Jsun Yui Wong (2012, April 23). The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell. http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/
[13] Jsun Yui Wong (2013, September 4). A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition. http://myblogsubstance.typepad.com/substance/2013/09/
Comments