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