Partitioning a graph using FM-algorithm and kernighan Lin algorithm