User:Jeff/The Traveling Judges Problem

Analysis
I'll give it away up front: this is a minimal spanning tree problem. We are trying to find the smallest tree that connects the destination city and every judge's home city. Other cities can be optionally included as nodes in this tree, if it will reduce the sum of the tree's edges. We must then find and return a series of shortest paths through the spanning tree. (Note that "shortest paths" is redundant; only one path connects any two points in a tree. Of course, there may be multiple distinct minimal spanning trees for any underlying graph, but the problem statement says that any shortest path is acceptable.)

There can be at most 20 cities in the input, and one look at the long list of tiebreaker rules should suggest the use of bitmasks. We will try every possible subset of cities as nodes in our minimal spanning tree. We should exclude subsets that don't include each judge's starting city, or that don't include the destination city.