Skip to content

PuzzleLearning/LanternNBridgePuzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

"Lantern and bridge" puzzle

The bridge and torch problem (also known as The Midnight Train and Dangerous crossing) is a logic puzzle that deals with four people, a bridge and a torch. It is one of the category of river crossing puzzles, where a number of objects must move across a river, with some constraints.

Puzzle

Six people come to a river in the night. There is a narrow bridge, but it can only hold two people at a time. They have one torch and, 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 3 minutes, C in 4 minutes, and D in 6 minutes. Person E need 8 minutes, and Person F need 9 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 if the torch lasts only 15 minutes?

Puzzle solver

python bridge_puzzle.py

Releases

No releases published

Packages

No packages published

Languages