Re: [Algorithms] decompose onto non-orthogonal vectors
Brought to you by:
vexxed72
From: <ro...@do...> - 2000-07-16 15:08:13
|
I wrote: >Peter Dimov wrote: > >>> >This works for any number of dimensions. Whenever a solution exists, the >>(u, >>> >v) pair determined by this approach will have the property u * a + v * b >>= >>> >p. (Easy to prove.) >>> >>> Agree that it works for any number of dimensions provided that p does >>> indeed lie in the plane of a and b. My point was that it will not >>> detect the case that p does not lie in that plane, that is, will not >>> detect the case that no solution exisits. >> >>Hmm, it must be my English. :) >> >>1. Find the (u, v) pair as above. >>2. Check whether u * a + v * b = p. >>3. If yes, this (u, v) pair is the solution. >>4. If no, no solution exists. >> > >OK, you've stated a more complete algorithm now, and I agree that it >works. > >In any case, as I stated previously, I think your solution is the best >and have long used it myself. The Gaussian elimination approach, >however, is based more directly on the most basic and fundamental >concepts of linear algebra, which is why I stressed it.. The dot >product approach is based on somewhat more advanced ideas. > And further, it appears to me that if you don't already know that p is a linear combination of a and b, then the Gaussian elimination solution is somewhat shorter than your algorithm above. |