[Date Index]
[Thread Index]
[Author Index]
Vandermonde Matrix/Optimization question
*To*: mathgroup at smc.vnet.net
*Subject*: [mg71336] Vandermonde Matrix/Optimization question
*From*: scottmacd123 at gmail.com
*Date*: Wed, 15 Nov 2006 06:43:43 -0500 (EST)
Hello all,
I am trying to find the numerical values of x[i] variables that
maximize the determinant of a Vandermonde matrix. For small N x N
matrices where N <= 7, Mathematica has no problem doing this
calculuation. Indeed:
VandermondMatrix[n_]:=Table[x[i]^j,{i,1,n},{j,1,n}]
vars[n_] := Table[x[i], {i, 1, n}]
cons[n_] := Table[-1 â?¤ x[i] â?¤ 1, {i, 1, n}]
NMaximize[{Det[VandermondMatrix[4], cons[4]}, vars[4], Method ->
{"NelderMead","RandomSeed"->100}]
gives:
{0.366453, {x[1] -> 1., x[2] -> -1., x[3] -> 0.654654, x[4] ->
-0.654654}}
I want to do this same calculation for larger N, say N=100. Clearly the
code I have above will fail because I am asking Mathematica to
calculate the determinant of a 100x100 matrix symbolically, which is
not feasible. Obviously the determinant must be evaluated numerically.
I have searched this group and found others with similar problems but
so far I have not been able to come up with a solution.
I think what I want to do is something like the following,
1. Define a function that tests if lists are numeric:
num[c_List]:=And @@ (NumericQ /@ c)
(I don't fully understand this line, I found it in a post in this
group)
2. Define a function f that takes as arguments the dimension of the
Matrix and a list of variables
f[n_?NumericQ, x_List?num]:=Det[VandermondMatrix[n]]
3. Call NMaximize on f
While the above does not work, I hope it is clear what I want to do:
have NMaximize fill in numerical values for the x[i] variables before
calling Det[].
Thank you in advance for any help/suggestions.
Scott MacDonald
PS: $Version returns 5.2 for Mac OS X
Prev by Date:
**Re: List difference using patterns and substitutions.**
Next by Date:
**Re: Arithmetic Puzzle (so simple it's hard)**
Previous by thread:
**Re: FindInstance returning incorrect results**
Next by thread:
**Re: Vandermonde Matrix/Optimization question**
| |