Best Party

Algebra Level 2

There are 5 neighbors living on a straight road, one of whom needs to host a party. If the distances between neighboring houses are as written, who should host the party to minimize the total distance walked?

Yellow Green Pink Blue

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.

3 solutions

Chew-Seong Cheong
Nov 19, 2017

Thanks to @Calvin Lin for this simple proof.

This is to prove that:

The middle house is always the best house to party --- in terms of total distance walked by the party goers.

Let there be an odd number of houses, H 1 , H 2 , H 3 , , H n H_1, H_2, H_3, \cdots, H_n . First consider the two end houses H 1 H_1 and H n H_n . We note that the total distance the two neighbors need to walk is the distance between them. Similarly for H 2 H_2 and H n 1 H_{n-1} , the total distance the two neighbors walk is the distance between H 2 H_2 and H n 1 H_{n-1} if the party is held in a neighbor's house in between their houses. If the party is held in H 1 H_1 or H 2 H_2 , the two neighbors of H 2 H_2 and H n 1 H_{n-1} need to walk an extra distance of twice the distance between H 1 H_1 and H 2 H_2 or H n 1 H_{n-1} and H n H_n respectively. For the same reason, the shortest distances walked by the pair of neighbors H 3 H_3 and H n 2 H_{n-2} , H 4 H_4 and H n 3 H_{n-3} and so on are minimum if the party is held in house in between their houses. It is obvious that the overall distance walked by all the pairs of neighbors is minimum if the party is held in the house in the middle. In this problem the middle house is the Green \color{#20A900}\boxed{\text{Green}} House. The minimum total distance walked is the sum of the distances between the paired houses.

For even number of houses either one of the two houses in the middle can hold the party to give the minimum total distance walked.

In all cases, for any number of houses, just pick the median of the houses.

Ossama Ismail - 3 years, 6 months ago

Log in to reply

I think you are right. But how do we prove it.

Chew-Seong Cheong - 3 years, 6 months ago

Log in to reply

I need to prove it. When I have time I will do it, regards.

Ossama Ismail - 3 years, 6 months ago

Log in to reply

@Ossama Ismail I am trying too.

Chew-Seong Cheong - 3 years, 6 months ago

Log in to reply

@Chew-Seong Cheong https://brilliant.org/problems/where-is-the-gas-station-2/?ref_id=1303666

Ossama Ismail - 3 years, 6 months ago

Ossama, I did it.

Chew-Seong Cheong - 3 years, 6 months ago

Log in to reply

This is great .. thank you ... 👍😎😁

Ossama Ismail - 3 years, 6 months ago

Did you delete your proof ???

Ossama Ismail - 3 years, 6 months ago

Log in to reply

@Ossama Ismail Yes, and replace with a simpler one.

Chew-Seong Cheong - 3 years, 6 months ago

The median house is the green one, not the yellow. Besides, consider the math above proves this right: it's 140 for the yellow house and 130 for the green. How can you refute this?

Veiran X - 3 years, 6 months ago

Note: There's a much easier way to prove the general case

Hint: Pair off the endpoints.

Calvin Lin Staff - 3 years, 6 months ago

Considering the yellow house the distance covered is: 50+0+10+(10+20)+(10+20+20)=140 Considering the green house the distance covered is: (50+10)+10+0+20+(20+20)= 130

If we consider the function the describes the distance covered considering a general meeting point x (Considering the left one to be at x=0 (origin))...

We have: d(x)= |x|+|x+50|+|x-60|+|x-80|+|x-100|

d(x) got a minimun on x=60, d(60)=130.

What ia wrong on my approach?

P.s. |x| = absolut value

Yuri Lombardo - 3 years, 6 months ago

The middle house (or median) is actually the green house. The actual distances traveled also prove that it should be the green one; 140 for the yellow house and 130 for the green.

Veiran X - 3 years, 6 months ago

Log in to reply

Thanks for notifying us. When we updated the image, we changed the colors but forgot to update the answer. Those who answered green have been marked correct.

In future, if there is an issue with the problem, you can report it directly by selecting "Report problem" from the menu.

Calvin Lin Staff - 3 years, 6 months ago

I have noticed the question was changed. I have changed the answer too.

Chew-Seong Cheong - 3 years, 6 months ago
Jozko Mrkvicka
Dec 8, 2017

It has to be always the middle house. If you move the party from not the middle house to the next one being more in the middle you save the distance between those 2 houses for one more man.

If you change from the yellow to the green brown and yellow must go a longer distance but pink green and blue a shorter. So it is 2 to 3.

Since distances are all given. Simply calculate total distances and you'll find that Green house has lowest total distance.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...