Jsun Yui Wong
This is an extension of Example 12.6 in Conley [2, pp. 226-228], an extension from 10 variables to 20 variables. Line 181 through line 1111 of the following computer program partly describe the problem.
The following computer program is modeled after the nuclear-chain-reaction picture on page 336 of the World Book Dictionary [1] and after the domino method of solving nonlinear systems of equations [10]. The present example has no slack variable.
0 DEFDBL A-Z
2 DEFINT I,J,K,X
3 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(111),PS(33)
12 FOR JJJJ=-32000 TO 32000
14 RANDOMIZE JJJJ
16 M=-1D+37
41 FOR J44=1 TO 20
42 A(J44)=FIX(RND*20)
43 NEXT J44
126 IMAR=10+FIX(RND*2000)
128 FOR I=1 TO IMAR
129 FOR KKQQ=1 TO 20
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
133 FOR IPP=1 TO (1+FIX(RND*19))
181 J=1+FIX(RND*20)
183 REM R=(1-RND*2)*A(J)
185 REM IF RND<.25 THEN PA=(RND)*R ELSE IF RND<.33 THEN PA=(RND^3)*R ELSE IF RND<.5 THEN PA=(RND^5)*R ELSE PA=(RND^7)*R
189 REM X(J)=A(J)+PA
190 X(J)=A(J)+FIX(RND*2 )-FIX(RND*2)
191 REM X(J)=A(J)+FIX(RND*51)-FIX(RND*51)
192 NEXT IPP
195 FOR J44=1 TO 20
196 IF X(J44)<0 THEN 1670
197 IF X(J44)>1000 THEN 1670
198 NEXT J44
411 POBA=900000000# -(X(1) -370)^2-(X(2)-535 )^2 -(X(3) -892)^2-(X(4) -312) ^2 -(X(5) -427) ^2 -(X(6) -243) ^2
412 POBB= -(X(7) -183)^2-(X(8)-873 )^2 -(X(9) -919)^2-(X(10) -944) ^2
413 POBC= -(X(11) -695)^2-(X(12)-630 )^2 -(X(13) -326)^2-(X(14) -679) ^2 -(X(15) -552) ^2 -(X(16) -480) ^2
414 POBD= -(X(17) -351)^2-(X(18)-98 )^2 -(X(19) -929)^2-(X(20) -288) ^2
459 POB1=POBA+POBB+POBC+POBD
463 P1NEWMAY=POB1
466 P=P1NEWMAY
1111 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 20
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<0 THEN 1999
1900 PRINT A(1),A(2),A(3),A(4)
1905 PRINT A(5),A(6),A(7),A(8)
1906 PRINT A(9),A(10),A(11),A(12)
1907 PRINT A(13),A(14),A(15),A(16)
1908 PRINT A(17),A(18),A(19),A(20)
1916 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=-31998 is shown below. What follows is a hand copy of the output on the computer monitor screen; immediately below there is no rounding by hand.
370 535 892 311
427 243 183 873
919 945 695 629
326 679 552 480
351 98 929 288
899999997 -32000
370 535 892 312
427 243 183 873
919 944 695 630
326 679 552 480
351 98 929 288
900000000 -31999
370 535 892 312
427 243 183 873
919 944 695 630
326 679 552 480
351 98 929 288
900000000 -31998
On a personal computer with an Intel 2.66 chip and the IBM basica/D interpreter, version GW BASIC 3.11, the throughput time from JJJJ=-32000 through JJJJ=-31998 was twenty seconds.
References
[1] Clarence L. Barnhart, Robert K. Barnhart (Editors). The World Book Dictionary, 1993 World Book, Inc., a Scott Fetzer company, Chicago London Sydney Toronto.
[2] William Conley, Optimization: A Simplified Approach. New York/Princeton: Petrocelli Books, Inc., Copyright 1981.
[3] George B. Dantzig, Discrete-Variable Extremum Problems. Operations Research, Vol. 5, No. 2 (Apr., 1957), pp. 266-277.
[4] 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.
[5] A. H. Land, A. G. Doig, An Automatic Method of Solving Discrete Programming Problems. Econometrica, Vol. 28, No. 3 (Jul., 1960), pp. 497-520.
[6] 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.
[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Boston: Springer, 2006.
[8] Harry M. Markowitz, Alan S. Manne, On the Solution of Discrete Programming Problems. Econometrica, Vol. 25, No. 1 (Jan., 1957), pp. 84-110.
[9] 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.
[10] Jsun Yui Wong (2011, April 17). The Domino Method of Solving Nonlinear Systems of Equations. Retrieved from http://computationalresultsfromcomputerprograms.wordpress.com/2011/04/17/