I've recently been asked to solve a riddle, which sounds something like that:
There are 4 people on the one side of the bridge. They have only 1 flashlight. It takes respectively 1, 2, 5 and 10 minutes for those people to cross the bridge. Rules for crossing the bridge:
- Bridge can hold up to 2 people at the same time.
- People can't cross the bridge without carrying a flashlight.
- If 2 people are crossing the bridge at the same time, their speed is equal to the slower one's speed.
Question: what is the minimum of time required for all four of them to cross the bridge?
It is clear that at the beginning two people cross the bridge, then one of them goes back, then another two crosses and so on...
The answer for the riddle is: (hover to see)
17 minutes: 1 min. and 2 min. crosses the bridge. (+2 minutes); 1 min. goes back. (+1 minute); 10 min. and 5 min. crosses the bridge. (+10 minutes); 2 min. goes back. (+2 minutes); 1 min. and 2 min. crosses the bridge. (+2 minutes).
But my question is: Is there any mathematical way to count the solution without just guessing?