# Zombie horde incoming! [duplicate]

Here is a puzzle I found on youtube's Ted-ed channel and found quite fun to solve.

You and 3 more people are for some reason running away from a horde of zombies in the darkness while holding a lantern. Suddenly, you reach a frail looking bridge. The wise old professor in the group quickly evaluates the situation and gives you the following information you need to form a rescue plan.

The youngster(you) can cross the bridge in 1 minute.
The little girl can cross the bridge in 2 minutes.
The middle aged man can cross the bridge in 5 minutes.
The old professor can cross the bridge in 10 minutes.
The blood thirsty horde will arrive in 17 minutes.
If more than 2 people go on the bridge, it will collapse.
No one can move if not within the small range of the lantern.
If the zombies go on the bridge while you are crossing, the bridge will collapse.

Can you bring everyone safely to the other side of the bridge in time? If so, how?

• Well I've already wasted most of the 17 minutes trying to think up a plan, there is no chance anyone can get across now :P Mar 8 '17 at 7:24
• @humn oh thanks! Didn't know that was a thing. Mar 8 '17 at 7:25
• Why should someone who is running from a horde of zombies make an enigma to solve in order to bring everyone to the other side? I mean, fcking run or give the solution instead of doing a puzzle! Mar 8 '17 at 8:18
• Step 1: Take the Lantern and the girl. Step: 2 Run and don't look back...if anything we've learnt from zombie movies...is that some have to die Mar 8 '17 at 10:52
• ...mind you I say that yet I cant see an edit button on the others, so "we" = mods and anyone(?) with a gold-badge in one of the tags. Mar 8 '17 at 14:59

Yikes.   Labeling us 10, 5, 2 and 1 by how long we take to cross the bridge — always with lantern L — each forward crossing will have two of us, taking as long as the slower one. Each return crossing will be made by someone alone.

                   Elapsed     Side of        Crossing       Side of
Narrative       Time        Peril         (minutes)      Safety
--------------   ---------   ------------   -----------   -------------
We arrive         0        10 5 2 1 L
1+2+L cross                 10 5           1 2 L  (2)
2        10 5                          L 1 2
1+L returns                 10 5             1 L  (1)         2
3        10 5 1 L                          2
10+5+L cross                 1             10 5 L  (10)        2
13        1                             L   2 5 10
2+L returns                 1                2 L  (2)           5 10
15        1 2 L                               5 10
1+2+L cross                                1 2 L  (2)           5 10
Zombies arrive      17        Zombies                       L 1 2 5 10 

Whew!   Now safe, the story of temptation and resistance may be told.

This resisted the temptation to have the quickest cross each time, minimizing every return trip. Having 5 and 10 cross together, instead, more than made up for a return trip made by 2 instead of 1. In fact 5 could have been a second 10 and been just as safe.

Here is how a panicked scramble — where the quickest always crossed first — would have ended in tragedy. It would have taken 19 minutes to complete, with the zombies causing the bridge to collapse while 1 and 10 were still 2 minutes from safety:

                    Elapsed     Side of             Crossing           Side of
Narrative       Time        Peril              (minutes)          Safety
--------------   ---------   ------------   ---------------------   ---------
We arrive         0        10 5 2 1 L
1+2+L cross                 10 5                1 2 L  (2)
2        10 5                                  L 1 2
1+L returns                 10 5                  1 L  (1)            2
3        10 5 1 L                                  2
1+5+L cross                 10                  1 5 L  (5)            2
8        10                                    L 1 2 5
1+L returns                 10                    1 L  (1)            2 5
9        10 1 L                                    2 5
1+10+L begin                                    1 10 L  (8)            2 5
Zombies arrive      17                   Zombies 1 10 L  (2 to go)      2 5


And this how a well-mannered approach — where the slowest went earlier— would have played out horrifically. It would also have required 19 minutes to complete but has the zombies arriving just as 1 returns to be a brain meal along with 2, who never even got moving:

                    Elapsed      Side of       Crossing         Side of
Narrative       Time         Peril        (minutes)        Safety
--------------   ---------   ------------  --------------   ------------
We arrive         0        10 5 2 1 L
1+10+L cross                    5 2        1 10 L  (10)
10           5 2                          L 1 10
1+L returns                    5 2           1 L  (1)           10
11           5 2 1 L                          10
1+5+L cross                      2         1 5 L  (5)           10
16             2                          L 1 10 5
1+L returns                      2           1 L  (1)           10 5
Zombies arrive      17     Zombies 2 1 L                          10 5


In both of these less fortunate approaches, 5 would have had to be a 3 or quicker to allow for a happy ending.

• Wow, you found a way to do it in exactly 17 minutes! That was a very close one!... I hope it took you less than 1 second to come up with the plan though :P Mar 8 '17 at 12:37
• And now the truth can be revealed, @stack reader: We dithered about what to do for 17 full minutes and wound up greeting those zombies! I got away, though – to make up the story about surviving by our wits – only because the zombies took a couple of nibbles and were so disgusted by my rancid brains that they chased me to the bridge and wrecked it afterwards just so I couldn't come back.
– humn
Mar 8 '17 at 15:33
• @humn ^1 for this comment alone. :)
– Rubio
Mar 8 '17 at 17:32

Haven't looked at the existing answer, but I presume it runs along the same lines as these. It's a logical deduction. If you send the 10 and 5 separately, you arrive at 15 minutes, which doesn't leave time for back and forth. Therefore,

You have to send the 5 and 10 together.

However, if you send them first, it will take 5 minutes to send the lantern back. Therefore, you have to start out by:

Sending the 1 and 2 across.
Then send the 1 back - you're at 3 minutes.
Send the 5 and 10 across - you're at 13 minutes.
Send the 2 back - you're at 15 minutes.
Send the 2 and 1 across - you're at 17 minutes.

• This is correct, and without losing any professors, so why not edit that out? This also covers more reasoning than almost every other answer at similar puzzles, and deserves more notice.
– humn
Mar 9 '17 at 1:48
• @humn, sorry, I did misread the question. My bad. :( Mar 9 '17 at 12:50

To minimize the time, the slowest two must go together. Since they need the lamp at the start and someone needs to return it, the fastest two must cross first, with one of them returning the lamp and waiting at the start. The fast pair take 2 mins each time, the slow pair 10 mins, plus 3 for the return trips.