An engine kept at a depot must exchange two cars: car A at station A and car B at station B, on a track...
logic/train.shunting New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
An engine kept at a depot must exchange two cars: car A at station A and car B at station B, on a track that includes a bridge and a depot siding. What if the bridge is too narrow for the coaches but wide enough for the engine? [ Editor: problem statement reconstructed from the postings. Only the variant question (asked by Michael Chew <m.chew@ic.ac.uk>) and its solution survive; the original "railway track puzzle" and its track diagram are not in the collected postings, so the layout given here is inferred from the solution. ]
Show solution
Move the engine to station A, grab car A and stick it on the depot siding. Go back through station A, across the bridge to station B and push car B just past the siding junction. Back up and go down the siding to get A. Back up off the siding, then connect A to B. Push the AB combo onto the siding, decouple B, pull A back to station B, decouple A. Back over the bridge and around to the siding. Grab B, back out of the siding, then push it into station A. Now go back to the depot. -- Dean Edmonds <deane@io.org>