Prev: QuickFactorInteger
Next: plotting many curves
From: Ray Koopman on 13 Mar 2010 07:58 If you're willing to accept numeric solutions then try solving for the distances instead of the coordinates. If dd is the matrix of squared distances, and h = IdentityMatrix[n]-1/n, then -.5(h.dd.h) should have 3 positive and n-3 approximate-zero eigenvalues. Sort the eigenvalues, drop the last 3, minimize the sum of the absolute values of the rest with respect to the unknown distances. Constraints, such as some distances being known multiples of others, are easy to impose. To get the coordinates (with the origin at the centroid of the configuration), multiply the unit-length eigenvectors corresponding to the nonzero eigenvalues by the square roots of their eigenvalues. On Mar 12, 4:15 am, Robert Hoy <robert....(a)yale.edu> wrote: > Hello - sorry for the extremely belated reply. Daniel, your method > worked, of course - thanks. > > What I ended up going with was a numerical solver that makes initial > guesses (with some randomnness) as to the values of the {x, y, z}, and > then uses Newton iterations to try and solve them. If it doesn't work > after a number of iterations (which I set), it makes another initial > guess. The code uses LU decomposition and a number of standard > tricks. One thing I thought worth mentioning is, the method does not > employ complex numbers, and I don't see why complex numbers would be > needed. So, bringing things back to Mathematica, three questions: > > 1) Is there a way to restrict the Mathematica solver to work only in > real space? > > 2) A problem with solving these sets of equations in Mathematica is > its use of Grobner bases; solutions slow drastically as the number of > variables (3N) exceeds 21 (N = 7). Does Mathematica have a special > solver for quadratic forms (my equations are all quadratic forms) > which uses something other than Grobner bases? > > 3) To be clear, though I am solving equations in 3N variables, the > solutions 'live in' 3-dimensional Cartesian space (R^3). Is there > some command to tell Mathematica to look for solutions only in R^3? > > The reason I ask is, the numerical solver I'm using also starts to > break as N becomes 'large' (how large 'large' is can be increased by > using tricks, but only up to a point), but I guess Mathematica might > include some special routines for dealing with this problem (which is, > after all, just solving real quadratic forms). > > Thanks, > Robert Hoy
|
Pages: 1 Prev: QuickFactorInteger Next: plotting many curves |