[ad_1]
Two trains are heading towards each other on a track. One train is blue, the other is green. Each train has a locomotive hauling nine wagons.
Each locomotive is 10 meters long, and each wagon is also 10 meters long.
Between the trains, there is a small area with a parallel 40 meters track accessible via switches. The tracks between the switches can therefore accommodate four wagons, or one locomotive and three wagons, or two locomotives and two wagons.
Something like this (B=Blue, G=Green, W=Wagon, L=Locomotive):
INITIAL SETUP
/------------\
--------BW-BW-BW-BW-BW-BW-BW-BW-BW-BL----< >----GL-GW-GW-GW-GW-GW-GW-GW-GW-GW-------
\------------/
Locomotives can haul (pull) and shove (push) other rail vehicles (i.e. wagons and/or the other locomotive), in both directions. Rail vehicles can be attached and detached. For example, one could detach the last five wagons, and let a locomotive only haul four wagons.
The goal is to get the trains past each other, with each locomotive hauling its original nine wagons (not necessarily in the original order for the wagons, but the locomotive should be at the front of the train):
THE GOAL
/------------\
------GL-GW-GW-GW-GW-GW-GW-GW-GW-GW------< >----BW-BW-BW-BW-BW-BW-BW-BW-BW-BL-------
\------------/
Attach and detach rail vehicles and make use of the 40 meters parallel track to achieve this.
For example, one could start with the original setup (this is just to demonstrate some possible actions, not the actual solution):
INITIAL SETUP
/------------\
--------BW-BW-BW-BW-BW-BW-BW-BW-BW-BL----< >----GL-GW-GW-GW-GW-GW-GW-GW-GW-GW-------
\------------/
Then detach the third wagon from the green train and bring the green locomotive and its first two wagon on a track between the switches:
STEP 1
/--GL-GW-GW--\
--------BW-BW-BW-BW-BW-BW-BW-BW-BW-BL----< >-------------GW-GW-GW-GW-GW-GW-GW-------
\------------/
Then detach the last blue wagon and take the blue locomotive and its first eight wagons to the other side, potentially shoving the green wagons along:
STEP 2
/--GL-GW-GW--\
--------BW-----< >------------BW-BW-BW-BW-BW-BW-BW-BW-BL-GW-GW-GW-GW-GW-GW-GW-------
\------------/
Then detach the last wagon connected to the green locomotive and leave it on the side track, while the green locomotive is moving forward, shoving the blue wagon:
STEP 3
/--------GW--\
---BW-GL-GW----< >------------BW-BW-BW-BW-BW-BW-BW-BW-BL-GW-GW-GW-GW-GW-GW-GW-------
\------------/
Then attach the green wagon to the blue locomotive and move the blue locomotive backwards, on the lower track, and on to the other side, and stop somewhere:
STEP 4
/--------GW--\
---BW-GL-GW-BW-BW-BW-BW-BW-BW-< >-GW-GW-GW-GW-GW-GW-------
\-BW-BW-BL-GW-/
And so on.
Attach, detach, haul, shove, use the parallel tracks to get the trains past each other.
Source: this is from the game Puzzillion, though I believe I saw this puzzle somewhere else many years ago, but I cannot find it anywhere else now.
[ad_2]