To exchange the cars and return the engine to its
initial position 16 moves are required. Within the moves six*
couplings and uncouplings are performed. A move is either a
coupling/uncoupling or moving of an engine alone/with car(s) till the
moment it reverses its direction. The moves are shown in the
illustration.
* The improvement on the number of required
couplings and uncouplings, decreased from 8 to 6, has been sent to us
by Japhet Stevens. Many thanks!