A train’s engineer must use the engine to switch the position of cars A and B on this section of track so that their positions are reversed (and the engine is back in the same position as shown in the diagram). The cars can attach to either end of the engine or to either end of each other using the couplings. The siding (at the top of the picture) is big enough to switch one car from one track to the other, but not big enough to switch the engine or switch two cars while they are connected. Of course a car cannot be moved without being connected to the engine. Answer with a series of diagrams showing each step of the process.
[Problem submitted by Roger Wolf, LACC Professor of Mathematics and Department Chairman. Source: ‘Terrific Science and Math,’ Winter 2002, Miami University.]