Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Weird NMinimize behaviour

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97584] Re: [mg97556] Re: [mg97518] Weird NMinimize behaviour
  • From: Filippo Miatto <miatto at gmail.com>
  • Date: Mon, 16 Mar 2009 04:23:59 -0500 (EST)
  • References: <200903142313.SAA25117@smc.vnet.net> <op.uqs5f8y1tgfoz2@bobbys-imac.local> <200903151027.FAA05309@smc.vnet.net> <43791.140.177.205.91.1237132264.squirrel@webmail.wolfram.com>

Uhm.. we all get slightly different results..
I think that i'll tweak the options of the various methods of  
nminimize/nmaximize and see what happens.
Thank you all for your help, I'm more relaxed now that i know that  
different results can occour.
I was worried that it could be a bug..!
Filippo


On Mar 15, 2009, at 4:51 PM, danl at wolfram.com wrote:

>> woops sorry i didn't see that!
>>
>> F2[n1_,k1_,n2_,k2_]:=(-1)^(n1+k1+n2+k2)/(360 \[Pi]^4) (8 \[Pi]^4-60 \
>> [Pi]^2 Mod[-Subscript[z, k1]+Subscript[z, n1]-Subscript[z,
>> k2]+Subscript[z, n2],2 \[Pi]]^2+60 \[Pi] Mod[-Subscript[z,
>> k1]+Subscript[z, n1]-Subscript[z, k2]+Subscript[z, n2],2 \[Pi]]^3-15
>> Mod[-Subscript[z, k1]+Subscript[z, n1]-Subscript[z, k2]+Subscript[z,
>> n2],2 \[Pi]]^4)
>>
>> R2[s_]:=(1-1/\[Pi] Sum[(-1)^(n1+1) Subscript[z, n1],{n1,1,2s-1}])^4
>>
>> j[s_]:=Sum[F2[n1,k1,n2,k2],{n1,0,2s-1},{k1,0,2s-1},{n2,0,2s-1},
>> {k2,0,2s-1}]+R2[s]
>>
>> there is also the condition Subscript[z, 0]=0
>>
>> For example if I try:
>>
>> NMaximize[{1/j[4],0<Subscript[z, 1]<Subscript[z, 2]<Subscript[z,
>> 3]<Subscript[z, 4]<Subscript[z, 5]<Subscript[z, 6]<Subscript[z, 7]<2\
>> [Pi]},{Subscript[z, 1],Subscript[z, 2],Subscript[z, 3],Subscript[z,
>> 4],Subscript[z, 5],Subscript[z, 6],Subscript[z, 7]}]
>>
>> I get a result of 23.517 on the mac and a result <23 on windows,
>> although everything is the same. Now i don't know if the result of my
>> mac is correct (since the one of windows isn't, and actually the
>> values should be linear with respect to s, and 23.517 is a little too
>> low) and i'm sure i can't rely on the win machine to go up and
>> maximize 1/j[s] for high values of s.
>> if i could understand the reason of this discrepancy i could possibly
>> fix things, either in the form of the equations or in the parameters
>> of NMaximize (or NMinimize).
>> Thank you
>> Filippo
>
> Probably just easy to get stuck in a local min. Offhand I don't know  
> why
> the same version might give different results on different  
> platforms. I
> will speculate it could have to do with small differences in a local
> optimization post-processing phase. But that's just a (wild) guess.
>
> Here is something that takes a bit of time but seems to give a viable
> result. Notice I opted to minimize j[4] rather than maximize its
> reciprocal. Taking reciprocal gives 23.2092.
>
> In[47]:= NMinimize[{j[4] /. Subscript[z, 0] -> 0,
>  0 <= Subscript[z, 1] <= Subscript[z, 2] <= Subscript[z, 3] <=
>   Subscript[z, 4] <= Subscript[z, 5] <= Subscript[z, 6] <=
>   Subscript[z, 7] <= 2 \[Pi]}, {Subscript[z, 1], Subscript[z, 2],
>  Subscript[z, 3], Subscript[z, 4], Subscript[z, 5], Subscript[z, 6],
>  Subscript[z, 7]},
> Method -> {"DifferentialEvolution", "SearchPoints" -> 80,
>   "Tolerance" -> 0.00001}, MaxIterations -> 200]
>
> Out[47]= {0.0430864, {Subscript[z, 1] -> 0.36521,
>  Subscript[z, 2] -> 1.73521, Subscript[z, 3] -> 2.26132,
>  Subscript[z, 4] -> 3.87167, Subscript[z, 5] -> 4.29522,
>  Subscript[z, 6] -> 4.91713, Subscript[z, 7] -> 5.95384}}
>
>
> Daniel Lichtblau
> Wolfram Research
>
>
>



  • Prev by Date: Using Mathematica notebooks in presentations?
  • Next by Date: Re: Comparing Corresponding Columns of Two Matrices
  • Previous by thread: Re: Weird NMinimize behaviour
  • Next by thread: Re: Re: Weird NMinimize behaviour