Re: [algogeeks] Re: Where to Set the POST-OFFICE

2010-06-24 Thread Sathaiah Dontula
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

[algogeeks] Re: Where to Set the POST-OFFICE

2010-06-23 Thread Dave
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