# The outdated railways

In this scene of an old railroad we have a machine and four wagons facing another machine with three wagons.

The problem consists in discovering the most effective way for both trains to continue on their way using the lateral track in which, due to its length, it is only possible to house one locomotive or one car at a time.

No ropes or other gadgets can be used and it is understood that a wagon cannot be attached in front of the locomotive.

How many movements will be necessary to get trains to pass?

#### Solution

33 steps are needed to complete the maneuver with the restrictions of the problem:

• 1.- Roll back the locomotive on the right (D) far enough to the right to accommodate the entire left train on this other side.
• 2.- Take the locomotive (D) without wagons to the dead track.
• 3.- Take the locomotive on the left (I) with three cars to the right.
• 4.- Take the locomotive (D) back to the main road.
• 5.- Take the locomotive (D) to the left, taking three wagons to the left of the dead track.
• 6.- Take the locomotive (I) to the dead track.
• 7.- Take the locomotive (D) and the wagons to the right.
• 8.- Take the locomotive (D) with the seven cars to the left.
• 9.- Take the locomotive (I) to the main road.
• 10.- The locomotive (I) goes back to the train.
• 11.- The locomotive (I) carries five wagons to the right of the dead track.
• 12.- The locomotive (I) goes back and takes the last car to the dead track.
• 13.- The locomotive (I) has four cars on the right.
• 14.- The locomotive (I) goes back carrying four cars to the left.
• 15.- The locomotive (I) goes alone to the right.
• 16.- The locomotive (I) goes back to the dead track.
• 17.- The locomotive (I) takes the car from the dead track to the main road.
• 18.- The locomotive (I) goes back to the left.
• 19.-The locomotive (I) advances with six cars.
• 20.-The locomotive (I) goes back with the last car to the dead track.
• 21.- The locomotive (I) goes to the right with five cars.
• 22.- The locomotive (I) goes back with five cars to the left.
• 23.- The locomotive (I) goes to the right with a wagon.
• 24.- The locomotive (I) goes back to the dead track.
• 25.- The locomotive (I) goes to the right with two wagons.
• 26.- The locomotive (I) goes back to the left of the dead track.
• 27.- The locomotive (I) carries seven wagons to the right of the dead track.
• 28.- The locomotive (I) goes back with the last car to the dead track.
• 29.- The locomotive (I) goes to the right with six cars.
• 30.- The locomotive (D) goes back to the right
• 31.- The locomotive (D) hooks its four wagons and disappears.
• 32.- The locomotive (I) goes back to the dead track.
• 33.- The locomotive (I) hooks its third carriage and follows its happy path.