Split at every junction and travel both paths at once, splitting
at each junction, keeping track of distance traveled inbeween
each path by each photon, and traveling towards the furthest
house.
Add each traveled path and the shortest one wins.
Or Water.
Turn the map into a series of connected pipes and turn the
structure sideways and let water flow down. Do the same thing,
measuring the time it takes water to complete each segment.
or sound
Measure echos, shouting down each road and calculating the
difference between source and destination using a synchronize
timekeeping device.
or...
mirrors!
Each customer has a semimirror installed on all four sides of
the house.
Then use lasers - they'll both bounce AND pass through the
mirror to travel through to the next destination while also
providing feedback to the distances travelled so far.
Or have a contest and have the customers met YOU somewhere.
There. Hardest problem in computer science solved. :P
My favorite answer is to use a rope connecting them all. Then
stretch the rope in the circle and then cut the dangling paths.
I thought of that one a while ago. having tried any - all
#hypothesis
And with easy math, none of these complicated algorythms.