Wednesday, October 7, 2015

Testing the Nonlinear Integer Programming Solver with the 7.4.4 Diophantine Equation in Weisstein

Jsun Yui Wong

The computer program listed below seeks to solve the following 7.4.4 Diophantine equation from Weisstein [15].

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

Weisstein [15]: "Guy (1994, p. 140) asked if a 7.4.4 equation exists."  See Guy [5].

The following computer program uses qb64v1000-win [13, 17].

0 DEFDBL A-Z
1 DEFINT I, K, A, X

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), PLHS(44), LB(22), UB(22), PX(44), J44(44), PN(22), NN(22)

88 FOR JJJJ = -32000 TO 32000 STEP .1


    89 RANDOMIZE JJJJ
    90 M = -3D+30
    111 FOR J44 = 1 TO 7

        112 A(J44) = 10 + (RND * 200)


    113 NEXT J44
    128 FOR I = 1 TO 15000

        129 FOR KKQQ = 1 TO 8


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

            140 B = 1 + FIX(RND * 7)


            150 R = (1 - RND * 2) * A(B)
            155 IF RND < .5 THEN 160 ELSE GOTO 167
            160 X(B) = (A(B) + RND ^ 3 * R)
            165 GOTO 168

            167 IF RND < .5 THEN X(B) = CINT(A(B) - 1) ELSE X(B) = CINT(A(B) + 1)
        168 NEXT IPP

        185 FOR J44 = 1 TO 7


            186 IF X(J44) > 155 THEN X(J44) = 50 + FIX(RND * 200)


            187 IF X(J44) < 1 THEN X(J44) = 1 + FIX(RND * 20)


        188 NEXT J44

        189 FOR JJ11 = 1 TO 7


            190 FOR JN = JJ11 + 1 TO 8


                191 IF X(JJ11) = X(JN) THEN 1670

            192 NEXT JN

        193 NEXT JJ11
        194 IF ((X(1) ^ 7# + X(2) ^ 7# + X(3) ^ 7# + X(4) ^ 7# - X(5) ^ 7# - X(6) ^ 7# - X(7) ^ 7#)) < 0 THEN 1670

        195 X(8) = ((X(1) ^ 7# + X(2) ^ 7# + X(3) ^ 7# + X(4) ^ 7# - X(5) ^ 7# - X(6) ^ 7# - X(7) ^ 7#)) ^ .1428571428571428571428571428571428571428##


        211 N(7) = X(8) ^ 7# - X(1) ^ 7# - X(2) ^ 7# - X(3) ^ 7# - X(4) ^ 7# + X(5) ^ 7# + X(6) ^ 7# + X(7) ^ 7#

        322 PD1 = -ABS(N(7))
        1111 IF PD1 <= M THEN 1670
        1452 M = PD1
        1454 FOR KLX = 1 TO 8


            1455 A(KLX) = X(KLX)

        1459 NEXT KLX

        1557 GOTO 128
    1670 NEXT I
    1889 IF M < -4990 THEN 1999


    1904 PRINT A(1), A(2), A(3), A(4)

    1905 PRINT A(5), A(6), A(7)

    1906 PRINT A(8), M, JJJJ

1999 NEXT JJJJ

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

15     140      9      113
66      144     30
16         -1785         -31707.60000000426

16       109       32      74
107        65         84
17          -4368        -31649.5000000051

129      90      15      146
10      123      149
14         0               -31586.80000000601    

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

The solution shown above at JJJJ=  -31586.80000000601 with M=0 is the same as one of the three solutions presented in Weisstein [15].

One notes that 149^7=1630436461403549.

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

Acknowledgment

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

References

[1] S. Abraham, S. Sanyal, M. Sanglikar (2013), Finding Numerical Solutions of Diophantine Equations Using Ant Colony Optimization. Applied Mathematics and Computation 219 (2013), pages 11376-11387.

[2] J. L. Brenner, Lorraine L. Foster (1982), Exponential Diophantine Equations. Pacific Journal of Mathematics, Volume 101, Number 2, 1982, Pages 263-301.

[3] Martin Gardner (1979), Mathematical Games. Scientific American, 241 (3), Page 25.

[4] Martin Gardner (1983), Diophantine Analysis and Fermat’s Last Theorem, Chapter 2 of Wheels, Life and Other Mathematical Amusements. New York, San Francisco: W. H. Freeman and Company (1983). http://www.labeee.ufsc.br/~luis/ga/Gardner.pdf

[5]  R. K. Guy, "Sums of Like Powers. Euler's Conjecture." §D1 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 139-144, 1994.

[6] L. J. Lander, T. R. Parkin (1966), Counterexample to Euler’s Conjecture on Sums of Like Powers. The Bulletin of American Mathematical Society, Vol. 72, 1966, page 1079.

[7] L. J. Lander, T. R. Parkin (1967), A Counterexample to Euler’s Sum of Powers Conjecture. Mathematics of Computation, Vol. 21, January 1967, pages 101-103.

[8] L. J. Lander, T. R. Parkin, J. L. Selfridge (1967), A Survey of Equal Sums of Like Powers. Mathematics of Computation, Vol. 21, July 1967, pages 446-459.

[9] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.

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

[11] Tito Piezas III, Euler Bricks and Quadruples. http://sites.google.com/site/tpiezas/0021

[12] W. Sierpinski, A Selection of Problems in the Theory of Numbers. New York: The McMillan Company, 1964.

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

[14] Michel Waldschmidt, Open Diophantine Problems. Moscow Mathematical Journal, Volume 4, Number 1, January-March 2004, Pages 245-305.

[15] Eric W. Weisstein. "Diophantine Equation--7th Powers."  From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/DiophantineEquation7thPowers.html

[16] Wikipedia, Euler's sum of powers conjecture. https://en.wikipedia.org/wiki/Euler%27s_sum_of_powers_conjecture

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

No comments:

Post a Comment