How this calculation works
Split an even number of vertices into two equal-size groups while minimizing the total weight of edges crossing between them. The answer includes both groups and their crossing edges. Equal cardinality is enforced throughout the search, preventing an inexpensive one-vertex separation from masquerading as a balanced partition.
min_{A⊂V, |A|=n/2} Σ_{uv∈E} w_uv 1[(u∈A) XOR (v∈A)].A worked example
Unit C6: A={1,2,3}, B={4,5,6}, crossing edges 3–4 and 1–6, cost 2. Every proper nonempty cycle subset has at least two boundary edges.
Good to know
Simple undirected graph, even n=2–18, integer weights 0–1,000,000. Exhaustive balanced subsets with one side anchored; groups need not be connected. No vertex-load balancing.
Reference: Method reference (opens in a new tab) ↗
What is balanced here
A bisection has exactly n divided by two vertices on each side. Balance refers to vertex counts, while edge weights measure separation cost; the calculator does not balance population, processor load or total weight attached to vertices.
Every unordered edge with endpoints on opposite sides contributes its weight once. Edges entirely within either group contribute zero, even if their weights are large, because the objective is crossing cost rather than total retained weight.
Compare this with the Minimum edge cut calculator with edge disjoint path witnesses. An unrestricted minimum cut can isolate one vertex and need not be balanced.
Enumerating the feasible partitions
The search examines every subset of half the vertices and its complementary side. Vertex one is anchored in the first side so that swapping the names of the two groups does not produce a duplicate candidate.
At eighteen vertices there are 24,310 such anchored partitions. Completing all candidates certifies the minimum cost; returning one attractive split from a local search would establish feasibility without establishing that no cheaper balanced split exists.
Checking the six-cycle example
The default graph is the cycle 1–2–3–4–5–6–1 with every edge weighted one. Taking vertices 1, 2, 3 against vertices 4, 5, 6 cuts only edges 3–4 and 1–6, so the displayed cost is two.
Every nonempty proper subset of a cycle has at least two boundary edges. Since a three-versus-three bisection is nonempty on both sides, its cost cannot be below two, proving that the shown partition is optimal.
Why unrestricted cuts can differ
A minimum cut with no size requirement may isolate a single weakly attached vertex. That is often useful for vulnerability analysis, but it can violate the equal-group requirement that makes a bisection suitable for certain partitioning tasks.
Even a source-to-target cut can produce highly uneven sides because it constrains terminal separation rather than cardinality. Do not compare the two objective values as if they were results for identical feasible sets.
Preparing weights and vertices
Use an even vertex count from two through eighteen. Edge rows contain unique undirected endpoint pairs and nonnegative integer costs through one million. Zero-cost edges are permitted, while duplicate pairs and self-loops are rejected.
Vertices absent from the edge list still count toward group sizes. This matters for isolates: moving an isolate can rebalance a partition without affecting cut cost, so omitting it from the declared vertex count changes the optimization.
Interpreting zero cost and ties
A zero optimum means a balanced split exists with no positive-cost crossing edges. It need not mean there are no crossing rows at all, because entered zero-cost edges can still connect the sides without contributing to the objective.
Many partitions may attain the same minimum. The calculator returns one deterministic witness rather than every optimum, and group labels A and B carry no substantive rank, priority or preference beyond the vertex-one convention.
Limits of the partition model
The search imposes equal cardinalities and nothing else. It does not require either side to induce a connected graph, and it does not constrain particular vertices to stay together or apart unless the resulting input structure enforces that indirectly.
The bounded integer model supports exact comparisons. Odd vertex counts, weighted vertex loads, directed cuts, negative edge incentives and partitions into more than two groups are distinct problems requiring different constraints and interpretations.
A few questions, answered
Can I use an odd number of vertices?
No. This page requires two groups with exactly equal cardinalities.
Must each group be connected?
No. The only group constraint is equal vertex count.
Can zero-weight edges cross an optimum?
Yes. They contribute zero to the reported crossing cost.
Are A and B different solutions when swapped?
No. Vertex one is anchored in A to identify complementary copies.