Tuesday, September 20, 2016

ERRATUM: Simultaneously Solving in Integers a System of Three Simultaneous Nonlinear Equations Involving Seven General Integer Variables

Jsun Yui Wong

The last paragraph should read as follows:
On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [10], the wall-clock time for obtaining the output through JJJJ= -31666 was 1 minute and 10 seconds.

Sunday, September 18, 2016

Simultaneously Solving in Integers a System of Three Simultaneous Nonlinear Equations Involving Seven General Integer Variables

Jsun Yui Wong

The computer program listed below seeks one integer solution or more to the following given system of three nonlinear equations:

 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ (-.25) + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) =  2205.868


 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ .125 + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) = 2206.889

 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ .5 + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) = 2208.886.

These three equations are based on page 112 of Hock and Schittkowski [3].  
One notes the starting vector 94 A(KK) = FIX(1 + RND * 4).  

0 REM DEFDBL A-Z

3 DEFINT J, K, X

4 DIM X(342), A(342), L(333), K(333)


5 FOR JJJJ = -32000 TO 32000

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

                94 A(KK) = FIX(1 + RND * 4)

    95 NEXT KK

    128 FOR I = 1 TO 30000


        129 FOR K = 1 TO 7


            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 7)
            182 IF RND < .5 THEN 183 ELSE GOTO 189


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


            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))

            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP

        265 FOR J45 = 1 TO 7

            266 IF X(J45) < 1 THEN X(J45) = A(J45)


        267 NEXT J45

        268 N11 = 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ (-.25) + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) - 2205.868


        269 N12 = 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ .125 + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) - 2206.889

        270 N13 = 10 * X(1) * X(2) ^ (-1) * X(4) ^ 2 * X(6) ^ (-3) * X(7) ^ .5 + 15 * X(1) ^ (-1) * X(2) ^ (-2) * X(3) * X(4) * X(5) ^ (-1) * X(7) ^ (-.5) + 20 * X(1) ^ (-2) * X(2) * X(4) ^ (-1) * X(5) ^ (-2) * X(6) + 25 * X(1) ^ 2 * X(2) ^ 2 * X(3) ^ (-1) * X(5) ^ .5 * X(6) ^ (-2) * X(7) - 2208.886


        277 P = -ABS(N11) - ABS(N12) - ABS(N13)


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

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

    1910 PRINT A(1), A(2), A(3), A(4), A(5), A(6), A(7), M, JJJJ

1999 NEXT JJJJ

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

6      6      6      6      6
6      6      -9.020425E-04      -31927

6      6      6      6      6
6      6      -9.020425E-04      -31914

6      6      6      6      6
6      6      -9.020425E-04      -31780

6      6      6      6      6
6      6      -9.020425E-04      -31666

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 [10], the wall-clock time for obtaining the output through JJJJ= -31666 was 3 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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229. www.SciRP.org/journal/am.
[3] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes. Springer-Verlag, 1981.
[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.
[5] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.
[6] 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.
[7] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.
[8] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.
[9] K. Schittkowski, More Test Examples for Nonlinear Programming Codes. Springer, 1987.
[10] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64.
[11] Wolfram Research, Inc., Diophantine Polynomial Systems. https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.
[12] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.
[13] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition. http://myblogsubstance.typepad.com/substance/2015/10/

Thursday, September 15, 2016

Simultaneously Solving in Integers a System of Four Simultaneous Nonlinear Equations Involving 10000 General Integer Variables

Jsun Yui Wong

The computer program listed below seeks one integer solution or more to the following given system of four nonlinear equations:

X(1) * X(2) * X(3) * X(4) ...* X(10000)    - 1 = 0

-(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2 = 0

9999
sigma    [ 100 * (X(k + 1) - X(k) ^ 2) ^ 2 + (1 - X(k)) ^ 2 ]  = 0
k=1
   
   10000
 - sigma   X(i}^2    + 10000   = 0.
     i=1

The first equation above is a part of the Brown almost linear function [1, p. 660]. The second equation above comes from Schittkowski [8, p. 187].  The third is based on the Rosenbrock function in Schitkowski [8, pp. 118-123].  The last comes from Schittkowski [8, p.194].

One notes the starting vector 94 A(KK) = -3 + FIX(RND * 7).


0 REM DEFDBL A-Z

3 DEFINT J, K, X

4 DIM X(10042), A(10042), L(10033), K(10033)

5 FOR JJJJ = -32000 TO 32000

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


        94 A(KK) = -3 + FIX(RND * 7)



    95 NEXT KK

    128 FOR I = 1 TO 1000000 STEP 1



        129 FOR K = 1 TO 10000

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 10000)
            182 IF RND < .5 THEN 183 ELSE GOTO 189


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



            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))
            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP


        201 PRODBROWN = 1
        203 FOR J33 = 1 TO 10000
            206 PRODBROWN = PRODBROWN * X(J33)


        209 NEXT J33


        222 N1 = PRODBROWN - 1


        231 SUMSCHI = 0
        236 FOR J22 = 1 TO 10000

            239 SUMSCHI = SUMSCHI + X(J22) ^ 2


        241 NEXT J22
        244 N9 = -SUMSCHI + 10000


        246 N5 = -(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2


        257 sumrose = 0

        259 FOR j44 = 1 TO 9999

            261 sumrose = sumrose + 100 * (X(j44 + 1) - X(j44) ^ 2) ^ 2 + (1 - X(j44)) ^ 2
        263 NEXT j44
        265 N6 = sumrose - 0

        277 P = -ABS(N1) - ABS(N5) - ABS(N6) - ABS(N9)


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

            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < -5000 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(9996), A(9997), A(9998), A(9999), A(10000), M, JJJJ

1999 NEXT JJJJ

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

1      1      1      1      1
1      1      1      1      1
1      1      1      2      4
-920      -32000

1      1      1      1      1
1      1      1      1      1
1      1      1      1      1
0      -31999

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

Of the 10000 A's, only the 15 A's of line 1912 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 [9], the wall-clock time for obtaining the output through JJJJ= -31999 was 100 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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229. www.SciRP.org/journal/am.

[3] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[6] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[7] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

[8] K. Schittkowski, More Test Examples for Nonlinear Programming Codes. Springer, 1987.

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

[10] Wolfram Research, Inc., Diophantine Polynomial Systems. https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[11] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

[12] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition. http://myblogsubstance.typepad.com/substance/2015/10/

Monday, September 12, 2016

ERRATA: Simultaneously Solving in Integers a System of Two Simultaneous Nonlinear Equations with Fifty General Integer Variables


Jsun Yui Wong

The two equations of the first paragraph should read as follows:

20
sigma   i*(x(i)^2+x(i)^4) -4200 =  0
i=1

50
sigma   i*(x(i)^2+x(i)^4) -25500  =  0.
i=1

Simultaneously Solving in Integers a System of Two Simultaneous Nonlinear Equations with Fifty General Integer Variables

Jsun Yui Wong

The computer program listed below seeks one integer solution or more to the following given system of two nonlinear equations:

20
sigma   i*(x(i)^2+x(i)^4)  =  0
i=1

50
sigma   i*(x(i)^2+x(i)^4)  =  0.
i=1

These two equations are based on the last two problems in Schittkowski [9, page 212 and page 213].
One notes the starting vector line 94, which is 94 A(KK) = -1000 + FIX(RND * 2001).

0 REM DEFDBL A-Z
3 DEFINT J, K, X

4 DIM X(1142), A(1142), L(1133), K(1133)


5 FOR JJJJ = -32000 TO 32000


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

        94 A(KK) = -1000 + FIX(RND * 2001)


    95 NEXT KK


    128 FOR I = 1 TO 100000



        129 FOR K = 1 TO 50

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 50)
            182 IF RND < .5 THEN 183 ELSE GOTO 189

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


            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))

            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP
        1103 SUMONE = 0


        1111 FOR J44 = 1 TO 20

            1115 SUMONE = SUMONE + J44 * (X(J44) ^ 2 + X(J44) ^ 4)


        1118 NEXT J44

        1203 SUMTWO = 0


        1211 FOR J44 = 1 TO 50

            1215 SUMTWO = SUMTWO + J44 * (X(J44) ^ 2 + X(J44) ^ 4)



        1218 NEXT J44
        1275 N111 = SUMONE - 4200



        1276 N112 = SUMTWO - 25500



        1277 P = -ABS(N111) - ABS(N112)



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

            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < 0 THEN 1999


    1912 PRINT A(1), A(2), A(3), A(4), A(5)



    1913 PRINT A(6), A(7), A(8), A(9), A(10)

    1914 PRINT A(11), A(12), A(13), A(14), A(15)


    1915 PRINT A(16), A(17), A(18), A(19), A(20), M, JJJJ


    1921 PRINT A(21), A(22), A(23), A(24), A(25)


    1922 PRINT A(26), A(27), A(28), A(29), A(30)

    1923 PRINT A(31), A(32), A(33), A(34), A(35)
    1924 PRINT A(36), A(37), A(38), A(39), A(40)
    1925 PRINT A(41), A(42), A(43), A(44), A(45)
    1927 PRINT A(46), A(47), A(48), A(49), A(50)

1999 NEXT JJJJ

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

-1      -1      -5      -1      -1
0      0      -3      0      0
0      0      0      1      0
3      0      0      -1      0
0         -31999
0      -2      1      0      0
0      0      -1      -1      0
0      0      0      -2      0
-1      -2      0      0      0
0      2      0      0      2
3      0      0      -4      0

0      1      0      -1      -5
1      1      -1      2      0
1      0      0      2      0
0      1      0      -2      0
0         -31992
-1      1      2      -1      1
-1      -1      0      0      -2
-1      -2      2      0      0
-1      0      2      3      -1
1      1      4      -1      1
-1      -1      2      2      0

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 [10], the wall-clock time for obtaining the output through JJJJ= -31992 was 20 seconds, not including creating .EXEC file time.

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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229. www.SciRP.org/journal/am.
[3] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes. Springer-Verlag, 1981.
[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.
[5] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.
[6] 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.
[7] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.
[8] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.
[9] K. Schittkowski, More Test Examples for Nonlinear Programming Codes. Springer-Verlag, 1987.
[10] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64.
[11] Wolfram Research, Inc., Diophantine Polynomial Systems. https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.
[12] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.
[13] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition. http://myblogsubstance.typepad.com/substance/2015/10/

Thursday, September 8, 2016

Solving in Integers a System of Six Simultaneous Nonlinear Equations with Nine General Integer Variables

Jsun Yui Wong

The computer program listed below seeks one integer solution or more to the following given system of 6 nonlinear equations:

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

 -(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2 = 0

 X(1) ^ 2 * X(4) + SIN(X(4) - X(5)) - 1 = 0

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

 X(2) + X(3) ^ 4 * X(4) ^ 2 - 2 = 0

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

The first equation above is an adaptation of the objective function on page 117 of Hock and Schittkowski [3].  The second is an adaptation of the objective function on page 187 of Schittkowsi [9].  The next three are adaptations of three of the expressions on page 69 of [3].  The last equation above is a conversion of the objective function on page 70 of  [3].

0 REM DEFDBL A-Z
3 DEFINT J, K, X

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

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

        94 A(KK) = -100 + FIX(RND * 201)


    95 NEXT KK


    128 FOR I = 1 TO 100000


        129 FOR K = 1 TO 9

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 9)
            182 IF RND < .5 THEN 183 ELSE GOTO 189

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


            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))

            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP
        211 N1 = -.5 * (X(1) * X(4) - X(2) * X(3) + X(3) * X(9) - X(5) * X(9) + X(5) * X(8) - X(6) * X(7))

        246 N55 = -(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2


        251 N66 = X(1) ^ 2 * X(4) + SIN(X(4) - X(5)) - 1
        255 N77 = (X(1) - X(2)) ^ 2 + (X(3) - 1) ^ 2 + (X(4) - 1) ^ 4 + (X(5) - 1) ^ 6

        259 N88 = X(2) + X(3) ^ 4 * X(4) ^ 2 - 2

        265 N91 = (X(1) - X(2)) ^ 2 + (X(2) - X(3)) ^ 3 + (X(3) - X(4)) ^ 4 + (X(4) - X(5)) ^ 4



        277 P = -ABS(N1) - ABS(N55) - ABS(N66) - ABS(N77) - ABS(N88) - ABS(N91)


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

            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < 0 THEN 1999
 
    1912 PRINT A(1), A(2), A(3), A(4), A(5)

    1913 PRINT A(6), A(7), A(8), A(9), M, JJJJ

1999 NEXT JJJJ

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

1      1      1      1      1
0      1      0      -13      0
-32000

1      1      1      1      1
0      0      0      0      0
-31998

1      1      1      1      1
0      0      0      0      0
-31996

1      1      1      1      1
1      1      1      2      0
-31995

1      1      1      1      1
0      0      0      -13      0
-31993

1      1      1      1      1
0      0      0      0      0
-31992

1      1      1      1      1
0      0      0      0      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 [10], the wall-clock time for obtaining the output through JJJJ= -31991 was 20 seconds,  including "Creating .EXEC file time...".      

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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[5] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[7] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[8] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

[9]  K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

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

[11] Wolfram Research, Inc., Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[12] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

[13] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition.  http://myblogsubstance.typepad.com/substance/2015/10/

Wednesday, September 7, 2016

Solving in Integers a System of Seven Simultaneous Nonlinear Equations with Nine General Integer Variables

 Jsun Yui Wong

The computer program listed below seeks one integer solution or more to the following given system of seven nonlinear equations:

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

 -X(3) ^ 2 - X(4) ^ 2 + 2 = 0

 -X(9) ^ 2 + 1 = 0

  -X(5) ^ 2 - X(6) ^ 2 + 2 = 0

  -X(1) ^ 2 - (X(2) - X(9)) ^ 2 + 1 = 0

  -(X(1) - X(5)) ^ 2 - (X(2) - X(6)) ^ 2 = 0

  -(X(1) - X(7)) ^ 2 - (X(2) - X(8)) ^ 2 = 0.

These equations are adaptations of expressions on page 117 of Hock and Schittkowski [3].

0 DEFDBL A-Z
3 DEFINT J, K, X

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 9

        94 A(KK) = -10 + FIX(RND * 21)


    95 NEXT KK


    128 FOR I = 1 TO 100000 STEP 1

        129 FOR K = 1 TO 9

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 9)
            182 IF RND < .5 THEN 183 ELSE GOTO 189

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


            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))

            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP
        211 N1 = -.5 * (X(1) * X(4) - X(2) * X(3) + X(3) * X(9) - X(5) * X(9) + X(5) * X(8) - X(6) * X(7))

        212 N2 = -X(3) ^ 2 - X(4) ^ 2 + 2

        213 N3 = -X(9) ^ 2 + 1


        214 N4 = -X(5) ^ 2 - X(6) ^ 2 + 2
        215 N5 = -X(1) ^ 2 - (X(2) - X(9)) ^ 2 + 1


        216 N6 = -(X(1) - X(5)) ^ 2 - (X(2) - X(6)) ^ 2
        217 N7 = -(X(1) - X(7)) ^ 2 - (X(2) - X(8)) ^ 2


        277 P = -ABS(N1) - ABS(N2) - ABS(N3) - ABS(N4) - ABS(N5) - ABS(N6) - ABS(N7)


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

            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < 0 THEN 1999


    1912 PRINT A(1), A(2), A(3), A(4), A(5)


    1913 PRINT A(6), A(7), A(8), A(9), M, JJJJ

1999 NEXT JJJJ

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

1      -1      -1      -1      1
-1      1      -1      -1      0
-31999

1      1      1      1      1
1      1      1      1      0
-31998

1      -1      1      -1      1
-1      1      -1      -1      0
-31996

-1      1      1      1      -1
1      -1      1      1      0
-31993

1      -1      1      -1      1
-1      1      -1      -1      0
-31992

-1      -1      -1      -1      -1
-1      -1      -1      -1      0
-31991

1      1      1      1      1
1      1      1      1      0
-31990

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 [10], the wall-clock time for obtaining the output through JJJJ= -31990 was 15 seconds, including "Creating .EXEC file time...".      

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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[5] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[7] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[8] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

[9]  K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

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

[11] Wolfram Research, Inc., Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[12] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

[13] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition.  http://myblogsubstance.typepad.com/substance/2015/10/

Tuesday, September 6, 2016

Solving in Integers a System of Two Simultaneous Nonlinear Equations

Jsun Yui Wong

The computer program listed below seeks to solve the following given system of two nonlinear equations:
-(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2  =  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) * X(13) * X(14) * X(15) - 1  =  0.
The first equation above comes from Schittkowski [8, p. 187].  The second equation above is a part of the Brown almost linear function [1, p. 660].


0 DEFDBL A-Z
3 DEFINT J, K, X

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 15


        94 A(KK) = -1 + FIX(RND * 4)


    95 NEXT KK

    128 FOR I = 1 TO 200000 STEP 1

        129 FOR K = 1 TO 15

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 15)
            182 IF RND < .5 THEN 183 ELSE GOTO 189


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



            186 X(B) = A(B) + (RND ^ 3) * R


            187 REM 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))
            188 GOTO 191

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        191 NEXT IPP
        195 REM

        222 N1 = 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) * X(15) - 1


        246 N5 = -(X(1) ^ 2 + X(2) ^ 2 + X(3) ^ 2 + X(4) ^ 2 + X(5) ^ 2 + X(6) ^ 2 + X(7) ^ 2 + X(8) ^ 2) * (X(1) ^ 4 + X(2) ^ 4 + X(3) ^ 4 + X(4) ^ 4 + X(5) ^ 4 + X(6) ^ 4 + X(7) ^ 4 + X(8) ^ 4) + (X(1) ^ 3 + X(2) ^ 3 + X(3) ^ 3 + X(4) ^ 3 + X(5) ^ 3 + X(6) ^ 3 + X(7) ^ 3 + X(8) ^ 3) ^ 2

        255 REM


        277 P = -ABS(N5) - ABS(N1)


        1451 IF P <= M THEN 1670
        1657 FOR KEW = 1 TO 15
            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < -.1 THEN 1999

    1911 REM

    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), M, JJJJ

1999 NEXT JJJJ

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

-1      -1      -1      -1      -1
-1      -1      -1      1      1
-1      1      -1      1      1
0      -31865

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 [9], the wall-clock time for obtaining the output through JJJJ= -31865 was 5 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] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[6] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[7] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

[8]  K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer, 1987.

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

[10] Wolfram Research, Inc., Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[11] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

[12] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition.  http://myblogsubstance.typepad.com/substance/2015/10/

Sunday, September 4, 2016

How To Solve in Integers Nonlinear Systems of Simultaneous Equations, Including Exponential Diophantine Equations

Jsun Yui Wong

Based on the computer program in [11], the computer program listed below seeks to solve in integers the following system of thirteen equations, including two exponential Diophantine equations from Table 1 of Perez et al. [7], 5 ^ (X(1)) + 5 ^ (X(2)) - 3 ^ (X(3)) - 7 ^ (X(4)) = 0 and   5 ^ (X(1)) + 5 ^ (X(2)) + 7 ^ (X(3)) - 17 ^ (X(4)) = 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)*X(13)*X(14)*X(15) - 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)+X(15) - 16 = 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)+X(15) - 16 = 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)+X(15) - 16=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)+X(15) - 16=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)+X(15) - 16=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)+X(15) - 16=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) +X(15) - 16=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)+X(15) - 16=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)+X(15) - 16 = 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)+X(13)+2*X(14)+X(15) - 16 = 0
 5 ^ (X(1)) + 5 ^ (X(2)) - 3 ^ (X(3)) - 7 ^ (X(4)) = 0
 5 ^ (X(1)) + 5 ^ (X(2)) + 7 ^ (X(3)) - 17 ^ (X(4)) = 0.


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 15

        94 A(KK) = FIX(RND * 5)


    95 NEXT KK

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

            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)

            181 B = 1 + FIX(RND * 15)

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

            187 REM 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))

            189 IF RND < .5 THEN X(B) = A(B) - 1 ELSE X(B) = A(B) + 1

        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) - X(15) + 16##

        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) + X(15) - 16##

        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) + X(15) - 16##

        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) + X(15) - 16##

        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) + X(15) - 16##
        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) + X(15) - 16##
        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) + X(15) - 16##

        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) + X(15) - 16##

        236 REM 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) + X(15) - 16##

        238 REM 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) + X(15) - 16##

        240 REM 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) + X(15) - 16##

        242 REM  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) + X(15) - 16##


        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) + X(15) - 16##


        245 NS = 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) + 2## * X(14) + X(15) - 16##


        246 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) * X(15) - 1##

        255 NNEW1 = 5 ^ (X(1)) + 5 ^ (X(2)) - 3 ^ (X(3)) - 7 ^ (X(4))

        256 NNEW2 = 5 ^ (X(1)) + 5 ^ (X(2)) + 7 ^ (X(3)) - 17 ^ (X(4))

        258 REM

        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) - ABS(NS) - ABS(NNEW1) - ABS(NNEW2)


        1451 IF P <= M THEN 1670
        1657 FOR KEW = 1 TO 15
            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P
    1670 NEXT I
    1888 IF M < -.3 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), M, JJJJ

1999 NEXT JJJJ

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

1      1      1      1      1
1      1      1      1      1
1      1      1      1      1
0      -31928

1      1      1      1      1
1      1      1      1      1
1      1      1      1      1
0      -31890

1      1      1      1      1
1      1      1      1      1
1      1      1      1      1
0      -31875

1      1      1      1      1
1      1      1      1      1
1      1      1      1      1
0      -31791

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 [8], the wall-clock time for obtaining the output through JJJJ= -31791 was two minutes.      

Acknowledgment

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

References

[1] Jean-Marie de Konnick, Armel Mercier, 1001 Problems in Classical Number Theory.  American Mathematical Society, Providence, Rhode Island, 2007.

[2] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[6] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[7] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

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

[9] Wolfram Research, Inc., Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[10] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

[11] Jsun Yui Wong (2015, October 26). Testing the Domino Method of General Integer Nonlinear Programming with Brown’s Almost Linear System of Fifteen Equations, Second Edition.  http://myblogsubstance.typepad.com/substance/2015/10/testing-the-domino-method-of-general-integer-nonlinear-programming.  

Friday, September 2, 2016

How To Solve in Integers Nonlinear Systems of Simultaneous Equations

Jsun Yui Wong

The computer program listed below seeks to solve in integers the following system of nonlinear equations:

3 z =x ^ 2 - 2 x y

2 t  =   x ^ 3 + 96 * z ^ 2 - 1

(x - 2y) ^ 2 - 3x = 18.

The system above is based on a system in [9, of the section on "Systems with More Than One Equation"].


0 REM DEFDBL A-Z

2 DEFINT J

3 DIM N(32999), A(32999), H(32999), L(32999), U(32999), X(32999), D(32999), P(32999), PS(32999), J(32999)

12 FOR JJJJ = -32000 TO 32000



    15 RANDOMIZE JJJJ

    16 M = -1D+37

    41 FOR J44 = 1 TO 4


        42 A(J44) = -50 + FIX(RND * 111)


    43 NEXT J44
    128 FOR I = 1 TO 300


        129 FOR KKQQ = 1 TO 4


            130 X(KKQQ) = A(KKQQ)
        131 NEXT KKQQ
        133 FOR IPP = 1 TO (1 + FIX(RND * 3))

            181 J = 1 + FIX(RND * 4)

            182 IF RND < .5 THEN 183 ELSE GOTO 191


            183 R = (1 - RND * 2) * A(J)


            189 X(J) = A(J) + FIX(RND * R)

            190 GOTO 192


            191 IF RND < .5 THEN X(J) = A(J) - 1 ELSE X(J) = A(J) + 1


        192 NEXT IPP


        441 P(12500) = -ABS(3 * X(3) - X(1) ^ 2 + 2 * X(1) * X(2))



        443 PNEW(4) = -ABS(2 * X(4) - X(1) ^ 3 - 96 * X(3) ^ 2 + 1)



        448 PNEWzz(4) = -ABS((X(1) - 2 * X(2)) ^ 2 - 3 * X(1) - 18)



        452 IF PNEW(4) < 0 THEN PNEW(4) = PNEW(4) ELSE PNEW(4) = 0

        455 IF PNEWzz(4) < 0 THEN PNEWzz(4) = PNEWzz(4) ELSE PNEWzz(4) = 0

        459 IF P(12500) < 0 THEN P(12500) = P(12500) ELSE P(12500) = 0

        597 P = P(12500) + (PNEW(4)) + PNEWzz(4)


        1111 IF P <= M THEN 1670
        1452 M = P
        1454 FOR KLX = 1 TO 4


            1455 A(KLX) = X(KLX)
        1456 NEXT KLX
        1557 GOTO 128
    1670 NEXT I

    1889 IF M < 0 THEN 1999

    1947 PRINT A(1), A(2), A(3), A(4), M, JJJJ

1999 NEXT JJJJ

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

-3      0      3      418       0  
-30527

-3      0      3      418       0  
-27402

-3      0      3      418       0  
-26082

-3      0      3      418       0  
-19939

-3      -3      -3      418       0  
-19761

-3      0      3      418       0  
-16701

-3      -3      -3      418       0  
-15554

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 [8], the wall-clock time for obtaining the output through
JJJJ= -15554 was forty seconds.      

Acknowledgment

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

References

[1] Jean-Marie de Konnick, Armel Mercier, 1001 Problems in Classical Number Theory.  American Mathematical Society, Providence, Rhode Island, 2007.

[2] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

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

[6] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[7] O. Perez, I. Amaya, R. Correa (2013), Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm. Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.

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

[9] WOLFRAM, Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[10] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.