Jsun Yui Wong
Based on the computer program of the original edition [9], the computer program below seeks to solve simultaneously the system of three Diophantine equations taken from page 112 of Sierpinski [6]. His simultaneous equations are as follows:
X(1)^2 +X(2)^2 =X(4)^2
X(1)^2 +X(3)^2 =X(5)^2
X(2)^2 +X(3)^2 =X(6)^2
0 DEFDBL A-Z
1 DEFINT I,J,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
89 RANDOMIZE JJJJ
90 M=-3D+30
111 FOR J44=1 TO 6
112 A(J44)=50+ ( RND *1000)
113 NEXT J44
128 FOR I=1 TO 2000
129 FOR KKQQ=1 TO 6
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*6)
150 R=(1-RND*2)*A(B)
155 IF RND<.5 THEN 160 ELSE 167
160 X(B)=(A(B) +RND^3*R)
164 REM IF RND<.5 THEN X(B)=(A(B)-RND*10) ELSE X(B)=(A(B) +RND*10)
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 6
186 IF X(J44)<1 THEN 1670
187 NEXT J44
191 X(4)= ( +X(1)^2 +X(2)^2 ) ^(1#/2#)
192 X(5)= ( +X(1)^2 +X(3)^2 ) ^(1#/2#)
193 X(6)= ( +X(2)^2 +X(3)^2 ) ^(1#/2#)
194 N(7)= X(4)^2-X(1)^2 -X(2)^2
195 N(8)= X(5)^2-X(1)^2 -X(3)^2
196 N(9)= X(6)^2-X(2)^2 -X(3)^2
197 GOTO 322
201 FOR J44=7 TO 9
202 IF ABS(N(J44))>0 THEN PN(J44)=-1000000!*ABS(N(J44)) ELSE PN(J44)=0
203 NEXT J44
321 REM
322 PD1=-ABS(N(7))-ABS(N(8) )-ABS( N(9) )
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 6
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<0 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5),A(6),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS. The complete output through JJJJ=-26378 is shown below. What follows is a hand copy from the computer-monitor screen; immediately below there is no rounding by hand.
160 792 231 808 281
825 0 -31975
132 720 85 732 157
725 0 -29865
480 88 234 488 534
250 0 -29583
234 88 480 250 534
488 0 -29034
275 252 240 373 365
348 0 -28410
264 1440 170 1464 314
1450 0 -27202
117 240 44 267 125
244 0 -26378
The last solution shown above (117 240 44 267 125 244), the smallest Euler brick, was discovered by Paul Halcke in 1719, Wikipedia [8].
On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM, and the IBM basica/D interpreter, version GW BASIC 3.11, the wall-clock time for obtaining the output through JJJJ=-26378 was 30 minutes.
Acknowledgement
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] M. Gardner (1979), Mathematical Games. Scientific American, 241 (3), Page 25.
[4] 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.
[5] 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.
[6] W. Sierpinski, A Selection of Problems in the Theory of Numbers. New York: The McMillan Company, 1964.
[7] Michel Waldschmidt, Open Diophantine Problems. Moscow Mathematical Journal, Volume 4, Number 1, January-March 2004, Pages 245-305.
[8] Wikipedia, Euler Brick. http://en.wikipedia.org/wiki/Euler_brick.
[9] Jsun Yui Wong (2013, November 26), A Computer Program for Solving Systems of Diophantine Nonlinear Equations, Part 2. Retrieved from http://myblogsubstance.typepad.com/substance/2013/11/index.html.