
Kernighan–Lin algorithm
The Kernighan–Lin algorithm is a method for dividing a set of interconnected elements, like nodes in a network, into two groups while minimizing the connections between these groups. It starts with an initial way of splitting them and then iteratively swaps pairs of elements to reduce the "cut size"—the total number of connections crossing between groups. The process continues until no further improvements can be made, resulting in a partition that helps optimize tasks like circuit layout or network design by reducing complexity and interference.