Use median, it solves the problem I think.
Thanks,
Sathaiah
On Thu, Jun 24, 2010 at 12:21 AM, Dave wrote:
> Let the given points be x_i, i = 1, 2, ..., n. For any point x on the
> line, let
> f(x) = sum_{i=1}^n | x - x_i |.
> Then, from calculus, we know that f(x) attains its extreme point at a
Let the given points be x_i, i = 1, 2, ..., n. For any point x on the
line, let
f(x) = sum_{i=1}^n | x - x_i |.
Then, from calculus, we know that f(x) attains its extreme point at a
point where its derivative is zero or undefined. Because of the
absolute value signs, the derivative is undefined at