|
29 | 29 | "MaximumIndependentSet": [Maximum Independent Set], |
30 | 30 | "MinimumVertexCover": [Minimum Vertex Cover], |
31 | 31 | "MaxCut": [Max-Cut], |
| 32 | + "GraphPartitioning": [Graph Partitioning], |
32 | 33 | "KColoring": [$k$-Coloring], |
33 | 34 | "MinimumDominatingSet": [Minimum Dominating Set], |
34 | 35 | "MaximumMatching": [Maximum Matching], |
@@ -379,6 +380,57 @@ Max-Cut is NP-hard on general graphs @barahona1982 but polynomial-time solvable |
379 | 380 | caption: [The house graph with max cut $S = {v_0, v_3}$ (blue) vs $overline(S) = {v_1, v_2, v_4}$ (white). Cut edges shown in bold blue; 5 of 6 edges are cut.], |
380 | 381 | ) <fig:house-maxcut> |
381 | 382 | ] |
| 383 | +#problem-def("GraphPartitioning")[ |
| 384 | + Given an undirected graph $G = (V, E)$ with $|V| = n$ (even), find a partition of $V$ into two disjoint sets $A$ and $B$ with $|A| = |B| = n slash 2$ that minimizes the number of edges crossing the partition: |
| 385 | + $ "cut"(A, B) = |{(u, v) in E : u in A, v in B}|. $ |
| 386 | +][ |
| 387 | +Graph Partitioning is a core NP-hard problem arising in VLSI design, parallel computing, and scientific simulation, where balanced workload distribution with minimal communication is essential. Closely related to Max-Cut (which _maximizes_ rather than _minimizes_ the cut) and to the Ising Spin Glass model. NP-completeness was proved by Garey, Johnson and Stockmeyer (1976). Arora, Rao and Vazirani (2009) gave an $O(sqrt(log n))$-approximation algorithm. Standard partitioning tools include METIS, KaHIP, and Scotch. |
| 388 | + |
| 389 | +*Example.* Consider the graph $G$ with $n = 6$ vertices and 9 edges: $(v_0, v_1)$, $(v_0, v_2)$, $(v_1, v_2)$, $(v_1, v_3)$, $(v_2, v_3)$, $(v_2, v_4)$, $(v_3, v_4)$, $(v_3, v_5)$, $(v_4, v_5)$. The optimal balanced partition is $A = {v_0, v_1, v_2}$, $B = {v_3, v_4, v_5}$, with cut value 3: the crossing edges are $(v_1, v_3)$, $(v_2, v_3)$, $(v_2, v_4)$. All other balanced partitions yield a cut of at least 3. |
| 390 | + |
| 391 | +#figure( |
| 392 | + canvas(length: 1cm, { |
| 393 | + // 6-vertex layout: two columns of 3 |
| 394 | + let verts = ( |
| 395 | + (0, 2), // v0: top-left |
| 396 | + (0, 1), // v1: mid-left |
| 397 | + (0, 0), // v2: bottom-left |
| 398 | + (2.5, 2), // v3: top-right |
| 399 | + (2.5, 1), // v4: mid-right |
| 400 | + (2.5, 0), // v5: bottom-right |
| 401 | + ) |
| 402 | + let edges = ((0,1),(0,2),(1,2),(1,3),(2,3),(2,4),(3,4),(3,5),(4,5)) |
| 403 | + let side-a = (0, 1, 2) |
| 404 | + let cut-edges = edges.filter(e => side-a.contains(e.at(0)) != side-a.contains(e.at(1))) |
| 405 | + // Draw edges |
| 406 | + for (u, v) in edges { |
| 407 | + let crossing = cut-edges.any(e => (e.at(0) == u and e.at(1) == v) or (e.at(0) == v and e.at(1) == u)) |
| 408 | + g-edge(verts.at(u), verts.at(v), |
| 409 | + stroke: if crossing { 2pt + graph-colors.at(1) } else { 1pt + luma(180) }) |
| 410 | + } |
| 411 | + // Draw partition regions |
| 412 | + import draw: * |
| 413 | + on-layer(-1, { |
| 414 | + rect((-0.5, -0.5), (0.5, 2.5), |
| 415 | + fill: graph-colors.at(0).transparentize(90%), |
| 416 | + stroke: (dash: "dashed", paint: graph-colors.at(0), thickness: 0.8pt)) |
| 417 | + content((0, 2.8), text(8pt, fill: graph-colors.at(0))[$A$]) |
| 418 | + rect((2.0, -0.5), (3.0, 2.5), |
| 419 | + fill: graph-colors.at(1).transparentize(90%), |
| 420 | + stroke: (dash: "dashed", paint: graph-colors.at(1), thickness: 0.8pt)) |
| 421 | + content((2.5, 2.8), text(8pt, fill: graph-colors.at(1))[$B$]) |
| 422 | + }) |
| 423 | + // Draw nodes |
| 424 | + for (k, pos) in verts.enumerate() { |
| 425 | + let in-a = side-a.contains(k) |
| 426 | + g-node(pos, name: "v" + str(k), |
| 427 | + fill: if in-a { graph-colors.at(0) } else { graph-colors.at(1) }, |
| 428 | + label: text(fill: white)[$v_#k$]) |
| 429 | + } |
| 430 | + }), |
| 431 | + caption: [Graph with $n = 6$ vertices partitioned into $A = {v_0, v_1, v_2}$ (blue) and $B = {v_3, v_4, v_5}$ (red). The 3 crossing edges $(v_1, v_3)$, $(v_2, v_3)$, $(v_2, v_4)$ are shown in bold red; internal edges are gray.], |
| 432 | +) <fig:graph-partitioning> |
| 433 | +] |
382 | 434 | #problem-def("KColoring")[ |
383 | 435 | Given $G = (V, E)$ and $k$ colors, find $c: V -> {1, ..., k}$ minimizing $|{(u, v) in E : c(u) = c(v)}|$. |
384 | 436 | ][ |
|
0 commit comments