An interesting Vector Math Problem
Posted: Sun Jun 01, 2008 10:12 pm
You are given n vectors in 3D: a1, a2 ... an. The task is to find a unit vector d, for which the value of following expression is maximum:
|a1 x d| + |a2 x d| + ... + |an x d|.
Here,
1. all the vectors are in 3 dimension.
2. d is a unit vector.
3. a1 x d means the cross product of a1 and d.
4. |a1 x d| means the magtitute of a1 x d.
/* In an alternate way, you can think of the problem as- finding a line in 3D for which the sum of distances from n points is maximum */
|a1 x d| + |a2 x d| + ... + |an x d|.
Here,
1. all the vectors are in 3 dimension.
2. d is a unit vector.
3. a1 x d means the cross product of a1 and d.
4. |a1 x d| means the magtitute of a1 x d.
/* In an alternate way, you can think of the problem as- finding a line in 3D for which the sum of distances from n points is maximum */