Proving the Minimum of a Summation: Solving for f(x) with n Odd and Even Cases

  • Thread starter Thread starter holezch
  • Start date Start date
  • Tags Tags
    Minimum
Click For Summary

Homework Help Overview

The discussion revolves around the function f(x) defined as the summation of absolute differences from a set of ordered points a_i, specifically focusing on determining the minimum value of this function for both odd and even cases of n.

Discussion Character

  • Conceptual clarification, Assumption checking, Mixed

Approaches and Questions Raised

  • Participants explore the conditions under which the minimum of f(x) occurs, with one suggesting that for odd n, the minimum is at a_(n+1)/2, while another references the book's claim of a_(n-1)/2. There are attempts to validate these claims through specific examples and reasoning about the behavior of the function in both odd and even cases.

Discussion Status

There is an ongoing examination of the definitions and assumptions related to the minimum of f(x). Some participants have raised questions about the correctness of the stated minimums and are seeking clarification on the implications of different values of n. The discussion reflects a mix of agreement and differing interpretations, particularly regarding the behavior of the function at critical points.

Contextual Notes

Participants are navigating potential discrepancies between their findings and textbook definitions, with some expressing uncertainty about the implications of their proofs and the conditions under which the minimum occurs. There is also a mention of the derivative of f(x) and its implications for determining the minimum.

holezch
Messages
251
Reaction score
0

Homework Statement


of f(x) = \sum | x - a_i |
( i = 1 to n )

where
a_1 < a_2 < ... < a_n

The Attempt at a Solution


I believe I have proven that if n is odd then the minimum is as ceiling a_(n/2) or a_(n+1)/2. The book says a_(n-1)/2 though, but I think it's wrong.. if you actually tried an example , f( a_(n+1)/2 ) < f ( a_(n-1)/2 ). take n = 5 and a_i's = 1,2,3,4,5 for example
Also, for my even case, I have that the minimum occurs at both a_n/2 and a_n/2 + 1. Roughly speaking, if you introduce a new point that's a_mid( a_n/2 , a_n/2 + 1 ) then we have an odd case and the minimum as I've shown before will be the most middle point, a_mid( a_n/2 , a_n/2 + 1 ) .. et c I'm fairly sure that I have it right so I'm not too concerned about it ( although I think the proof might be a bit twisted or long ) I'm just concerned about the difference of answers up there, any ideas? thanks
 
Last edited:
Physics news on Phys.org
holezch said:

Homework Statement





of f(x) = \sum | x - a_i |
( i = 1 to n )

where
a_1 < a_2 < ... < a_n

The Attempt at a Solution


I believe I have proven that if n is odd then the minimum is as ceiling(n/2) or (n+1)/2. The book says (n-1)/2 though, but I think it's wrong.. if you actually tried an example , f( (n+1)/2 ) < f ((n-1)/2 ). take n = 5 and a_i's = 1,2,3,4,5 for example
Also, for my even case, I have that the minimum occurs at both n/2 and n/2 + 1. Roughly speaking, if you introduce a new point that's mid( n/2 , n/2 + 1 ) then we have an odd case and the minimum as I've shown before will be the most middle point, mid( n/2 , n/2 + 1 ) .. et c I'm fairly sure that I have it right so I'm not too concerned about it ( although I think the proof might be a bit twisted or long ) I'm just concerned about the difference of answers up there, any ideas? thanks

Are you sure you've stated that correctly? If n=2 then the minimum of f(x) is |a_1-a_2| isn't it? It has that value for any x in [a_1,a_2]. Why would it be a function only of n?
 
oops, I wrote my answer incorrectly, the minimum is a_n+1/2 .. etc all the n's I wrote above are are a_n's
sorry I will edit it
so if n = 2 then f ( a_1 ) = f ( a_(n/2) ) = f ( a_( n/2 + 1 ) ) = f ( a_ 2 ) are the minimums
 
holezch said:
oops, I wrote my answer incorrectly, the minimum is a_n+1/2 .. etc all the n's I wrote above are are a_n's
sorry I will edit it
so if n = 2 then f ( a_1 ) = f ( a_(n/2) ) = f ( a_( n/2 + 1 ) ) = f ( a_ 2 ) are the minimums

Look the derivative of f(x) (it's only defined for x not one of the a_i, but that's not really a problem, you can tell me how to work around that). The derivative of |x-a_i| is +1 if x>a_i and -1 if x<a_i. That means that that derivative of f(x) in the even case is zero as long as you have an equal number of a_i above and below x. In the odd case, sure, I think the minimum for n=5 must be at a_3. Which makes it a_{(n+1)/2}.
 
Last edited:

Similar threads

Replies
8
Views
3K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 34 ·
2
Replies
34
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 51 ·
2
Replies
51
Views
5K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K