Traveling salesman — Held–Karp
Work out the cheapest trip for a courier who must visit each town once and return home. The total fare depends on the order of the visits.
For each set of visited towns, record the lowest price of finishing at each possible endpoint. Add one town at a time, then choose a return road.
Time is O(V² · 2ⱽ), space O(V · 2ⱽ). The scene supports up to 8 towns.