Testing the Domino Method of General Integer/Continuous/Mixed Nonlinear Programming with Brown’s Almost Linear System of 1100 Equations/Unknowns

Jsun Yui Wong

“Solving systems of nonlinear equations is perhaps the most difficult problem in all of numerical computations,” Rice [6, 1993, p. 355].

“We make an extreme, but wholly defensible, statement: There are no good, general methods for solving systems of more than one nonlinear equation. Furthermore, it is not hard to see why (very likely) there never will be any good, general methods,” Press, Teukolsky, Vetterling, and Flannery [5, 2007, p. 473].

Using qb64v1000-win [7, 9], the following computer program seeks to solve simultaneously Brown’s almost linear system of 1100 equations; see Morgan [4, page 15], Floudas [2, page 660], and the preceding paper. While line 128 of the preceding paper is 128 FOR I = 1 TO 100000 STEP 1, here line 128 is 128 FOR I = 1 TO 500000 STEP 1.
0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(1103), A(1103), L(1103), K(1103)

5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 1100

94 A(KK) = RND * 5
95 NEXT KK

128 FOR I = 1 TO 500000 STEP 1
129 FOR K = 1 TO 1100
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 1100)

183 R = (1 – RND * 2) * A(B)

187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
301 prodd = 1

305 FOR j55 = 2 TO 1100
311 prodd = prodd * X(j55)
321 NEXT j55

371 IF prodd < .00001 THEN 1670
389 X(1) = (1) / prodd
501 summ = 0
505 FOR j27 = 1 TO 1100
511 summ = summ + X(j27)

521 NEXT j27

901 DIFF = 0
905 FOR J77 = 1 TO 1099

911 DIFF = DIFF – ABS(X(J77) + summ – 1101)
921 NEXT J77
995 P = DIFF
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 1100
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.000001 THEN 1999
1912 PRINT A(1), A(2), A(3)
1933 PRINT A(1097), A(1098), A(1099)

1939 PRINT A(1100), M, JJJJ

1999 NEXT JJJJ
This computer program was run with qb64v1000-win [7, 8]. Copied by hand from the screen, the computer program’s complete output through JJJJ= -31998 is shown below.

.9999999999999865          1          1
1           1           1
1           -2.708944180085382D-14             -32000

.9999999999900124           1          1
1            1           1
1.000000000005344          -1.829503215589057D-11         -31999

1             1          1
1             1          1
1             0             -31998
Above there is no rounding by hand; it is just straight copying by hand from the screen.

Of the 1100 values for the 1100 unknowns, only the 7 A’s of line 1912, line 1933, and line 1939 of the computer program above are shown above.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [7, 8], the wall-clock time for obtaining the output through JJJJ= -31998 was four minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] R. L. Burden, J. D. Faires. Numerical Analysis, Fifth Edition. PWS Publishing Company, 1993.

[2] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[3] 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.

[4] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[5] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[6] J. Rice. Numerical Methods, Software, and Analysis, Second Edition. Academic Press, 1993.

[7] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer/Continuous/Mixed Nonlinear Programming with Brown’s Almost Linear System of 300 Equations/Unknowns

Jsun Yui Wong

“Solving systems of nonlinear equations is perhaps the most difficult problem in all of numerical computations,” Rice [6, 1993, p. 355].

“We make an extreme, but wholly defensible, statement: There are no good, general methods for solving systems of more than one nonlinear equation. Furthermore, it is not hard to see why (very likely) there never will be any good, general methods,” Press, Teukolsky, Vetterling, and Flannery [5, 2007, p. 473].

Using qb64v1000-win [7, 9], the following computer program seeks to solve simultaneously Brown’s almost linear system of 300 equations; see Morgan [4, page 15], Floudas [2, page 660], and the preceding paper.

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(303), A(303), L(303), K(303)

5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 300

94 A(KK) = RND * 5
95 NEXT KK

128 FOR I = 1 TO 100000 STEP 1
129 FOR K = 1 TO 300

131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 300)
183 R = (1 – RND * 2) * A(B)

187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
301 prodd = 1
305 FOR j55 = 2 TO 300
311 prodd = prodd * X(j55)
321 NEXT j55

371 IF prodd < .00001 THEN 1670
389 X(1) = (1) / prodd
501 summ = 0
505 FOR j27 = 1 TO 300
511 summ = summ + X(j27)

521 NEXT j27

901 DIFF = 0
905 FOR J77 = 1 TO 299
911 DIFF = DIFF – ABS(X(J77) + summ – 301)
921 NEXT J77
995 P = DIFF
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 300
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.000001 THEN 1999
1912 PRINT A(1), A(2), A(3)
1933 PRINT A(297), A(298), A(299)
1939 PRINT A(300), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [7, 8]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= -31994 is shown below.

1.000000001427163          1          1
1          1          1
1            -2.854326552892417D-09             -31998

.9999999417680446             1             1
1          1          1
1           -1.207787376777958D-07               -31995

1          1          1
1          1          1
1          0             -31994

Above there is no rounding by hand; it is just straight copying by hand from the screen.

Of the 300 values for the 300 unknowns, only the 7 A’s of line 1912, line 1933, and line 1939 of the computer program above are shown above.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [7, 8], the wall-clock time for obtaining the output through JJJJ= -31994 was 55 seconds.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] R. L. Burden, J. D. Faires. Numerical Analysis, Fifth Edition. PWS Publishing Company, 1993.

[2] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[3] 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.

[4] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[5] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[6] J. Rice. Numerical Methods, Software, and Analysis, Second Edition. Academic Press, 1993.

[7] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer/Continuous/Mixed Nonlinear Programming with Brown’s Almost Linear System of 80 Equations

Jsun Yui Wong

“Solving systems of nonlinear equations is perhaps the most difficult problem in all of numerical computations,” Rice [6, 1993, p. 355].

“We make an extreme, but wholly defensible, statement: There are no good, general methods for solving systems of more than one nonlinear equation. Furthermore, it is not hard to see why (very likely) there never will be any good, general methods,” Press, Teukolsky, Vetterling, and Flannery [5, 2007, p. 473].

Using qb64v1000-win [7, 9], the following computer program seeks to solve simultaneously Brown’s almost linear system of 80 equations; see Morgan [4, page 15], Floudas [2, page 660], and the preceding paper.

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(83), A(83), L(83), K(83)
5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 80
94 A(KK) = RND * 5
95 NEXT KK

128 FOR I = 1 TO 100000 STEP 1

129 FOR K = 1 TO 80
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 80)
183 R = (1 – RND * 2) * A(B)

187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
301 prodd = 1

305 FOR j55 = 2 TO 80
311 prodd = prodd * X(j55)
321 NEXT j55

371 IF prodd < .00001 THEN 1670
389 X(1) = (1) / prodd
501 summ = 0
505 FOR j27 = 1 TO 80
511 summ = summ + X(j27)

521 NEXT j27
901 DIFF = 0
905 FOR J77 = 1 TO 79
911 DIFF = DIFF – ABS(X(J77) + summ – 81)
921 NEXT J77
995 P = DIFF

1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 80
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.000001 THEN 1999
1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), A(9), A(10), A(11), A(12), A(13), A(14), A(15)
1914 PRINT A(16), A(17), A(18), A(19), A(20), A(21), A(22), A(23), A(24), A(25)

1917 PRINT A(26), A(27), A(28), A(29), A(30), A(31), A(32), A(33), A(34), A(35)

1922 PRINT A(36), A(37), A(38), A(39), A(40), A(41), A(42), A(43), A(44), A(45)

1925 PRINT A(46), A(47), A(48), A(49), A(50), A(51), A(52), A(53), A(54), A(55)

1927 PRINT A(56), A(57), A(58), A(59), A(60), A(61), A(62), A(63), A(64), A(65)

1928 PRINT A(66), A(67), A(68), A(69), A(70), A(71), A(72), A(73), A(74), A(75)
1929 PRINT A(76), A(77), A(78), A(79), A(80), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [7, 8]. Copied by hand from the screen, the computer program’s output through
JJJJ= -31968 is summarized below.

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
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 -31998

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
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

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
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 -31996

.
.
.

1.000000001391194             1          1          1
1         1         1         1         1
1         1         1         1         1
1
1          1          .9999999986088064             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         1         1
1          1          1         1         1
1          1          1         1         1
1          1          1         1         1
-2.782387209521176D-09             -31968
.
Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [7, 8], the wall-clock time for obtaining the output through JJJJ= -31968 was two minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] R. L. Burden, J. D. Faires. Numerical Analysis, Fifth Edition. PWS Publishing Company, 1993.

[2] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[3] 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.

[4] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[5] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[6] J. Rice. Numerical Methods, Software, and Analysis, Second Edition. Academic Press, 1993.

[7] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer/Continuous/Mixed Nonlinear Programming with Brown’s Almost Linear System of Forty Equations

Jsun Yui Wong

The following computer program seeks to solve simultaneously Brown’s almost linear system of forty equations; see Morgan [3, page 15], Floudas [1, page 660], and the preceding paper.

The following computer program uses qb64v1000-win [5, 6].

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(42), A(42), L(43), K(43)
5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 40
94 A(KK) = RND * 5

95 NEXT KK

128 FOR I = 1 TO 100000 STEP 1
129 FOR K = 1 TO 40
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 40)
183 R = (1 – RND * 2) * A(B)

187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
391 IF (X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12) * X(13) * X(14) * X(15) * X(16) * X(17) * X(18) * X(19) * X(20) * X(21) * X(22) * X(23) * X(24) * X(25) * X(26) * X(27) * X(28) * X(29) * X(30) * X(31) * X(32) * X(33) * X(34) * X(35) * X(36) * X(37) * X(38) * X(39) * X(40)) < .001 THEN 1670
401 X(1) = (1) / (X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12) * X(13) * X(14) * X(15) * X(16) * X(17) * X(18) * X(19) * X(20) * X(21) * X(22) * X(23) * X(24) * X(25) * X(26) * X(27) * X(28) * X(29) * X(30) * X(31) * X(32) * X(33) * X(34) * X(35) * X(36) * X(37) * X(38) * X(39) * X(40))
501 summ = 0
505 FOR j27 = 1 TO 40
511 summ = summ + X(j27)

521 NEXT j27
881 P1 = -ABS(X(1) + summ – 41) – ABS(X(2) + summ – 41) – ABS(X(3) + summ – 41) – ABS(X(4) + summ – 41) – ABS(X(5) + summ – 41) – ABS(X(6) + summ – 41) – ABS(X(7) + summ – 41) – ABS(X(8) + summ – 41) – ABS(X(9) + summ – 41) – ABS(X(10) + summ – 41) – ABS(X(11) + summ – 41) – ABS(X(12) + summ – 41) – ABS(X(13) + summ – 41) – ABS(X(14) + summ – 41) – ABS(X(15) + summ – 41) – ABS(X(16) + summ – 41) – ABS(X(17) + summ – 41) – ABS(X(18) + summ – 41) – ABS(X(19) + summ – 41) – ABS(X(20) + summ – 41) – ABS(X(21) + summ – 41) – ABS(X(22) + summ – 41) – ABS(X(23) + summ – 41) – ABS(X(24) + summ – 41) – ABS(X(25) + summ – 41) – ABS(X(26) + summ – 41) – ABS(X(27) + summ – 41) – ABS(X(28) + summ – 41) – ABS(X(29) + summ – 41) – ABS(X(30) + summ – 41)
885 P2 = -ABS(X(31) + summ – 41) – ABS(X(32) + summ – 41) – ABS(X(33) + summ – 41) – ABS(X(34) + summ – 41) – ABS(X(35) + summ – 41) – ABS(X(36) + summ – 41) – ABS(X(37) + summ – 41) – ABS(X(38) + summ – 41) – ABS(X(39) + summ – 41)
891 P = P1 + P2
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 40
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.00001 THEN 1999
1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), A(9), A(10), A(11), A(12), A(13), A(14), A(15)
1914 PRINT A(16), A(17), A(18), A(19), A(20), A(21), A(22), A(23), A(24), A(25)

1917 PRINT A(26), A(27), A(28), A(29), A(30), A(31), A(32), A(33), A(34), A(35)
1918 PRINT A(36), A(37), A(38), A(39), A(40), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [5, 6]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= -31991 is shown below.

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       -31998

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

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       -31995

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       -31994

1.000000073892815          1.00000003180202          1.000000026989913
1.000000035454121          1          1          1.000000000055708
1.00000004653717          .9999999999999302             1
1          1.0          1          1          1
1.00000000669753          1          1.000000033230602
1          1          1.000000016585487          1.000000019814557
1.000000000173704          1.000000000062483          1.00000000584586
1.00000001255953          1.000000016767502             1
1          1          1.000000015390592       1.000000004933208
1          1.000000025389344          1.00000000917817
1          1.00000001863862          1.00000001370827
1.000000028575267       .9999995577287065          -4.422744466214823D-07
-31993

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       -31992

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       -31991

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= -31991 was one minute.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[4] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[5] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[6] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fourteen Equations, Second Edition

Jsun Yui Wong

With new starting vectors, 94 A(KK) = RND * 5, the following computer program seeks to solve the following system of fourteen equations; see Morgan [3, page 15] and Floudas [1, page 660]. The problem is to solve simultaneously

X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12)*X(13)*X(14) – 1 = 0
2 * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15 = 0
X(1) + 2 * X(2)+ X(3)+ X(4)+ X(5)+ X(6)+ X(7)+ X(8)+ X(9) + X(10)+ X(11)+ X(12+)X(13)+X(14) – 15 = 0
X(1) + X(2) + 2 * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + 2 * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15 =0
X(1) + X(2) + X(3) + X(4) + 2 * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + 2 * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2 * X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13) +X(14)- 15=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2 * X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2 * X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2 * X(10) + X(11) + X(12)+X(13) +X(14)- 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2 * X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2*X(12)+X(13)+X(14) – 15 = 0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+2*X(13)+X(14) – 15 = 0

While line 94 of the earlier edition is 94 A(KK) = -2 + RND * 4, here line 94 is 94 A(KK) = RND * 5. The following computer program uses qb64v1000-win [5, 6].

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(42), A(42), L(33), K(33)
5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 14

94 A(KK) = RND * 5
95 NEXT KK

128 FOR I = 1 TO 100000 STEP 1
129 FOR K = 1 TO 14
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 14)
183 R = (1 – RND * 2) * A(B)

187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
195 X(1) = -2## * X(2) – X(3) – X(4) – X(5) – X(6) – X(7) – X(8) – X(9) – X(10) – X(11) – X(12) – X(13) – X(14) + 15##
222 N1 = 2## * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
224 N3 = X(1) + X(2) + 2## * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
225 N4 = X(1) + X(2) + X(3) + 2## * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##

226 N8 = X(1) + X(2) + X(3) + X(4) + 2## * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
228 N9 = X(1) + X(2) + X(3) + X(4) + X(5) + 2## * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
231 NZ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2## * X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
232 NL = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2## * X(8) + X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
236 NM = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2## * X(9) + X(10) + X(11) + X(12) + X(13) + X(14) – 15##
238 NN = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2## * X(10) + X(11) + X(12) + X(13) + X(14) – 15##
240 NP = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2## * X(11) + X(12) + X(13) + X(14) – 15##
242 NQ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2## * X(12) + X(13) + X(14) – 15##

243 NR = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + 2## * X(13) + X(14) – 15##

244 N5 = X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12) * X(13) * X(14) – 1##

277 P = -ABS(N1) – ABS(N3) – ABS(N4) – ABS(N5) – ABS(N8) – ABS(N9) – ABS(NZ) – ABS(NL) – ABS(NM) – ABS(NN) – ABS(NP) – ABS(NQ) – ABS(NR)
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 14

1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.005 THEN 1999

1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), A(9), A(10), A(11), A(12), A(13), A(14), M, JJJJ
1999 NEXT JJJJ

This computer program was run with qb64v1000-win [5, 6]. Copied by hand from the screen, the computer program’s complete output through JJJJ= -31232 is shown below.

1       1       1       1       1
1       1       1       1       1
1       1       1       1       0
-31702

.9894820428163326          .9894820059475713          .9894820620864548
.989481994066934          .989482028460974          .9894819983316833
.9894820295242715          .9894820182102726          .9894820107581447
.9894820147819805          .989482084490845          .98948198110923
.9894819270725422          1.147251799995193          -8.898629159632537D-05
-31364

1       1       1       1       1
1       1       1       1       1
1       1       1       1       0
-31340

1       1       1       1       1
1       1       1       1       1
1       1       1       1       0
-31232

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= -31232 was ten minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[4] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[5] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[6] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fourteen Equations

Jsun Yui Wong

The following computer program seeks to solve the following system of fourteen equations; see Morgan [3, page 15] and Floudas [1, page 660]. The problem is to solve simultaneously

X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12)*X(13)*X(14) – 1 = 0
2 * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15 = 0
X(1) + 2 * X(2)+ X(3)+ X(4)+ X(5)+ X(6)+ X(7)+ X(8)+ X(9) + X(10)+ X(11)+ X(12+)X(13)+X(14) – 15 = 0
X(1) + X(2) + 2 * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + 2 * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15 =0
X(1) + X(2) + X(3) + X(4) + 2 * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + 2 * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2 * X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13) +X(14)- 15=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2 * X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2 * X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2 * X(10) + X(11) + X(12)+X(13) +X(14)- 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2 * X(11) + X(12)+X(13)+X(14) – 15=0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2*X(12)+X(13)+X(14) – 15 = 0
X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+2*X(13)+X(14) – 15 = 0
The following computer program uses qb64v1000-win [5, 6].

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(42), A(42), L(33), K(33)
5 FOR JJJJ = -32000 TO 32000
14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 14

94 A(KK) = -2 + RND * 4

95 NEXT KK

128 FOR I = 1 TO 120000 STEP 1
129 FOR K = 1 TO 14
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 14)
183 R = (1 – RND * 2) * A(B)
187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
195 X(1) = -2## * X(2) – X(3) – X(4) – X(5) – X(6) – X(7) – X(8) – X(9) – X(10) – X(11) – X(12)-X(13)-X(14) + 15##
222 N1 = 2## * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
224 N3 = X(1) + X(2) + 2## * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
225 N4 = X(1) + X(2) + X(3) + 2## * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##

226 N8 = X(1) + X(2) + X(3) + X(4) + 2## * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
228 N9 = X(1) + X(2) + X(3) + X(4) + X(5) + 2## * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
231 NZ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2## * X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+X(13) +X(14)- 15##
232 NL = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2## * X(8) + X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
236 NM = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2## * X(9) + X(10) + X(11) + X(12)+X(13)+X(14) – 15##
238 NN = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2## * X(10) + X(11) + X(12)+X(13) +X(14)- 15##
240 NP = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2## * X(11) + X(12)+X(13)+X(14) – 15##
242 NQ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2##*X(12)+X(13)+X(14) – 15##

243 NR = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12)+2##*X(13)+X(14) – 15##

244 N5 = X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12)*X(13)*X(14) – 1##

277 P = -ABS(N1) – ABS(N3) – ABS(N4) – ABS(N5) – ABS(N8) – ABS(N9) – ABS(NZ) – ABS(NL) – ABS(NM) – ABS(NN) – ABS(NP)-ABS(NQ) -ABS(NR)

1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 14

1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.005 THEN 1999

1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), A(9), A(10), A(11), A(12),A(13),A(14), M, JJJJ
1999 NEXT JJJJ

This computer program was run with qb64v1000-win [5, 6]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= 32000 is shown below.

.9994345800169007       .9994340998107576       .9994341196702957
.9994342440873741       .9994341097951481       .9994341944505631
.9994341388213243       .9994341015787208       .9994343145616216
.9994371206437515       .9994343524289298       .9994341001593768
.9994352609508378       1.007917163213641       -5.382259215925081D-04
-18412

1       1       1       1       1
1       1       1       1       1
1       1       1       1       0
5176

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= 32000 was six hours.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[4] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[5] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[6] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Thirteen Equations

Jsun Yui Wong

The following computer program seeks to solve the following system of thirteen equations; see Morgan [3, page 15] and Floudas [1, page 660]. The problem is to solve simultaneously

X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12) * X(13) – 1 = 0

2 * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14= 0

X(1) +2 * X(2) + X(3) + X(4) + X(5)+ X(6)+ X(7)+ X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14 = 0

X(1) + X(2) + 2 * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + 2 * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + 2 * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + 2 * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2 * X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2 * X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2 * X(9) + X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2 * X(10) + X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2 * X(11) + X(12) + X(13) – 14=0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2 * X(12) + X(13) – 14=0.

The following computer program uses qb64v1000-win [5, 6].

0 DEFDBL A-Z
3 DEFINT J, K

4 DIM X(42), A(42), L(33), K(33)
5 FOR JJJJ = -32000 TO 32000

14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 13

94 A(KK) = -2 + RND * 4

95 NEXT KK
128 FOR I = 1 TO 120000 STEP 1

129 FOR K = 1 TO 13

131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 13)
183 R = (1 – RND * 2) * A(B)
187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))

191 NEXT IPP
195 X(1) = -2## * X(2) – X(3) – X(4) – X(5) – X(6) – X(7) – X(8) – X(9) – X(10) – X(11) – X(12) – X(13) + 14##

222 N1 = 2## * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
224 N3 = X(1) + X(2) + 2## * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
225 N4 = X(1) + X(2) + X(3) + 2## * X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
226 N8 = X(1) + X(2) + X(3) + X(4) + 2## * X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
228 N9 = X(1) + X(2) + X(3) + X(4) + X(5) + 2## * X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##

231 NZ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2## * X(7) + X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
232 NL = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + 2## * X(8) + X(9) + X(10) + X(11) + X(12) + X(13) – 14##
236 NM = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + 2## * X(9) + X(10) + X(11) + X(12) + X(13) – 14##
238 NN = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + 2## * X(10) + X(11) + X(12) + X(13) – 14##
240 NP = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + 2## * X(11) + X(12) + X(13) – 14##

242 NQ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) + X(9) + X(10) + X(11) + 2## * X(12) + X(13) – 14##
244 N5 = X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) * X(9) * X(10) * X(11) * X(12) * X(13) – 1##
277 P = -ABS(N1) – ABS(N3) – ABS(N4) – ABS(N5) – ABS(N8) – ABS(N9) – ABS(NZ) – ABS(NL) – ABS(NM) – ABS(NN) – ABS(NP) – ABS(NQ)
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 13
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.005 THEN 1999

1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), A(9), A(10), A(11), A(12), A(13), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [5, 6]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= 32000 is shown below.

.999697940738728 .999698002721541 .999697978711392
.9996980142792856 .9996980051894986 .9996979692564104
.9996979966422026 .9996980123474062 .9996979962335975
.9996980012819657 .999697948546023 .999697730050915
1.003926401279494          -2.942887415575626D-04          -26146

.9951717968297974 .9951718665348447 .9951718835083987
.9951713678410493 .9951717110787454 .9951718913304046
.995171893752952 .9951712689920377 .9951718989876394
.9951717484025024 .9951718129945611 .9951718602386652
1.062767132973558          -2.802201310676587D-03          -14624

.9864570074909738 .9864570036942828 .9864570010887167
.9864570142216348 .9864570109341728 .9864570074920177
.9864570038377301 .9864570334396015 .9864570052552653
.9864570044212241 .9864570036987831 .9864570029470811
1.176058897784234          -1.45648299738119D-03          4587

1 1 1 1 1
1 1 1 1 1
1       1       1       0       31159

Above there is no rounding by hand; it is just straight copying by hand from the screen.

The solutions at JJJJ= 4587 and at JJJJ= 31159 are distinct solutions.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with

qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= 32000 was five hours and ten minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[4] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[5] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[6] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Eight Equations

Jsun Yui Wong

The following computer program seeks to solve the following system of eight equations; see Morgan [3, page 15] and Floudas [1, page 660]. The problem is to solve simultaneously

X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) – 1= 0

2 * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) – 9= 0

X(1) +2 * X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) – 9 = 0

X(1) + X(2) + 2 * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) – 9= 0

X(1) + X(2) + X(3) + 2 * X(4) + X(5) + X(6) + X(7) + X(8) – 9= 0

X(1) + X(2) + X(3) + X(4) + 2 * X(5) + X(6) + X(7) + X(8) – 9= 0

X(1) + X(2) + X(3) + X(4) + X(5) + 2 * X(6) + X(7) + X(8) – 9= 0

X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2 * X(7) + X(8) – 9= 0.

The following computer program uses qb64v1000-win [5, 6].

0 DEFDBL A-Z
3 DEFINT I, J, K
4 DIM X(42), A(42), L(33), K(33)
5 FOR JJJJ = -32000 TO 32000

14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 8

94 A(KK) = -10 + RND * 20
95 NEXT KK
128 FOR I = 1 TO 32000
129 FOR K = 1 TO 8

131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 8)
183 R = (1 – RND * 2) * A(B)
187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))
191 NEXT IPP
195 X(1) = -2## * X(2) – X(3) – X(4) – X(5) – X(6) – X(7) – X(8) + 9##

222 N1 = 2## * X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + X(7) + X(8) – 9##

224 N3 = X(1) + X(2) + 2## * X(3) + X(4) + X(5) + X(6) + X(7) + X(8) – 9##

225 N4 = X(1) + X(2) + X(3) + 2## * X(4) + X(5) + X(6) + X(7) + X(8) – 9##
226 N8 = X(1) + X(2) + X(3) + X(4) + 2## * X(5) + X(6) + X(7) + X(8) – 9##

228 N9 = X(1) + X(2) + X(3) + X(4) + X(5) + 2## * X(6) + X(7) + X(8) – 9##
231 NZ = X(1) + X(2) + X(3) + X(4) + X(5) + X(6) + 2## * X(7) + X(8) – 9##
233 N5 = X(1) * X(2) * X(3) * X(4) * X(5) * X(6) * X(7) * X(8) – 1##
1230 P = -ABS(N1) – ABS(N3) – ABS(N4) – ABS(N5) – ABS(N8) – ABS(N9) – ABS(NZ)
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 8
1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.005 THEN 1999
1912 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [5, 6]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= 32000 is shown below:

1          1          1          1          1
1          1          1          0          -27736

1          1          1          1          1
1          1          1          0          -27089

1          1          1          1          1
1          1          1          0          -25528

.9646019585911257          .9646019176593296          .9646019263817374
.964601950823457          .9646019481245435          .9646019076007288
.9646019964902757          1.283184476669473          -2.929337619195405D-03
-14489

1          1          1          1          1
1          1          1          0          -3426

1          1          1          1          1
1          1          1          0          -2941

1          1          1          1          1
1          1          1          0          -2429

1          1          1          1          1
1          1          1          0          -775

1          1          1          1          1
1          1          1          0          7966

1          1          1          1       1
1          1          1          0          8052

1          1          1          1          1
1          1          1          0          16814

1          1          1          1          1
1          1          1          0          17826

1          1          1          1          1
1          1          1          0          21091

.9630049689941066          .9630049340141446          .9630049963751608
.9630049553688433          .9630050328837828          .9630050670837624
.9630049759682082          1.295960135297847          -4.614673876098542D-03
30408

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= 32000 was 55 minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] Alexander P. Morgan, A Method for Computing All Solutions to Systems of Polynomial Equations, ACM Transactions on Mathematical Software, Vol. 9, No. 1, March 1983, Pages 1-17. https://folk.uib.no/ssu029/pdf_file/Morgan83.pdf

[4] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[5] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[6] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

[7] Jsun Yui Wong (February 21, 2013). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Equations.

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Equations

Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Equations, QB Edition

Jsun Yui Wong

Based on the computer program in Wong [6], the following computer program seeks to solve the nonlinear system of five equations on page 660 of Floudas [1]. The problem is to solve simultaneously

X(1) * X(2) * X(3) *X(4) *X(5) -1 =0
2* X(1) + X(2) + X(3) + X(4) +X(5) -6=0
X(1) +2*X(2) + X(3) + X(4) +X(5) -6=0
X(1) + X(2) + 2* X(3) + X(4) +X(5) -6=0
X(1) + X(2) + X(3) + 2*X(4) +X(5) -6=0.

“It is a difficult problem to solve because it involves two distinct solutions which are very close to each other,” Floudas [1, p. 660].

The following computer program uses qb64v1000-win [4, 5].

0 DEFDBL A-Z
3 DEFINT I, J, K
4 DIM X(42), A(42), L(33), K(33)
5 FOR JJJJ = -32000 TO 32000

14 RANDOMIZE JJJJ
16 M = -1D+17
91 FOR KK = 1 TO 5

94 A(KK) = -10 + RND * 20
95 NEXT KK
128 FOR I = 1 TO 20000
129 FOR K = 1 TO 5
131 X(K) = A(K)
132 NEXT K

155 FOR IPP = 1 TO FIX(1 + RND * 3)
181 B = 1 + FIX(RND * 5)
183 R = (1 – RND * 2) * A(B)
187 IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))
191 NEXT IPP
195 X(1) = -2## * X(2) – X(3) – X(4) – X(5) + 6##
222 N1 = 2 * X(1) + X(2) + X(3) + X(4) + X(5) – 6

224 N3 = X(1) + X(2) + 2 * X(3) + X(4) + X(5) – 6

225 N4 = X(1) + X(2) + X(3) + 2 * X(4) + X(5) – 6

227 N5 = X(1) * X(2) * X(3) * X(4) * X(5) – 1##

1230 P = -ABS(N1) – ABS(N3) – ABS(N4) – ABS(N5)
1451 IF P <= M THEN 1670
1657 FOR KEW = 1 TO 5

1658 A(KEW) = X(KEW)
1659 NEXT KEW
1661 M = P
1670 NEXT I
1890 IF M < -.000001 THEN 1999
1912 PRINT A(1), A(2), A(3), A(4), A(5), M, JJJJ

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [4, 5]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= -30119 is shown below:

1 1 1 1 1
0 -31865

1 1 1 1 1
0 -31744
1 1 1 1 1
0 -31660

1 1 1 1 1
0 -31604

1 1 1 1 1
0 -31500
1 1 1 1 1
0 -31458

1 1 1 1 1
0 -31435

1 1 1 1 1
0 -30994

1 1 1 1 1
0 -30920

1 1 1 1 1
0 -30902

1 1 1 1 1
0 -30843

1 1 1 1 1
0 -30821

1 1 1 1 1
0 -30717

1 1 1 1 1
0 -30512

-.5790430487746544          -.579043073198508           -.5790430041757131
-.5790431556500615           8.895215354996445         -3.103844449232722D-07
-30465

1 1 1 1 1
0 -30308

1 1 1 1 1
0 -30279

1 1 1 1 1
0 -30156

-.5790430913488978          -.5790430352155872          -.5790431362376748
-.5790430703411057           8.895215368358873          -2.36591180039034D-07
-30119

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [4, 5], the wall-clock time for obtaining the output through JJJJ= -30119 was one minute.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] C. A. Floudas, Deterministic Global Optimization. Kluwer Academic Publishers, 2000.

[2] 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.

[3] W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery. Numerical recipes: the art of scientific computing, third ed. Cambridge University Press, 2007.

[4] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY! issue70/#galleoninterview

[5] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

[6] Jsun Yui Wong (February 21, 2013). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Equations.

https://computationalresultsfromcomputerprograms.wordpress.com/2013/02/21/testing-the-domino-method-of-general-integer-nonlinear-programming-with-browns-almost-linear-system-of-equations/

The Domino Method for Solving Nonlinear Systems of Equations, QB64 Edition

Jsun Yui Wong

Based on the computer program in Wong [6], the computer program listed below seeks to solve simultaneously the following system of four nonlinear equations in Greenspan and Casulli [2, p. 44].

– 10*X(1) +5*X(2) – EXP(X(1) ) = 0

5* X(1) -10*X(2) +5*X(3) -EXP(X(2) ) = 0

5* X(2) -10*X(3) +5*X(4) -EXP(X(3) ) = 0

5*X(3) – 10*X(4) -EXP(X(4) ) ) = 0.

The following computer program uses qb64v1000-win [4, 5].

0 DEFDBL A-Z
1 DEFINT I, J, K
2 DIM B(99), N(99), A(2002), H(99), L(99), U(99), X(2002), D(111), P(111), PS(33), J(99), AA(99), HR(32), HHR(32), LHS(44), PLHS(44), LB(22), UB(22), PX(44), J44(44)
88 FOR JJJJ = -32000 TO 32000
89 RANDOMIZE JJJJ
90 M = -3D+30
100 FOR KLQ = 1 TO 4

101 A(KLQ) = FIX(-25 + RND * 50)

102 NEXT KLQ

128 FOR I = 1 TO 1000

129 FOR KKQQ = 1 TO 4
130 X(KKQQ) = A(KKQQ)
131 NEXT KKQQ
149 FOR IPP = 1 TO FIX(1 + RND * 3)
150 B = 1 + FIX(RND * 4)
155 R = (1 – RND * 2) * A(B)
167 X(B) = A(B) + (RND ^ (RND * 10)) * R
169 NEXT IPP
171 IF X(1) > 80 THEN 1670
174 IF X(4) > 80 THEN 1670
181 X(2) = (10 * X(1) + EXP(X(1))) / 5
183 X(3) = (10 * X(4) + EXP(X(4))) / 5
184 IF X(2) > 80 THEN 1670
185 IF X(3) > 80 THEN 1670
186 X(5) = 5 * X(1) – 10 * X(2) + 5 * X(3) – EXP(X(2))
188 X(6) = 5 * X(2) – 10 * X(3) + 5 * X(4) – EXP(X(3))
340 P = -ABS(X(5)) – ABS(X(6))
1111 IF P <= M THEN 1670
1452 M = P
1454 FOR KLX = 1 TO 6

1455 A(KLX) = X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M < -.0000001 THEN 1999

1904 PRINT A(1), A(2), A(3)
1907 PRINT A(4), A(5), A(6)
1989 PRINT M, JJJJ
1999 NEXT JJJJ

This computer program was run with qb64v1000-win [4, 5]. Copied by hand from the screen, the computer program’s complete output through
JJJJ= -31997 is shown below:

-.282813847989135          -.4148956819502774              -.41489568194162
-.2828138479851097          1.40658928948767D-10          2.520739172950925D-11
-1.658663206782762D-10          -31998
-.2828138479756393          -.4148956819212518                -.4148956819213826
-.2828138479757001          -1.008082506359642D-13          1.644295810621088D-12
-1.745104061257052D-12          -31997

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [5, 6], the wall-clock time for obtaining the output through JJJJ= -31997 was about two seconds–counting from “Starting program…”.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] Richard L. Burden, J. Douglas Faires, Numerical Analysis, Eighth Edition. Publisher: Brooks/Cole, 2005.
.
[2] Donald Greenspan, Vincenzo Casulli, Numerical Analysis for Applied Mathematics, Science, and Engineering. Addison-Wesley Publishing Company, 1988.

[3] 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.

[4] E.K. Virtanen (2008-05-26). “Interview With Galleon”.
http://www.basicprogramming.org/PCOPY!issue70/#galleoninterview

[5] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64

[6] Jsun Yui Wong (May 2, 2011). The Domino Method for Solving Nonlinear Systems of Equations.
https://computationalresultsfromcomputerprograms.wordpress.com/2011/05/02/the-domino-method-for-solving-nonlinear-systems-of equations/