算法介绍
Kernighan-Lin是一个简单的局部优化算法,该算法可以很好地改善图的分割效果。它的定义很简洁,只与边的权重有关。
This is a simple local descent algorithm, which works well to improve an already reasonable partition produced by one of the algorithm discussed later. It is simple to state for weighted edges, so we do so.
算法描述
我们将初始图G=(N,E,We)分成相等的两部分:|A|=|B|。令w(e)=w(i,j)代表e(i,j)的权值,不存在边即为0。我们的目标是找出相同数量的子集X in A和Y in B,将X和Y交换来减少AB两社区间边连接的开销。更精确的,我们令
T = sum[ a in A and b in B ] w(a,b) = cost of edges from A to B
然后寻找XY,使
new_A = A - X U Y and new_B = B - Y U X
间有更少的开销new_T。为了有效的计算new_T,我们介绍
E(a) = external cost of a = sum[ b in B ] w(a,b)
I(