Let's meet at a point

Geometry Level 3

Six children are standing along the x x -axis at points ( 0 , 0 ) (0,0) , ( 17 , 0 ) (17,0) , ( 40 , 0 ) (40,0) , ( 85 , 0 ) (85,0) , ( 173 , 0 ) (173,0) , ( 440 , 0 ) (440,0) . The children decide to meet at some point along the x x -axis. What is the minimum total distance the children must walk in order to meet?


The answer is 641.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

16 solutions

Sameer Kailasa
May 20, 2014

Intuitively, if we have a set of numbers x 1 , x 2 , , x n x_1, x_2, \cdots, x_n , then the inequality x 1 + x 2 + x n x 1 + x 2 + x n |x_1|+|x_2|+\cdots |x_n| \ge |x_1 + x_2 + \cdots x_n| is always true since the every number is individually "turned positive" on the left hand side while some numbers can "cancel" on the right hand side. This is formally known as the triangle inequality.

Coming back to our original problem, we can let the point on the x x -axis where the total distance is minimized be ( a , 0 ) (a,0) . Then the total distance is a + a 17 + a 40 + 85 a + 173 a + 440 a |a| +|a-17|+|a-40|+|85-a|+|173-a|+|440-a| . By the triangle inequality, the minimum of this value is a + a 17 + a 40 + 85 a + 173 a + 440 a = 641 = 641 |a+a-17+a-40+85-a+173-a+440-a| = |641|=641 .

Most solutions did a tedious case by case analysis, and did not consider how they can simplify their explanations. These are 2 straightforward arguments that give the result almost immediately.

Calvin Lin Staff - 7 years ago

Why the reversal in the fifth and sixth term? How do you justify that without a case-by-case analysis?

Kenny Lau - 5 years, 10 months ago

Log in to reply

The last three terms are flipped so that the a's cancel out, not for any geometric reason. |a-85|=|85-a| regardless of which is bigger.

James Wigglesworth - 5 years, 4 months ago

I see nothing wrong with Sameer Kailasa's explanation; but if you're looking for another proof that case-by-case analysis is unnecessary, consider this: the nth child (noting the fact that they're in order left-to-right) and the (7-n)th child must travel a combined total of at least the distance between them, and that minimum is achievable if and only if the meeting point lies in between them. The rest follows easily.

Peter Byers - 5 years ago

This does give a lower bound on the answer, but I think you need to provide an example where 641 is achieved.

Alexander Xue - 4 years, 5 months ago
Jorge Fernández
May 20, 2014

If you had to chose a point that minimizes the distance from two other points it is quite clear you would have to chose one between these two points. Also: the distance would be the same for any point between these two. Now view the problem with this same technique:

View the sum of 6 distances as the sum of 3 pairs of distances (paring up the greatest with the smallest, the second greatest with the second smallest and so on.) Then it is clear that to minimizethe sum you need to pick a point in the middle of all of these pairs ( in other words: between (40,0) and (85,0). Choose any of these points and find the sum of the distances.

I did the same

Shay Pecker - 4 years, 2 months ago
Ying Xuan Eng
May 20, 2014

There are only 3 cases we can consider in the question.Let ( x , 0 ) \left(x,0\right) be the place where they meet.

Case 1:

Let x x be 173 x 440 173\le x\le 440

So the total distance for the 6 6 children to go to ( x , 0 ) \left(x,0\right) is ( 440 x ) + ( x 173 ) + ( x 85 ) + ( x 40 ) + ( x 17 ) + x (440-x)+(x-173)+(x-85)+(x-40)+(x-17)+x , which is 4 x + 125 4x+125

Before jumping into any conclusion, let's see the second case first.

Case 2:

Let x x be 85 x < 173 85\le x <173

The total distance for the 6 6 children to go to ( x , 0 ) \left(x,0\right) is ( 440 x ) + ( 173 x ) + ( x 85 ) + ( x 40 ) + ( x 17 ) + x (440-x)+(173-x)+(x-85)+(x-40)+(x-17)+x , which is 2 x + 471 2x+471

Again, we observe the third case before deciding the conclusion.

Case 3:

Let x x be 40 x < 85 40\le x <85

The total distance for the 6 6 children to go to ( x , 0 ) \left(x,0\right) is ( 440 x ) + ( 173 x ) + ( 85 x ) + ( x 40 ) + ( x 17 ) + x (440-x)+(173-x)+(85-x)+(x-40)+(x-17)+x , which is 641, a constant.

Now we can consider and observe every case.

Case 1: 4 x + 125 4x+125 , where x x is 173 x 440 173\le x\le 440

Case 2: 2 x + 471 2x+471 , where x x is 85 x < 173 85\le x <173

Case 3: 641 641 , where x x is 40 x < 85 40\le x <85

To make the values as small as possible, we take x x as 173 for Case 1, 85 for Case 2. For Case 3, there is nothing to do as we no longer have a variable, we just have a constant.

Now we can clearly see the results.

Case 1: 817

Case 2: 641

Case 3: 641

Clearly, the minimum total distance for all cases when the children walk in order to meet is 641.

Note: We just test cases where x x is 173 x 440 173\le x\le 440 , 85 x < 173 85\le x <173 and 40 x < 85 40\le x <85 because the other cases are clearly out. For example: When x x is > 440 >440 , they must all walk towards a point, which is not the minimum distance. For x x is 17 x < 40 17\le x <40 and 0 x < 17 0\le x <17 , the meeting points are to far from 440, which makes the total distance even larger.

Calvin Lin Staff
May 13, 2014

Solution 1: Clearly the children shouldn't walk in the y-direction at all. Suppose the children meet at the point P = ( n , 0 ) P = (n,0) . If there are more children to the right of P P than there are to the left of P P , we can let P = ( n + 1 , 0 ) P = (n+1,0) and decrease the total distance travelled. Similarly, if there are more children to the left of P P , then we could let P = ( n 1 , 0 ) P = (n-1,0) and decrease the total distance. Thus, the meeting point should be between ( 40 , 0 ) (40,0) and ( 85 , 0 ) (85,0) . For any point in this interval, the total distance travelled by the first and last child is 440 0 = 440 440 - 0 = 440 , the total travelled by the second and fifth child is 173 17 = 156 173 - 17 = 156 and the total travelled by the third and fourth is 85 40 = 45 85 - 40 = 45 . Thus, the minimum total distance is 440 + 156 + 45 = 641 440 + 156 + 45 = 641 .

Solution 2: If the children were to meet at point ( x , 0 ) (x,0) , then the total distance that they walk is f ( x ) = x 0 + x 17 + x 40 + x 85 + x 173 + x 440 f(x) =|x-0| + |x-17| + |x-40| + |x-85| + |x-173| + |x-440| . We know that the minimum of this graph occurs at one of the kinked points, so we test the values of f ( 0 ) f(0) , f ( 17 ) f(17) , f ( 40 ) f(40) , f ( 85 ) f(85) , f ( 173 ) f(173) , f ( 440 ) f(440) , and see that it achieves a minimum of 641 at f ( 40 ) f(40) and f ( 85 ) f(85) .

Shouldn't the solution of x that minimize f ( x ) f(x) be x [ 40 , 85 ] x \in [40,85] ? Not only x = 40 x =40 and x = 85 x=85 ???

Gian Sanjaya - 5 years, 9 months ago
Richard Liu
May 20, 2014

It's pretty obvious that their meeting place won't be outside the range [ 0 , 440 ] [0,440] , since that is less efficient than going to either 0 or 440. There are five cases to consider for x's location: ( 0 , 17 ) , ( 17 , 40 ) , ( 40 , 85 ) , ( 85 , 173 ) , (0,17),(17,40),(40,85),(85,173), and ( 173 , 440 ) (173,440) . ( 0 , 17 ) (0,17) is relatively improbable, so I will leave that for last.

For the domain x is part of ( 40 , 85 ) (40,85) , the expression for the total distance walked will be (x)+(x-17)+(x-40)+(85-x)+(173-x)+(440-x), which simplifies to 755.

For the domain x is part of ( 85 , 173 ) (85,173) , the expression for the total distance walked will be (x)+(x-17)+(x-40)+(x-85)+(173-x)+(440-x), which simplifies to 2x+471. In order to minimize that, we choose the smallest possible value for x, which is 85. Plugging that in, the distance walked in this case is 641.

For the domain x is part of ( 173 , 440 ) (173,440) , the expression for the total distance walked will be (x)+(x-17)+(x-40)+(85-x)+(x-173)+(440-x), which simplifies to 4x+125. At a glance, 4x is greater than 170*4-680, making this option not posssible.

Since 641 is less than 755, 641 \boxed{641} is the answer.

For the domain x is part of (40,85), it simplifies to 85+173+440-40-17=641 (instead of 755).

Zee Ell - 5 years, 6 months ago
Gilbert Simmons
Oct 30, 2015

Child 1 and Child 6 together must walk a total of 440 to meet somewhere between their starting points. If they meet elsewhere they will have to walk further.

The same argument applies to Child 2 and 5, but with a total of 173 - 17 = 156, and to Child 3 and 4 with 85 - 40 = 45.

440 + 146 + 45 = 641.

Gian Sanjaya
Sep 5, 2015

My solution that suddenly came out of instinct: We can combine the minimum total distance that must be travelled by this pairs of students, marked by their x-axis position: (0,440), (17,173), (40,85). by this we simply get 440+173+85-40-17-0=641.

Yup, pairing up the kids is one way to appraoch this.

Calvin Lin Staff - 5 years, 9 months ago
Afrasiabb Saleem
May 20, 2014

We have to find the minimum possible total distance walked by the 6-children ,mentioned above, to meet at a same point... suppose if that point is between 1st and 2nd children than one child has to come forward and the other five has to come backward but the number of children coming forward should be equal to the number of children coming backward so, that point should be in between 3rd and 4th child..... hence any point between 3rd and 4th child can be the point for which the total distance is minimum... also amazingly the points at which the 3rd and 4th child are standing can also be that required point.. in this case and given conditions the total distance will be 641.

Fred Lauwers
May 20, 2014

Trial and error shows that anything between 40 and 80 sums up to 641.

let x be the distance from origin where all children are going to meet each other. distance travelled by a children at (0,0)=x " " " " " " " " " " " (17,0)=x-17 " " " " " " " " " " " (40,0)=x-40 for the distance travelled by them ,x should lie between (40,0) &(85,0), distance travelled by a children at(85,0)=85-x distance travelled by a children at(173,0)=173-x distance travelled by a children at (440,0)=440-x adding all these we get the answer

Greg Grapsas
Oct 10, 2016

Note that the solution 641 is achieved when the location is between the two middle values of the range of locations. If there were an odd number of children then the minimum distance would occur at the location of the middle child, i.e, the median location.

Ujjwal Rane
Jul 12, 2016

Let us deliberately start with a 'bad' value of meeting point M and start optimizing.

Start with M at x = 0. Then the total walk is simply the sum of the six coordinates. And the child at x = 0 doesn't walk at all.

Now move M to x = 1. The child at x = 0 walks 1 unit more than before. But the rest of the five kids walk 1 unit less each. Saving 4 units of walking!

So optimization has to do with how many stand on either side. If M is chosen to place three kids on both sides, the total loss will compensate the total gain and no more optimization is possible. So it is already optimized! \textbf{So it is already optimized!}

Hence M must lie between x = 40 and x = 85, For ease of calculation take any one of these values and calculate getting 641 \textbf {641}

Conor Donovan
May 23, 2016

Let (a,0) be the meeting point. Then the total distance can be expressed as a function of a, let's call it D(a). D ( a ) = a + a 17 + a 40 + a 85 + a 173 + a 440 D(a) = |a|+|a-17|+|a-40|+|a-85|+|a-173|+|a-440| There may be a min at D'(a) = 0.

D ( a ) = a a + a 17 a 17 + a 40 a 40 + a 85 a 85 + a 173 a 173 + a 440 a 440 D'(a) = \frac{|a|}{a}+\frac{|a-17|}{a-17}+\frac{|a-40|}{a-40}+\frac{|a-85|}{a-85}+\frac{|a-173|}{a-173}+\frac{|a-440|}{a-440}

Each of these terms is either 1 or -1 so, for the sum to be zero, then 3 must be 1 and the other 3 must be -1, i.e. a must be between 40 and 85. So, D(a) can be rewritten without the absolute value symbols as: D ( a ) = a + ( a 17 ) + ( a 40 ) + ( 85 a ) + ( 173 a ) + ( 440 a ) = 641 D(a) = a+(a-17)+(a-40)+(85-a)+(173-a)+(440-a) = 641

Note I omitted the second derivative test out of pure laziness but the stationary point has to be a minimum in this case so I think I'm okay :)

The second derivative test would not allow you to determine if it's a max or a min.

Do you know why?

Calvin Lin Staff - 5 years ago

Suppose we have 2 n 2n points a 1 < < a 2 n a_1<\ldots<a_{2n} in the real line, and we want to minimize the sum of distances to a point. Then we want to minimize the function f ( x ) = i = 1 2 n x a i . f(x)=\sum_{i=1}^{2n}|x-a_i|. This function is convex as a sum of convex functions, and it is constant on the central segment [ a n , a n + 1 ] [a_n,a_{n+1}] because moving x x in that segment implies adding a constant to each of the n n summands x a 1 , , x a n |x-a_1|,\ldots,|x-a_n| and substracting the same constant to each of the n n summands x a n + 1 , , x a 2 n . |x-a_{n+1}|,\ldots,|x-a_{2n}|. Then any point lying in (the interior of) the segment [ a n , a n + 1 ] [a_n,a_{n+1}] is a local minimum of f ( x ) f(x) , and hence a global minimum since f ( x ) f(x) is convex. We deduce that the minimum value is f ( a n ) f(a_n) .

In our case, the minimum is f ( 40 ) = 40 0 + 40 17 + 40 40 + 85 40 + 173 40 + 40 440 = 641. f(40)=|40-0|+|40-17|+|40-40|+|85-40|+|173-40|+|40-440|=641.

Brock Brown
Sep 17, 2015

Python 3.4:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from matplotlib import pyplot as plot
from numpy import arange
positions = (0, 17, 40, 85, 173, 440)
def distance(x):
    return sum([abs(x - position) for position in positions])
x = arange(-100, 600, 0.01)
y = [distance(i) for i in x]
best = y[0]
best_x = 0
for index, dist in enumerate(y):
    if dist < best:
        best = dist
        best_x = x[index]
print("Answer:", best)
plot.title("Distance to Walk (best distance is {0})".format(best))
plot.xlabel("Meeting point (children are red dots)".format(round(best_x)))
plot.ylabel("Distance walked by everyone")
plot.plot(x, y)
plot.plot(positions, [0] * len(positions), 'ro')
plot.plot([best_x], [best], 'y*', markersize=10)
plot.show()

Dependencies:

  • matplotlib ( sudo apt-get install python3-matplotlib )

for the minimum total distance all the children should walk to meet,they all should go to the point (85,0) as it is very closer to all when compared to other numbers.so the total minimum distance = (85-0) + (85-17) +(85-40) + (173-85) + (440-85) = 85 +68 + 45 + 88 +355 =641

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...