Thread: Problem 50
View Single Post
  #9  
Old November 23rd, 2008, 01:26 PM
running-gag running-gag is offline
MHF Contributor
 
Join Date: Nov 2008
Posts: 1,135
Country:
Thanks: 39
Thanked 542 Times in 505 Posts
running-gag is a name known to allrunning-gag is a name known to allrunning-gag is a name known to allrunning-gag is a name known to allrunning-gag is a name known to allrunning-gag is a name known to all
Default

Quote:
Originally Posted by CaptainBlack View Post
An easy one:

Let x_i=2^i,\ i=1,.., 16

Find the minimum of the function:

f(x)=\sum_{i=1}^{16} |x-x_i|

(I had thought I had already posted this, did it disapear for a reason or am I just misremembering events )

CB
Hi,
By deriving f on each interval [2^j,2^{j+1}] we find
\frac{df}{dx}=2j-16
Therefore f is decreasing up to 2^8 (up to j=7) is constant between 2^8 and 2^9 (for j=8) and increasing from 2^9 (from j=9)
The minimum of f is reached between 2^8 and 2^9