Optimal Reconfiguration