An Algorithm for Doublets (Shortest Cycle Through Specified Elements) [pdf]
thorehusfeldt.com