问题
Does anybody know this algorithm a little bit, because I'm considering using it, but I'm not sure whether it really meets all my requirements. So bascially, what I want to do is splitting up a graph in several subgraphs. However the nodes of each subgraph should be connected, that is it should not be the case that for example if I want to reach node x I have to go through another subgraph. And that is exactly my concern. Is it possible, that when I split up a graph with the Kernighan-Lin algorithm, that the nodes of the subgraphs will end up scattered all over?
回答1:
Yes, K--L may create disconnected subgraphs. For example, it splits the 8-vertex star
* * *
\|/
*-*-*
/|
* *
into two 4-vertex subgraphs, of which one, the one not containing the center, is necessarily not connected. I don't know what you would want to happen on this example.
来源:https://stackoverflow.com/questions/17523691/kernighan-lin-algorithm