It's the end of the school year and a lot of your friends are having graduation parties. Unfortunately, five of your best friends all scheduled theirs around the same time on the same day! You like all of your friends equally so you want to attend each party for exactly the same amount of time. Based on the times of the parties and time it takes to travel between each party, what is the maximum amount of time you can spend at each party?
Details and Assumptions :
Party 1: 12pm - 4pm
Party 2: 3pm - 5pm
Party 3: 1pm - 5pm
Party 4: 12pm - 3pm
Party 5: 1pm - 3pm
You arrive at the first party at 12pm sharp.
The time it takes to travel between each party is 15 minutes times the difference between the two party numbers. For example, it takes only 15 minutes to get from Party 2 to Party 3, but it takes 45 minutes to get from Party 2 to Party 5. This formula can be written as 1 5 ∣ p 2 − p 1 ∣ for your convenience.
You're not allowed to wait for another party to start, you're only possible actions are "partying" and "traveling".
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.
What about this: Get to party 4 at 12:05, stay 40 minutes and leave for party 5 at 12:45. Arrive at party 5 at 1:00, stay 40 minutes and leave for party 3 at 1:40. Arrive at party 3 at 2:10, stay 40 minutes and leave for party 1 at 2:50. Arrive at party 1 at 3:20, stay 40 minutes and leave for party 2 at 4:00. Arrive at party 2 at 4:15, stay 40 minutes until 4:55, and leave.
Log in to reply
Mr. Castillo, I applaud you. You are absolutely correct. I'm going to have to add a clause to the problem saying that you arrive at the first party at 12:00; this is what I originally intended for the problem so I didn't even consider coming later to the party, and the fact that coming later allows for MORE time is something beautiful in itself. Thank you so much for your input.
answer should 41 minutes !
Log in to reply
As far as I know, 41 is impossible. Thank you for your report, your concerns have been addressed.
party 1 - party 5 - party 4- party 3 - party 2 if maximal time is X t h e n 5 X + ( 5 − 1 ) ∗ 1 5 + 1 5 + 1 5 + 1 5 = 5 ∗ 6 0 5 X = 1 9 5 X = 3 9
First, by looking at the timings of the parties, one can come up with the possible order of parties to attend.
1->4->5->3->2
Which makes the most intuitive sense considering the timings of each party.
Let us assume the maximum time one can spend in each party is 30 minutes.
Party 1: 12:00 to 12:30
Travelling time to Party 4: 12:30 to 1:15 (15x|4-1|)
Party 4: 1:15 to 1:45
Travelling time to Party 5: 1:45 to 2:00 (15x|5-4|)
Party 5: 2:00 to 2:30
Travelling time to Party 3: 2:30 to 3:00 (15x|3-5|)
Party 3: 3:00 to 3:30
Travelling time to Party 2: 3:30 to 3:45 (15x|2-3|)
Party 2: 3:45 to 4:15
Now, the last party (2) still has 45 minutes to spare. This 45 minutes can be distributed equally among the 5 parties.
45/5=9
This 9 minutes can be added to the 30 minutes from our assumption making the total time spent in each party to 3 9 minutes (which is within each of the party's end time).
Same reasoning I had!
Party 1 > Party 4 > Party 5 > Party 3 > Party 2 ( use logic )
Let x be amount time spend at each party
5x +45 mins +15 mins + 30 mins +15 mins = 5 hours ( frm 12pm - 5 pm )
5x + 105 mins = 300 mins ; 5x = 195 mins
x = 39 mins ""
Problem Loading...
Note Loading...
Set Loading...
For this proof it's going to be useful to look back at the times of the party's so the start and end times have been reproduced below for you.
Party 1: 12pm-4pm
Party 2: 3pm-5pm
Party 3: 1pm-5pm
Party 4: 12pm-3pm
Party 5: 1pm-3pm
We're trying to find the maximum time that a person can spend at each party such that you stay at each party the same amount of time. Let's just pretend for a second that every party was from 12pm-5pm. You might think at first that the maximum amount of time you could spend at each party in this situation is an hour at each, but this would be wrong because you need to factor in travel time. The max for that system would be 48 minutes because if you started at party 1, then went to each party in succession, you would have to travel 4 × 1 5 m i n = 1 h o u r . Subtract that from your total time of 5 hours then divide by 5 parties to get your 4 8 minute maximum. For 5 parties, it should be clear that this must be the maximum for any arrangement of party times. As you can see, the amount of time we can spend at a party is greatly dictated by the amount of travel we have to do. In fact, if we start our first party at 12pm and end our last one at 5pm then our maximum number of minutes at each party should be of the form 5 3 0 0 − 1 5 t = 6 0 − 3 t where t is the number of 15 minute intervals we need to cross throughout our journey.
If we could start our journey at Party 1, then go to Party 2, 3, 4, and 5 in that order, then we would have t = 4 and our answer would be 6 0 − 3 ( 4 ) = 4 8 minutes. Looking at the times above, however, we see this is impossible. Our 4th and 5th parties would end before we got to them. We need to start on a party that starts at 12pm and end on a party that ends at 5pm for our maximum solution. As you can see we have two parties we can start on and two we can end on.
Let's first find out which party to start on. We'll start by analyzing Party 4. After close inspection it's easy to see that starting here is really not plausible. In fact, our maximum time allotment here is only 25 minutes.
Let's try having a party where 2 5 < 6 0 − 3 t < 4 5 ⟹ 5 < t < 3 3 5 . Notice that the only party you can travel to next is the Party 1, because Parties 2,3 and 5 won't be open by the time you travel to them. So you party at 4, travel 45 minutes to party at 1, then have to travel all the way back to Party 5 just to realize that you can't possibly stay the same amount of time you spent at the other parties. If you make your time allotment 25 minutes each, you'll end your 25 minutes at Party 5 right when the party ends, so anything greater than that and this method won't work. Now let's trying to have a party of 4 5 ≤ 6 0 − 3 t ⟹ t ≤ 5 . Our value of t tells us we need at most 5 transfers for this to work. The only way to do 5 transfers and hit all 5 parties this way is to go in the following order: 4-5-3-2-1. Party 1, however ends at 4pm, so by the time we reach the party it's already over. Therefore, taking both situations into account, our maximum solution when starting at Party 4 is 25 minutes.
Now let's analyze Party 1. Let's think of this starting point in terms of how many transfers need to be taken. It's apparent that the minimum number of transfers needed is 7. Party 2 starts at 3pm, meaning that we need to avoid it until then. Also, parties 4 and 5 end at 3, so we need to reach them first before we reach Party 2. This leads to the reasonable travel path of 1-4-5-3-2, which takes 7 lots of 15 minutes to complete. This means our maximum time we could spend at each party using this path is 6 0 − 3 ( 7 ) = 3 9 minutes. But will the times of the parties allow for us to spend 3 9 minutes at each party? It turns out the answer is yes, and this best-possible scenario is shown below.
Party at 1: 12:00-12:39
Travel From 1 to 4: 12:39-1:24
Party at 4: 1:24-2:03
Travel From 4 to 5: 2:03-2:18
Party at 5: 2:18-2:57
Travel From 5 to 3: 2:57-3:27
Party at 3: 3:27-4:06
Travel From 3 to 2: 4:06-4:21
Party at 2: 4:21-5:00
As you can see, the times of each party allow for us to stay a maximum of 3 9 at each party, making it our final answer.