       Maximizing a function that depends on a list of length M grows as 3^M

• To: mathgroup at smc.vnet.net
• Subject: [mg52629] Maximizing a function that depends on a list of length M grows as 3^M
• From: Gail Gong <gailgong at dcn.davis.ca.us>
• Date: Sun, 5 Dec 2004 02:08:05 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Here is my question briefly: I have a function in two variables that I
want to maximize.The function depends on M markers.The calculation time
for the function grows linearly as M grows.The number of iterations
required for FindMaximum is constant.The calculation time of FindMaximum
grows as a whopping 3^M. Since I need M to be over 200, my calculation
of FindMaximum would require over 10^83 days. Why does FindMaximum grow
as 3^M.

Let my function be defined by
fFn[z_,r_,aListOfLengthM]:=Block[...

I use the following call to FindMaximum.  Since I am using {z,.3444,
.3445} and {r,.0581,.0582}, I understand that the maximization routine
is not taking derivatives.

n=0;iters={{0,z=.3444,r=.0581,fFn[z,r,aListOfLengthM]}};
workOne=Timing[FindMaximum[
fFn[z,r,aListOfLengthM],{z,.3444, .3445},{r,.0581,.0582},
StepMonitor :>AppendTo[iters,{++n,z,r,fFn[z,r,aListOfLengthM]}]]];

Thanks for any help anyone can offer. I can send a more verbose
description if that would help.

Gail Gong

```

• Prev by Date: Re: Solve given that a variable is between 0 and 1
• Next by Date: Re: Table Iterators
• Previous by thread: Compile with ReplaceList
• Next by thread: Re: A problem of numerical precision