We present an efficient control scheme that stabilizes the unstable periodic orbits of a chaotic system. The resulting orbits are known as cupolets and collectively provide an important skeleton for the dynamical system. Cupolets exhibit the interesting property that a given sequence of controls will uniquely identify a cupolet, regardless of the system's initial state. This makes it possible to transition between cupolets, and thus unstable periodic orbits, simply by switching control sequences. We demonstrate that although these transitions require minimal controls, they may also involve significant chaotic transients unless carefully controlled. As a result, we present an effective technique that relies on Dijkstra's shortest path algorithm from algebraic graph theory to minimize the transients and also to induce certainty into the control of nonlinear systems, effectively providing an efficient algorithm for the steering and targeting of chaotic systems.