Bridge and torch problem
Encyclopedia
The bridge and torch problem (also known as The Midnight Train and Dangerous crossing) is a logic puzzle
Logic puzzle
A logic puzzle is a puzzle deriving from the mathematics field of deduction.-History:The logic puzzle was first produced by Charles Lutwidge Dodgson, who is better known under his pen name Lewis Carroll, the author of Alice's Adventures in Wonderland...

 that deals with 4 people, a bridge and a torch. It is one of the category of river crossing puzzle
River crossing puzzle
A river crossing puzzle is a type of transport puzzle in which the object is to carry items from one river bank to another. The difficulty of the puzzle may arise from restrictions on which or how many items can be transported at the same time, or from which or how many items may be safely left...

s, where a number of objects must move across a river, with some constraints.

Story

Four people come to a river in the night. There is a narrow bridge, but it can only hold two people at a time. Because it's night, the torch has to be used when crossing the bridge. Person A can cross the bridge in 1 minute, B in 2 minutes, C in 5 minutes, and D in 8 minutes. When two people cross the bridge together, they must move at the slower person's pace. The question is, can they all get across the bridge in 15 minutes or less?

Solution

An obvious first idea is that the cost of returning the torch to the people waiting to cross is an unavoidable expense which should be minimized. This strategy makes A the torch bearer, shuttling each person across the bridge:
Elapsed Time Starting Side Action Ending Side
0 minutes A B C D
2 minutes       C D A and B cross forward, taking 2 minutes A B
3 minutes A    C D A returns, taking 1 minute    B
8 minutes          D A and C cross forward, taking 5 minutes A B C
9 minutes A       D A returns, taking 1 minute    B C
17 minutes A and D cross forward, taking 8 minutes A B C D


This strategy does not permit a crossing in 15 minutes. To find the correct solution, one must realize that forcing the two slowest people to cross individually wastes time which can be saved if they both cross together:
Elapsed Time Starting Side Action Ending Side
0 minutes A B C D
2 minutes       C D A and B cross forward, taking 2 minutes A B
3 minutes A    C D A returns, taking 1 minute    B
11 minutes A C and D cross forward, taking 8 minutes    B C D
13 minutes A B B returns, taking 2 minutes       C D
15 minutes A and B cross forward, taking 2 minutes A B C D

Variations and history

Several variations exist, with cosmetic variations such as differently named people, or variation in the crossing times or time limit. The torch itself may expire in a short time and so serve as the time limit. In a variation called The Midnight Train, for example, person D needs 10 minutes instead of 8 to cross the bridge, and persons A, B, C and D, now called the four Gabrianni brothers, have 17 minutes to catch the midnight train.

The puzzle is known to have appeared as early as 1981, in the book Super Strategies For Puzzles and Games. In this version of the puzzle, A, B, C and D take 5, 10, 20, and 25 minutes, respectively, to cross, and the time limit is 60 minutes. In all these variations, the structure and solution of the puzzle remain the same.

In the case where there are an arbitrary number of people with arbitrary crossing times, and the capacity of the bridge remains equal to two people, the problem has been completely analyzed by graph-theoretic methods.

This problem has been used as a method to compare the usability of programming languages.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK