Given a graph with N nodes (in thousands), I need to find the K nodes so that the average path length between each pair (K1, K2) K is maximized. So basically I want to place them as far away from each other as possible.
What algorithm would I use for this / how could I program this without trying several separate K combinations?
Also, as an extension: if now I have N nodes, and I need to place in the column 2 groups of nodes K and L, so that the average path length between each pair (L, K) is maximized, how would I do this?
My current attempt is to simply make a few random placements and then calculate the average path length between the K and L pairs, but this calculation starts to take a lot of time, so I would rather not spend a lot of time simply evaluating randomly selected combinations. I would rather spend time getting the REAL most spread combination.
Are there any algorithms for this?
source
share