Given the list of elements, let's say [1,2,3,4] , and their pair affiliation, let's say
[[0, 0.5, 1, 0.1] [0.5, 0, 1, 0.9] [ 1, 1, 0, 0.2] [0.1, 0.9, 0.2, 0]]
For those familiar with graph theory, this is basically an adjacency matrix.
What is the fastest way to sort the list so that the distance in the list is best correlated with the pair affiliation, i.e. pairs of nodes with high affinity should be close to each other.
Is there a way to do this (even a greedy algorithm will be fine) without going into MDS and ordination theory?
As a bonus question:
Note that some pair relations can be represented ideally, as for the list [1,2,3] and pair affiliation:
[[0, 0, 1] [0, 0, 1] [1, 1, 0]]
perfect order will be [1,3,2] . But some branches cannot, like this one:
[[0, 1, 1] [1, 0, 1] [1, 1, 0]]
where any order is equally good / bad.
Is there any way to talk about the quality of the order? In terms of how well does he represent affiliate affiliation?