Train maneuvers

I
Train B is approaching a small stop, but due to damage to the locomotive, he is overtaken by train A, who must go on. We mark, that the railroad track here is single-track. At the stop, a siding departs from the main track, the so-called blind track, to which you can bring the train from the main track for a while, but this branch is short in that respect, that none of the passing trains can fit completely on it. How should I proceed, so that the A-train could continue on?

tmpef94-1Figure I shows the railroad track near the stop:

Train B runs along the main track in the direction of the arrow, followed by the A train, which must be passed on. Train B, as we noted, it can accommodate only part of its wagons on the siding. How to maneuver, to let train A pass?

Here is the solution: Train B goes on the main track, passes the entrance to the siding. Then it goes backwards (in reverse) on this branch and leaves so many wagons there, as far as the length of the siding will allow; the rest of the B train with the locomotive goes forward again and moves far beyond the beginning of the siding.

Train A follows him; as soon as the beginning of the siding has passed, the carriages of train B left on the siding attach to its last car and train A brings them from the dead end, then it withdraws with them, to give the rest of train B access to the siding. When in this way the main track in front of train A is emptied, they detach the carriages of the B train from it and it rushes towards the station at double speed. The train B with the front carriages again enters the main track, attaches wagons standing on it and glides slowly behind the A train.

Find another solution yet! Could the train A be split into two parts instead of the B train??

II

On a slightly larger stop next to the main track, there is a non-blind sideline, but connected at both ends by switches to the main track.

tmp23a4-1Two trains are coming from two opposite directions. These trains must pass at this stop (Lynx. II). Both trains are much longer than the siding. How to cross them with the least amount of maneuvers?

III

tmp23a4-2A train consisting of the P, freight carriages T and passenger cars O are located at the station with the main track, sidetrack and blind track S, where the freight cars T1 stand (Lynx. III). Freight wagons from train T should be placed on a blind track, and the T1 wagons standing there should be attached to the place of those parked, between O and P.. When maneuvering, it is impossible to leave the carriages without a locomotive on the main line, for a fast train is expected soon, for which the main track must be emptied as soon as signals are received.

IV

tmp915b-1On a double track line, shown in Figure IV by lines AB and CD, freight train composed of 21 of the carriages goes on the AB track in the direction of the arrow. The train should leave the ninth and twelfth carriages at the G freight station. How to do it with the least amount of moves?

V

tmp915b-2On the ABCD line there is a P steam locomotive with two carriages W i and W 2 (rys.V). You should change their position to the opposite, so that the locomotive from point A to D would be the first, and the wagons were behind her. There is a rotating disc at point T, which can accommodate a wagon, but the locomotive does not fit. When solving, use as few maneuvers as possible.