An easy one:

Let

Find the minimum of the function:

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

CB

Results 1 to 15 of 19

- November 12th 2008, 03:56 AM #1

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- November 21st 2008, 02:40 AM #2

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- November 21st 2008, 11:04 PM #3

- Joined
- Nov 2008
- Posts
- 82

hey mate,

without going into two much detail, I believe the solution lies between the intersection of |x - 2| = |x - 2^16| which over the region of intersection becomes

x - 2 = 2^16 - x

x = 2^15 + 1

am I completely off the mark? if not please let me know and I will post my full solution,

Cheers,

David

- November 21st 2008, 11:43 PM #4

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- November 22nd 2008, 12:09 AM #5

- Joined
- Nov 2008
- Posts
- 82

- November 22nd 2008, 12:22 AM #6

- Joined
- May 2008
- Posts
- 2,295
- Thanks
- 7

- November 22nd 2008, 01:44 AM #7

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- November 22nd 2008, 02:46 AM #8

- Joined
- Nov 2008
- Posts
- 82

- November 23rd 2008, 11:26 AM #9

- Joined
- Nov 2008
- From
- France
- Posts
- 1,458

- November 23rd 2008, 01:47 PM #10

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- December 1st 2008, 09:50 AM #11

- Joined
- Nov 2008
- Posts
- 3

|x-2^i|, where i is a constant, is a continuous function. So, the sum of |x-2^i|, i = 1 to 16, is a continuous function, too.

As a continuous function, its minimum/maximum is at at its derivative is 0, or where its derivative has a discontinuity from prositive to negative or vice-versa.

If x-2^i >= 0 (this means x >= 2^i), then |x-2^i| = x-2^i

If x-2^i < 0 (this means x < 2^i), then |x-2^i| = 2^i-x.

We can divide the x values in 18 parts.

Part 1: x <2^1:

f(x) = sum of (2^i-x), i = 1 to 16 = something - 16*x .This is a line with derivative -16.

part 2: 2^1 <= x < 2^2:

f(x) = x-2^1 + sum of (2^1-x), i = 2 to 16 = something - 14*x. This is a line with derivative -14.

and so on, till part 9: 2^8 <= x < 2^9:

f(x) = (sum of (x-2^i), i = 1 to 8) + (sum of (2^i-x), i = 9 to 16) = something (no dependence on x). This is a line with derivative 0.

part 10: 2^9 <= x < 2^10:

f(x) = (sum of (x-2^i), i = 1 to 9) + (sim of (2^i-x), i = 10 to 16) = something + 2*x. This is a line with derivative 2.

From part 10 on, the line segments have positive derivative. This means that the minimum of the function is at part 9, and its value at this part is:

(sum of 2^i, i = 9 to 16) - (sum of 2^i, i = 1 to 8) = 130560 - 510 = 130050

- December 5th 2008, 12:22 AM #12

- Joined
- Nov 2005
- From
- someplace
- Posts
- 14,972
- Thanks
- 4

- December 5th 2008, 09:09 AM #13

- Joined
- Nov 2008
- Posts
- 58
- Thanks
- 1

Here's my attempt:

f(x) measures the distance of x to 16 points, namely 2, 4, 8, 16, ... , 2^16.

Suppose we let x to be less than 2. Then we can decrease f(x) by increasing x towards 2 since this decreases the distance of x to all 16 points.

So what happens when we increase x pass 2? We're getting further away from a single point, ie 2, but at the same time, we are decreasing our distance to 15 points. The net effect is a decrease in f(x).

The key observation here is that if we change x by a fix amount, the change in the distance is the same for all points(some are positive change, while others are negative, but the absolute value is the same).

This implies that we should keep increasing x to decrease f(x) as long as we are decreasing the distance to more points than the number of points that we are getting further away.

Following this logic, we arrive at the answer that f(x) is minimum between the region 2^8 and 2^9, which has 8 points less than it and 8 points more.

- January 1st 2009, 06:30 PM #14

- Joined
- Jun 2008
- From
- Plymouth
- Posts
- 120
- Thanks
- 5

Okay. The derivative of |x-a| is:

1 if x-a>0

0 if x=0

-1 if x-a<0

Since we have a sum we the derivative of f(x) is the sum of the derivatives of the modulus:f'(x)=

If f'(x) is to be 0 we can't have some of the elements to be zero because then all the other elements can't be zero. We will have 15 elements that can be 1 or -1 and one which is 0 and their sum cannot be 0.

Suppose we have a number i=n such as for i>n . This is easy enough to prove . We will also have for i<=n since there can't be a zero term. From f'(x)=0 we can conclude that n=8 (8 times 1 and 8 times -1=0).

So for n>8

and

for n<=8

All that is left is to prove that this is a minimum but I'll leave that to you.

Don't know if someone has suggested this. I didn't read all the posts.

- March 12th 2009, 02:03 AM #15
In order to have an idea about how we can solve the problem let’s consider the minimum of this function…

(1)

… which is represented [in blue] here…

http://digilander.libero.it/luposabatini/MHF1.bmp

The (1) is in fact a ‘straight-line function’ the slope of which changes in and . More exactly, the function starts with negative slope , in becames ‘flat’ [ , and for the slope is positive [ ]. The ‘minimum’ of (1) in fact is not rescticted to a single point, but in extended to the interval , where is . In similar way we can ‘attach’ the proposed problem, i.e. finding the minimum of…

(2)

As the (1), the (2) is also ‘straight-line’ . In is…

The functions starts with negative slope and each time that the slope is increased by . So we have…

So the functions become ‘flat’ in the interval and here exhibits its ‘minimum’ which is [if no mistakes of mine…] …

Regards