Manuscript Offprint
arXiv:2610.34851When is greedy exact for weighted minimum 3-cut?
Abstract
The greedy algorithm for minimum 3-cut splits a global minimum-weight cut and then the cheaper of its two sides; it is a tight 4/3-approximation. We show that it is exact, from every global minimum-weight cut, whenever some optimal 3-partition has two parts joined by total weight at least the weighted edge connectivity . This extends both theorems of Hochbaum and Shmoys from unweighted planar graphs to all weighted graphs, recovers the 4/3 bound, and generalizes to minimum k-cut with a one-paragraph proof. The remaining hard instances have all pair weights below ; for them we prove a merge lemma for Gomory–Hu sides. Finally, we give a 7-vertex graph with a unique Gomory–Hu tree whose unique optimal 3-partition contains no side of that tree, so the first stage of Kapoor’s algorithm does not suffice on its own. The main theorem, the 4/3 bound, the merge lemmas and the counterexample are verified in the Lean 4 proof assistant.
Keywords: minimum k-cut, greedy algorithm, Gomory–Hu tree, graph partitioning, submodularity, formal verification
1. Introduction
Given an undirected graph with positive edge weights, a 3-cut is a set of edges whose removal leaves at least three components; equivalently, the set of edges crossing a partition of V into three nonempty parts. The minimum 3-cut problem asks for one of least total weight. Throughout, “minimum” refers to total weight, not to the number of edges (see Section 2).
Email address: armando@rodadolab.com (Armando Rodado Amaris)
The problem is polynomial for fixed [1]. Exact algorithms for have successively used max-flow computations [2, 3], an enumeration of light cuts [4], and candidate cuts drawn from an ordered cut enumeration [5]. Vaughn [6] recently obtained randomized and deterministic time; under the Max-Weight Clique conjecture this is essentially optimal in general weighted graphs.
The simplest heuristic is the greedy algorithm: take a global minimum-weight cut , then a minimum-weight cut of whichever side gives the lighter result. For weighted graphs it is a tight 4/3-approximation [7], as reported in [8]. For unweighted planar graphs, Hochbaum and Shmoys [8] proved, in the language of dual cycles, that it is exact in two structural situations. This note asks when the greedy algorithm is exact in general.
Contributions..
-
Exactness criterion (Theorem 1). For every 3-partition and every global minimum-weight cut , greedy. Consequently greedy is exact whenever some optimum has a pair of parts joined by weight at least . This holds in every weighted graph, recovers both Hochbaum–Shmoys theorems (Corollary 2) and the 4/3 bound (Corollary 3), and gives near-linear exact algorithms outside a well-defined hard class on general, planar and bounded-genus graphs (Corollary 4). Theorem 1, Corollaries 2 and 3, Proposition 5 and the merge lemmas are formalized in Lean 4.
-
Hard instances (Section 4). When the criterion fails, all three pair weights are below , forcing every part's cut weight into and the optimum into . A merge lemma shows that any Gomory–Hu side missing a vertex of each of the other two parts can be absorbed into a part of an optimum.
-
Gomory–Hu sides are not enough (Section 5). Kapoor’s algorithm [2] first tries every side X of a Gomory–Hu tree as a part, completing it by a minimum-weight cut of , and then needs further recursion. We show this cannot be avoided: a 7-vertex graph has a unique Gomory–Hu tree and a unique minimum-weight 3-partition containing no Gomory–Hu side. All claims about this graph are verified in Lean 4.
-
Minimum k-cut (Section 6). A k-partition is compatible with a cut S if each of its parts lies inside S or inside . For every , every global minimum-weight cut and every -partition with parts , the cheapest compatible -partition weighs at most (Theorem 10). Hence every global minimum-weight cut is compatible with some minimum-weight -partition as soon as some optimum has two parts joined by weight at least . Without this condition a global minimum-weight cut can be incompatible with every optimum, already for , where this is exactly the failure of greedy. The theorem also gives a two-line proof of Theorem 1.
Relation to prior arguments.. Two cases in the proof of Theorem 1, a minimum-weight cut crossing the lightest part and the lightest part contained in one side, overlap Lemmas 2 and 3 of Kamidoi, Wakabayashi and Yoshida [3]. The case where Vaughn's algorithm finishes immediately (a part of weight below OPT/2) is a special case of our criterion. The merge lemma is related to Xiao's non-crossing lemmas for 3-way cuts in hypergraphs [9].
OPT is the minimum of over 3-partitions; a minimum-weight 3-partition is an optimum. For with , is the least weight of a bipartition of the induced subgraph into two nonempty sets (0 if is disconnected); set if .
Terminology.. All graphs are weighted, and “minimum” always refers to total edge weight, never to the number of edges. A global minimum-weight cut is a set with ; in general it need not have the fewest edges among all cuts, and a cut with the fewest edges need not have weight . The two notions agree only for unit weights, which is the setting of Hochbaum and Shmoys [8]. Likewise a minimum-weight cut is a cut separating from of least total weight , and a minimum-weight 3-cut is a 3-partition of least total crossing weight.
The cut function is symmetric and submodular, hence posimodular: for all ,
For a global minimum-weight cut (so ), let
Splitting one side of optimally gives a 3-partition of this weight, so greedy( OPT; greedy is exact if greedy(.
A Gomory-Hu tree [10] T is a weighted tree on V such that for every tree edge the side of T - e containing x satisfies , the minimum weight of a cut separating x from y. We call and the Gomory-Hu sides of e. Every with separates x from y, so .
3. Greedy exactness
Theorem 1. For every 3-partition of V and every global minimum-weight cut S,
In particular, if some optimum satisfies , then greedy for every global minimum-weight cut .
Proof. Write . It suffices to exhibit a bipartition of or of into two nonempty sets whose crossing weight is at most ; adding then bounds greedy( ) by . The one exception is case (ii), which yields directly. Since , exactly one of the following holds, up to exchanging and .
(i) . Split into and ; the crossing weight is at most .
(ii) . Split into and : greedy( ) .
(iii) . Then and . Split into and ; the crossing weight is .
(iv) A and S cross, i.e. , , and are all nonempty. By posimodularity, . Since is a nonempty proper subset, , so . Split into and , both nonempty; the crossing weight is at most .
For the second statement, , so exactly when , and then greedy( .
For the lightest part, cases (i) and (iv) essentially appear as Lemmas 3 and 2 of [3]. The new ingredients are case (iii) and the uniform pair-weight condition. Theorem 1 also follows from the k-cut argument of Section 6 applied to the pair , since .
Corollary 2 (weighted Hochbaum–Shmoys). Let S be any global minimum-weight cut.
(a) If some optimum has two parts A, B joined by no edge, then greedy(S) = OPT.
(b) If some optimum has a pair of parts joined by weight at least , then greedy(S) = OPT.
Proof. In (a), , so Theorem 1 applies with the parts permuted; (b) is Theorem 1.
For unweighted planar graphs, (a) and (b) are Theorems 1 and 2 of [8], stated there for dual cycles; a theta-shaped dual with a strand at least as long as the girth corresponds to (b).
Corollary 3 (the 4/3 bound). greedy(S) ≤ OPT for every global minimum-weight cut S.
Proof. Choose opposite the heaviest pair, so . Theorem 1 gives greedy, and .
This recovers the tight bound of [7].
Corollary 4 (running time). The greedy algorithm needs one global minimum-weight cut of G and one of each side; the sides are edge-disjoint and inherit planarity or an embedding of genus g. It returns an optimum whenever some optimum satisfies the criterion of Theorem 1, within the following times.
| Graph class | Global minimum-weight cut subroutine | Time |
|---|---|---|
| General weighted Planar | Henzinger-Li-Rao-Wang [11] (deterministic) Łącki-Sankowski [12] | near-linear |
| Genus g | Chambers-Erickson-Fox-Nayyeri [13] |
4. Hard instances
Call an optimum hard if all three pair weights are below . By Corollary 2, greedy is exact unless every optimum is hard; so is exact for any procedure that always returns a valid 3-cut and is exact when all optima are hard.
Proposition 5. Let be a hard optimum. Then (1) for every pair of parts; (2) for every part ; (3) .
Proof. Each is a sum of two pair weights, each below , so both are positive and . Summing, , while OPT, the sum of the three pair weights, is below .
Every part of a hard optimum is thus a 2-approximate minimum-weight cut. In a plane graph, the dual of a hard optimal cut is a theta-graph whose three strands are each lighter than the girth of the dual; the other two dual shapes, two disjoint cycles or two cycles sharing a vertex, leave two parts with no edges between them.
The next two lemmas enlarge a part of an optimum by a suitable minimum-weight cut without losing optimality. Lemma 6 is closely related to Xiao's Lemma 6 [9], which gives the corresponding non-crossing statement; the explicit merged optimum is what we use.
Lemma 6. Let be an optimum, , and a set meeting both and . If is the -side of any minimum-weight cut separating from , then is an optimum.
Proof. The sets , and each contain and avoid , so each has cut weight at least . Submodularity and posimodularity give
Summing, . The new parts are nonempty because meets and .
Lemma 7. Let be an optimum and a Gomory-Hu tree. Let be a tree edge with , and let be its Gomory-Hu side containing . If contains neither all of nor all of , then is an optimum.
Proof. Every with separates from , so . The sets , and contain and lie in , so the three inequalities of Lemma 6 apply. The new parts are nonempty by hypothesis.
Remark 8. If such an X has at least two vertices, contracting X preserves OPT, since some optimum keeps X inside one part, and T with X contracted is a Gomory–Hu tree of G/X. Any statement of the form “some optimum has a part equal to a Gomory–Hu side” therefore reduces, by induction on n, to optima admitting no such merge. Section 5 shows that this residual case genuinely occurs.
5. Gomory–Hu sides do not suffice
Given a Gomory–Hu tree T, Kapoor’s algorithm [2] first evaluates
where X ranges over the Gomory–Hu sides of T. It then recursively shrinks sides until T is a star, and handles that residual case with max-flow computations. is always the weight of a 3-cut, so , with equality whenever some optimum has a part that is a Gomory–Hu side. Equality also holds whenever greedy is exact, in particular under the criterion of Theorem 1: the side S of a lightest tree edge is a global minimum-weight cut, and . One might hope that equality always holds, which would make the recursion unnecessary. It does not.
Theorem 9. There is a weighted graph on 7 vertices with a unique Gomory–Hu tree T and a unique optimum, such that no part of the optimum is a side of T and .
The instance.. Vertices and edge weights:
| Edge | Weight | Edge | Weight |
|---|---|---|---|
| 0.337164 | 0.206713 | ||
| 0.166989 | 0.035930 | ||
| 0.035652 | 0.210285 | ||
| 0.221789 | 0.111054 | ||
| 0.194170 | 0.364863 | ||
| 0.110311 | 0.035173 | ||
| 0.327062 |
Verification.. All quantities below are for the weights exactly as printed. They were computed by exhaustive enumeration in exact integer arithmetic on the weights : cut values over all 126 nonempty proper vertex subsets, the optimum over all 3-partitions, and the Gomory–Hu tree over all labelled spanning trees. Every item has also been verified in the Lean 4 proof assistant, by kernel evaluation of the corresponding finite statements (no compiled code is trusted); there, uniqueness of the tree is checked over all parent arrays rooted at , which include every spanning tree. Both verifications are provided as supplementary material.
-
The tree. is the caterpillar with edges (0.631143), (0.626244), (0.622248), (0.713745), (0.685567) and (0.699878). It is the only spanning tree with the cut-tree property, and the minimum-weight cut of each of its edges is unique.
-
The optimum. It is unique: , with OPT = 1.032456.
-
Hardness. and the pair weights are 0.312952, 0.398165 and 0.321339, so the optimum is hard and greedy is not exact.
-
The gap. The sides of are the five single leaves, their complements, and its complement . Completing each optimally gives .
The instance is a random perturbation of a vertex of a linear program, so the failure is not an artefact of ties.
How the instance was found.. By Lemma 7, can exceed OPT only in a graph none of whose optima admits a merge of a Gomory–Hu side with at least two vertices. This restricts how the parts can sit in T. Guided by it, we searched caterpillar trees: a spine of vertices of a part A, with a part B as the leaves at one end of the spine and a part C as the leaves at the other. For a fixed tree shape, the condition that T be a Gomory–Hu tree is linear in the edge weights: every cut separating the endpoints of a tree edge weighs at least that edge's fundamental cut. A linear program then maximizes the margin by which every 3-partition with a Gomory–Hu-side part loses to . The margin is 0 for , for with , and for ; it is positive for , which is the instance above.
6. Minimum k-cut
For , denotes the weight of the edges crossing a k-partition , and is its minimum. A partition is compatible with a cut if each of its parts lies inside or inside . For a global minimum-weight cut let
with and if has fewer than vertices. This is the weight of a cheapest -partition compatible with , and .
Compatibility is stronger than Xiao’s notion of a cut being non-crossing with a k-partition [9, Definition 2], which asks only that one side of the cut lie inside a part. Xiao showed that every global minimum-weight cut is non-crossing with some minimum-weight 3-partition, and that this fails for [9, Lemmas 5 and 9]. Compatibility can fail already for : since , it fails exactly when greedy is not exact, as for the graph of Theorem 9. A small example for : take a 4-cycle with unit weights and a pendant vertex attached by an edge of weight 2. Then , attained by , and , by cutting the four cycle edges. But a 4-partition compatible with has as a part and cuts the cycle into three pieces, so .
Theorem 10. Let , let be a -partition with parts , and let be a global minimum-weight cut. Then
In particular, if some minimum-weight k-partition has two parts joined by weight at least , then for every global minimum-weight cut ; that is, every global minimum-weight cut is compatible with some minimum-weight k-partition.
Proof. Merge and to obtain a -partition with , and refine by , replacing each part by its nonempty pieces among and . Every edge crossing the refinement crosses or , so the refinement weighs at most .
If splits some part of , the refinement has at least pieces. Merging pieces that lie on the same side of keeps every piece inside or , does not increase the weight, and can bring the number of pieces down to exactly . This gives a compatible -partition of weight at most .
Otherwise every part of lies inside or . In particular does, so itself is compatible with , and . The second statement follows by taking optimal with .
Refining a partition by a cut and coarsening the result is a standard device in the analysis of k-cuts; see, for instance, Lemma 5 of Vaughn [6] and the uncrossing arguments of Kamidoi, Yoshida and Nagamochi [14] and Xiao [15]. What Theorem 10 adds is the observation that a single pair of parts joined by weight at least pays for the refinement.
For and the pair , , which is Theorem 1.
Corollary 11. For every and every global minimum-weight cut ,
Proof. Let be optimal and its heaviest pair, so . Also , because . Theorem 10 gives .
The factor is 4/3 for k = 3 and k = 4, 13/10 for k = 5, and tends to 1. It concerns the best compatible partition rather than an algorithm, since requires exact solutions on the two sides.
Corollary 12. If for some global minimum-weight cut , then every minimum-weight -partition has all pair weights below , and .
Proof. The first claim is the contrapositive of Theorem 10. Then , and , a sum of pair weights each below , is below .
In the 5-vertex example above, the pair weights of the optimum are 1 or 0, all below , as Corollary 12 requires.
7. Computational checks
The statements above were tested against brute-force optima on random graphs: planar graphs (Delaunay triangulations of random points, each edge kept with probability 0.8) and graphs with 5–11 vertices, with weights uniform in [1, 10] or uniform integers 1, ..., 5; and, for , near-complete, circulant, wheel and three-cluster graphs with 7–10 vertices. The adversarial search hill-climbs on the weights of random graphs with 11–13 vertices to maximize minus the least weight of a 3-partition with no Gomory–Hu side as a part. All quantities were computed by exhaustive enumeration over vertex subsets and partitions, and every Gomory–Hu tree was rebuilt from exhaustively computed minimum-weight cuts and re-verified. Each row is reproduced by one of the supplementary scripts.
| Statement | Instances | Violations |
|---|---|---|
| Theorem 1, every 3-partition and global minimum-weight cut | 1,600 graphs | 0 |
| Corollary 3 (4/3 bound), at 1,800 global minimum-weight cuts | 1,600 graphs | 0 |
| Corollary 2: if greedy is inexact, every optimum is hard | 121 graphs | 0 |
| Proposition 5, every hard optimum | 429 optima | 0 |
| Lemma 7, non-trivial merges in 20,000 graphs | 49 merges | 0 |
| 800 graphs | 0 | |
| 1,577 graphs | 0 | |
| 240 climbs | 0 | |
| 72 graphs | 4 | |
| Theorem 10 condition implies , | 685 graphs | 0 |
| Theorem 10 bound and Corollary 11, | 963 cuts | 0 |
| Weaker condition (pairs other than one part), | 600 graphs | 24 |
Violations of are thus rare and structured: none appeared in random or locally optimized instances, only in instances built from the caterpillar program of Section 5. The last row is expected to fail: it shows that the hypothesis of Theorem 10 cannot be weakened to “the parts other than one are joined among themselves by weight at least ”.
A numerical caveat.. Gomory–Hu trees must be built with care in floating point. In early experiments a widely used library routine for minimum cuts occasionally returned a source side inconsistent with the flow value, because residual capacities of order were treated as usable; the resulting trees were flow-equivalent but not cut-equivalent, and an adversarial search exploited them to produce false counterexamples. The supplementary scripts therefore avoid max-flow routines altogether and verify every tree they use.
8. Open questions
-
A small candidate family for hard instances. Nagamochi and Ibaraki [5] prove that some optimum has a part among cuts listed in nondecreasing order up to the first crossing pair. Can an equally small family be read off a Gomory–Hu tree alone? Theorem 9 rules out its sides. Also trying as a part, for every tree vertex, the set of its leaf neighbours closes the gap in one of the four failures of Section 7 but not in the other three.
-
Hard instances in near-linear time. Outside the hard class, weighted minimum 3-cut is near-linear on planar and bounded-genus graphs (Corollary 4); in general graphs Vaughn's is conditionally optimal. In a plane graph G with dual H, , where MinTheta is the least weight of a theta subgraph, since every plane theta is 3-separating and non-theta optima are found by greedy (Corollary 2(a)). So the question asks for a theta-analogue of the near-linear planar girth algorithms. Can the minimum light theta of a plane graph, one whose three strands are each lighter than the girth of H, be found in time?
-
Larger k, algorithmically. Theorem 10 settles when a global minimum-weight cut is compatible with an optimal k-partition, but exploiting this needs exact j-cuts of the two sides, for which the condition need not hold again. Is there a condition under which the whole recursion, with a global minimum-weight cut at every level, is exact?
-
Hochbaum–Tsai. Their manuscript [7] proving the 4/3 bound is cited in [8] but appears unavailable; it may contain parts of Theorem 1.
Supplementary material
The supplementary material (also the ancillary files of the arXiv version, and the public repository https://github.com/armandorodado/minimum-3cut) contains: (i) a Lean 4 proof of every claim of Theorem 9, checked by kernel evaluation with no additional axioms, together with a script that checks any 7-vertex instance for the properties of Theorem 9 and generates the corresponding Lean proof; (ii) a Lean 4 formalization, for all n, of Theorem 1, Corollaries 2 and 3, Proposition 5, Lemmas 6 and 7, and the 5-vertex example of Section 6. It uses natural-number edge weights, which covers rational weights by scaling, needs no symmetry of the weights, and uses only Lean's standard axioms; and (iii) self-contained Python scripts that reproduce every row of the table in Section 7, the linear program of Section 5, an independent exhaustive check of Theorem 9, and the example of Section 6.
Data availability
No data were used. The code that supports the findings of this article is provided as supplementary material and at https://github.com/armandorodado/minimum-3cut.
Declaration of competing interest
The author declares that he has no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Declaration of generative AI and AI-assisted technologies in the manuscript preparation process
During the preparation of this work the author used Claude (Anthropic) to assist with developing and checking proofs, writing and running the verification code and the Lean formalizations, searching the literature, and drafting the text. After using this tool, the author reviewed and edited the content as needed and takes full responsibility for the content of the published article.
References
[1] Olivier Goldschmidt and Dorit S. Hochbaum. A polynomial algorithm for the k-cut problem for fixed k. Mathematics of Operations Research, 19(1):24–37, 1994.
[2] Sanjiv Kapoor. On minimum 3-cuts and approximating k-cuts using cut trees. In Integer Programming and Combinatorial Optimization (IPCO 1996), volume 1084 of Lecture Notes in Computer Science, pages 132–146. Springer, 1996. doi: 10.1007/3-540-61310-2_11.
[3] Yoko Kamidoi, Shin'ichi Wakabayashi, and Noriyoshi Yoshida. A divide-and-conquer approach to the minimum k-way cut problem. Algorithmica, 32(2):262–276, 2002. doi: 10.1007/s00453-001-0070-2.
[4] Michel Burlet and Olivier Goldschmidt. A new and improved algorithm for the 3-cut problem. Operations Research Letters, 21(5):225–227, 1997. doi: 10.1016/S0167-6377(97)00043-6.
[5] Hiroshi Nagamochi and Toshihide Ibaraki. A fast algorithm for computing minimum 3-way and 4-way cuts. Mathematical Programming, 88(3):507–520, 2000. doi: 10.1007/s101070000183.
[6] Trevor Vaughn. Faster minimum k-cut II: Near-optimal and deterministic for weighted graphs, 2026.
[7] Dorit S. Hochbaum and L.-H. Tsai. A greedy heuristic for the minimum 3-cut problem. Manuscript; cited by Hochbaum and Shmoys (1985), 1983.
[8] Dorit S. Hochbaum and David B. Shmoys. An algorithm for the planar 3-cut problem. SIAM Journal on Algebraic and Discrete Methods, 6(4):707–712, 1985. doi: 10.1137/0606068.
[9] Mingyu Xiao. Finding minimum 3-way cuts in hypergraphs. In Theory and Applications of Models of Computation (TAMC 2008), volume 4978 of Lecture Notes in Computer Science, pages 270–281. Springer, 2008. doi: 10.1007/978-3-540-79228-4_24.
[10] Ralph E. Gomory and T. C. Hu. Multi-terminal network flows. Journal of the Society for Industrial and Applied Mathematics, 9(4):551–570, 1961. doi: 10.1137/0109047.
[11] Monika Henzinger, Jason Li, Satish Rao, and Di Wang. Deterministic near-linear time minimum cut in weighted graphs. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3089–3139, 2024. doi: 10.1137/1.9781611977912.111.
[12] Jakub Łacki and Piotr Sankowski. Min-cuts and shortest cycles in planar graphs in time. In Algorithms – ESA 2011, volume 6942 of Lecture Notes in Computer Science, pages 155–166. Springer, 2011.
[13] Erin W. Chambers, Jeff Erickson, Kyle Fox, and Amir Nayyeri. Minimum cuts in surface graphs. SIAM Journal on Computing, 52(1):156–195, 2023. doi: 10.1137/19M1291820.
[14] Yoko Kamidoi, Noriyoshi Yoshida, and Hiroshi Nagamochi. A deterministic algorithm for finding all minimum k-way cuts. SIAM Journal on Computing, 36(5):1329–1341, 2007.
[15] Mingyu Xiao. An improved divide-and-conquer algorithm for finding all minimum k-way cuts. In Algorithms and Computation (ISAAC 2008), volume 5369 of Lecture Notes in Computer Science, pages 208–219. Springer, 2008.