The capacityC torch problemTools Backhouse, Roland and Truong, Tan Minh (2015) The capacityC torch problem. Science of Computer Programming, 102 . pp. 76107. ISSN 01676423
AbstractThe torch problem (also known as the bridge problem or the flashlight problem) is about getting a number of people across a bridge as quickly as possible under certain constraints. Although a very simply stated problem, the solution is surprisingly nontrivial. The case in which there are just four people and the capacity of the bridge is two is a wellknown puzzle, widely publicised on the internet. We consider the general problem where the number of people, their individual crossing times and the capacity of the bridge are all input parameters. We present two methods to determine the shortest total crossing time: the first expresses the problem as an integerprogramming problem that can be solved by a standard linearprogramming package, and the second expresses the problem as a shortestpath problem in an acyclic directed graph, i.e. a dynamicprogramming solution. The complexity of the integerprogramming solution is difficult to predict; its main purpose is to act as an independent test of the correctness of the results returned by the second solution method. The dynamicprogramming solution has best and worstcase time complexity proportional to the square of the number of people. An empirical comparison of the efficiency of both methods is also presented. This manuscript has been accepted for publication in Science of Computer Programming. The manuscript has undergone copyediting, typesetting, and review of the resulting proof before being published in its final form. Please note that during the production process errors may have been discovered which could affect the content, and all disclaimers that apply to the journal apply to this manuscript.
Actions (Archive Staff Only)
