Given: a graph G with vertices V and edges E, and a number of partitions P
Output a vertex partition
such that:
Partitions are disjoint
Partitions are roughly balanced
Minimize number of cuts
Graph Bisection and Planar Separators
Graph partitioning is NP-Complete
NEED HEURISTICS
Bisection Recursively divide graph in half until you get P partitions
Planar A graph that can be drawn on a plane with no edge crossings
A planar graph G=(V,E) with n vertices, has a disjoint partition Liptun & Tarjan
S seperates A and B
Removing S means there are no connections between A and B
You can find a separator by using a BFS and using half of the max distance
Kernighan-Lin
Given a partition of a subgraph, the Cost is the number of edges between the
subgraphs.
Imagine swapping small subsets of each subgraph of roughly equal size
External Cost:
Internal Cost:
Cost of a partition:
We subtract because if there is an edge between a and b,
then it would have been counted twice, once for the external edges of a and
once for the external edges of b. Subtracting it means we only keep one
counting.
Cost after swap:
Change in cost:
Graph Coarsening
Replace graph with smaller graph that has fewer nodes and edges but still
somehow “looks-like” the original graph. Repeat this until you get a version
of the graph that is able to be partitioned quickly. You partition that graph
then reverse the steps to get the original graph.
Similar to scaling down the resolution of an image, performing some
transformation on the scaled down version, then upscaling back to the original
resolution.
Identify some subset of the vertices in the graphs to merge/collapse.
Replace subset with a “super vertex”
Assign a weight to the super vertex equal to the number of nodes that
constitute the super vertex
Any two edges that got mapped to a single edge in this process now has a
weight equal to the sum of the original two edges.
Matching
matching A subset of a graph of edges with no common endpoints
maximal matching A matching to which you cannot add anymore edges
maximum matching The larges maximal matching
If you find a separator in the coarsened graph, then all the mapped edges/nodes
from the original graphs of the separator create the projected separator.
If the projected separator has a triangle (or greater shape), then you will
need to refine your separator.
Spectral Partitioning
Take an incidence matrix (as opposed to an adjacency matrix) to represent a graph
0
1
2
3
0
1
-1
1
1
-1
2
1
-1
3
-1
1
4
1
-1
5
-1
1
Diagonals of the tell us the count of incident edges.
The off-diagonals tell us the presence of an edge, without direction
(converting a directed graph to an undirected graph).
THe diagonals of the overal Laplacian tell us the degree of each vertex. The
off-diagonals mark all the edges (i.e. the adjacency matrix of the undirected
graph).
Laplacian Example
“0 has 7 edges”
0
1
2
3
4
5
6
7
8
0
7
1
3
2
3
3
2
4
1
5
2
6
1
7
1
8
2
“Every where there is an undirected edge, put a -1”
0
1
2
3
4
5
6
7
8
0
7
-1
-1
-1
-1
-1
-1
-1
1
-1
3
-1
-1
2
-1
-1
3
-1
3
-1
-1
2
4
-1
1
5
-1
2
-1
6
-1
1
7
-1
1
8
-1
-1
2
Matrix should be symmetrical, and rows and columns should sum to zero.
Handy Factoids
Mostly from Pothen et al, 1990
L(G) is symmetric
L(G) has real-valued, non-negative eigenvalues and real-valued, orthogonal
eigenvectors.
Graph has k connected components if and only iff the k smallest eigenvalues
are identically zero. (Fiedler, 1973)
Spectrum of L(G) Connectivity of G
Number of cut edges =
Putting it all together
Start witha a graph
Construct it’s laplacian
Create a partition of graph
The partition correlates to a partition vector.
To know the number of cut edges in graph:
We want:
This is NP-Complete…
If we relax the requirement that we assign exactly a to
every vertex, then we can use Courant-Fisher Minimax Theorem to get:
Or vector that minimizes the number of cut edges is related to the eigenvalue
of the second smallest eigenvector.