SIAM 2002 challenge #4

4. What is the global minimum of the function

      exp(sin(50x)) + sin(60ey) + sin(70 sin(x)) +
      + sin(sin(80y)) - sin(10(x + y)) + ¼ (x² + y²) ?

This solution was supplied by Marijke van Gans in HTML form

glØb.ub UBasic program

This program lets the user zoom and pan a color coded map of the function value. Object of the exercise is to spot the deepest well.

glØb.ub key assignment:

PgUp/Dn zoom in/out by factor 2
arrow keys pan by 100 pixels
Home resets
End quits (then enter F4 or similar for text screen)

glØb.ub screenshots:

Legend: red < yellow < green < cyan < light blue < dark blue < purple < black. Color cutoffs were chosen so that yellow (below -2.56+1/e) can only occur within 2.4 radius of the origin, and red (below -3.64+1/e) only with 1.2 radius (rationale: the minimum of each of the four sines is -1, that of exp(sin(...)) is 1/e, but ¼(x²+y²) adds at least 1.44 or 0.36 respectively, outside these radii).


fig. a: we zoomed out once with PgDn for an overview of the whole basin,
coördinates -6.4...+6.4 × -4.8...+4.8


fig. b: we zoomed back in with PgUp, if there is any yellow
it's inside this view: -3.2...+3.2 × -2.4...+2.4


fig. c: we zoomed in more with PgUp, if there is any red
it's inside this view: -1.6...+1.6 × -1.2...+1.2


fig. d: we zoomed in again with PgUp
-0.8...+0.8 × -0.6...+0.6


fig. e: we zoomed in with PgUp and recentered with up arrow key:
-0.4...+0.4 × -0.175...+0.425

Similar peregrinations visiting the other yellow blobs revealed no more red. From here on, glob.ub takes over to find the deepest point of our chosen dip.

glØb.ub listing:

   10   InvE=1/#e
   12   Cut1_2=-3.64+InvE
   14   Cut2_4=-2.56+InvE
   20   screen 23
   25   D=0.01
   26   Ox=0
   27   Oy=0
   55   K="":cls
  100   Y=(Oy+239.5)*D
  108   for PiY%=0 to 479
  150   V=sin(60*exp(Y))+sin(sin(80*Y))+0.25*Y^2
  200   X=(Ox-319.5)*D
  208   for PiX%=0 to 639
  250   F=V+exp(sin(50*X))+sin(70*sin(X))+0.25*X^2-sin(10*(X+Y))
  300   if F<Cut1_2 then C%=12 '     bright red
  310   :elseif F<Cut2_4 then C%=14 'yellow
  320   :elseif F<-1 then C%=10 '    bright green
  330   :elseif F<0 then C%=11 '     bright cyan
  340   :elseif F<1 then C%=9 '      bright blue
  350   :elseif F<2 then C%=1 '      dark blue
  360   :elseif F<3 then C%=5 '      purple
  390   :else C%=0 '                 black
  500   pset (PiX%,PiY%),C%
  800   X+=D
  808   next PiX%
  900   Y-=D
  908   next PiY%
 1000   while not asc(K):K=inkey:wend
 1010   if K="K" then Ox-=100:goto 55
 1011   if K="M" then Ox+=100:goto 55
 1012   if K="H" then Oy+=100:goto 55
 1013   if K="P" then Oy-=100:goto 55
 1020   if K="I" then D/=2:Ox*=2:Oy*=2:goto 55
 1021   if K="Q" then D*=2:Ox/=2:Oy/=2:goto 55
 1030   if K="G" then goto 25
 1031   if K<>"O" then K="":goto 1000

glob.ub UBasic program

This program is not interactive, it finds the deepest point of the hardcoded well (several runs were made at increasing resolution, changing one line).

glob.ub listing:

   10   Xwest=-2/64
   20   Xeast=-1/64
   30   Ysout=13/64
   40   Ynort=14/64
   50   D=1/64
  100   X=Xwest:gosub 800:Uwest=U
  110   X=Xeast:gosub 800:Ueast=U
  120   Y=Ysout:gosub 900:Vsout=V:F_se=F
  130   Y=Ynort:gosub 900:Vnort=V:F_ne=F
  140   X=Xwest:U=Uwest:gosub 980:F_nw=F
  150   Y=Ysout:V=Vsout:gosub 980:F_sw=F
  190   '
  200   D/=2
  210   '
  300   Y=Ysout+D
  310   X=Xeast:U=Ueast:gosub 900:F_e=F
  320   X=Xwest:U=Uwest:gosub 980:F_w=F
  330   if F_se+F_sw<F_ne+F_nw then Ynort=Y:Vnort=V:F_ne=F_e:F_nw=F_w
  340                         :else Ysout=Y:Vsout=V:F_se=F_e:F_sw=F_w
  400   X=Xwest+D
  410   Y=Ynort:V=Vnort:gosub 800:F_n=F
  420   Y=Ysout:V=Vsout:gosub 980:F_s=F
  430   if F_nw+F_sw<F_ne+F_se then Xeast=X:Ueast=U:F_ne=F_n:F_se=F_s
  440                         :else Xwest=X:Uwest=U:F_nw=F_n:F_sw=F_s
  500   if D>0.000000001 goto 200
  510   print "Function value at corners of last cell:"
  520   print F_nw,F_ne
  530   print F_sw,F_se
  540   print "x range (";Xwest;",";Xeast;")"
  550   print "y range (";Ysout;",";Ynort;")"
  555   end
  800   U=exp(sin(50*X))+sin(70*sin(X))+0.25*X^2:goto 980
  900   V=sin(60*exp(Y))+sin(sin(80*Y))+0.25*Y^2
  980   F=U+V-sin(10*(X+Y)):return

glob.ub transcript:

With D > 0.001 in line 500:

run
Function value at corners of last cell:
-3.3063479887778130142  -3.303518906855208634
-3.3047499336956528579  -3.3020121143775488239
x range (-0.0244140625 ,-0.0234375 )
y range ( 0.2099609375 , 0.2109375 )
OK

two decimal places after the point are settled.

With D > 0.000001 in line 500 (three digits more)

run
Function value at corners of last cell:
-3.3068686434331134845  -3.3068686434465689096
-3.3068686466604037858  -3.3068686467609770888
x range (-0.0244035720825195312 ,-0.024402618408203125 )
y range ( 0.2106122970581054687 , 0.210613250732421875 )
OK

eight digits (six more) are settled.

With D > 0.000000001 in line 500 (another three digits)

run
Function value at corners of last cell:
-3.3068686474752356289  -3.3068686474752366288
-3.3068686474752339334 ,-3.3068686474752350164
x range (-0.0244030803442001342 ,-0.0244030794128775596 )
y range ( 0.2106124265119433403 , 0.2106124274432659149 )
OK

gives fourteen (again six more) in the outcome.

-3.30686864747523... is truncated, not rounded, but
-3.3068686474752 appears to be safe.

--marijke


See also Brian's solution

<back