Copyright © University of Cambridge. All rights reserved.
Two passenger trains with four carriages each are facing each other on the main line, with a siding branching off between them. The siding is only long enough to fit one engine and two carriages. What is the best way to shunt the carriages so that each train can continue its journey?