There are two villages separated with a river. Each day, four people cross the river through a bridge to work on the other side and earn for their families. On one night when they were returning from work, they noticed that the bridge was about to collapse. Now all of them wanted to cross the bridge before it collapsed as no one wanted to be stuck on that end without their families.
They had just one torch with them and since it was the night time, they could not see without it. The bridge had become weak and it could only accommodate two people at a time. It was going to collapse in just 17 minutes.
The four people took different times to cross the bridge. First one took only a minute, second one took 2 minutes, third one took 5 minutes and the last one took 10 minutes.
How would all of them have managed to cross the bridge in time?
Let us denote the four people with A, B, C and D.
A takes 1 minute to cross, B takes 2, C takes 5 and D takes 10.
A and B cross first spending 2 minutes.
A comes back with torch taking 1 minute.
C and D cross taking 10 minutes.
B comes back with torch taking 2 minutes.
Finally, A and B cross the bridge taking 2 minutes.
2 + 1 + 10 + 2 + 2 = 17 minutes
Thus, this is the way they all managed to cross that bridge that night.