The solution assumes that there are no cases where two links (i.e. a path from one city to another city) have the same length.



to deal with this add a small error signal (for example 1 ppm) to 

each path length, and repeat the process until there is no case

where two single path lengths (1 city to 1 other city) that are the same

length.


the normal process should then work correctly.



the most effective way to do this is to create a sorted list of

the individual path lengths, and check adjacent items to see whether

they are the same or not
