Advanced maths

Graph toughness calculator with a separating vertex set

Minimize the number of removed vertices divided by the number of surviving connected components.

Your numbers

Vertices are labeled 0 through n−1, including isolated vertices.
One edge per line: u,v. No loops or duplicate pairs. Blank means no edges.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Minimize the number of removed vertices divided by the number of surviving connected components. Return a separating set and its components, with explicit conventions for complete and disconnected graphs.

THE FORMULAτ(G)=min_{S⊆V, c(G−S)>1} |S|/c(G−S); τ(K_n)=∞; disconnected graphs have τ=0.

A worked example

For the star centered at 0 with leaves 1,2,3, removing {0} leaves three singleton components. The ratio is 1/3, and exhaustive subset comparison confirms that no smaller ratio exists.

Good to know

Simple undirected graphs with 1–14 vertices. Enumerates all 2^n deletion sets; only sets leaving at least two components qualify. Infinite toughness is returned as the string Infinity, never a finite placeholder. No Hamiltonicity conclusion is inferred.

A ratio rather than a cut size

Toughness compares the effort of removing vertices with the number of pieces that removal produces. A separator of size two producing four components has ratio one half. Another separator of size one producing two components has the same ratio, despite requiring fewer deleted vertices.

This distinction makes toughness different from vertex connectivity. Searching only minimum-cardinality cuts can miss the best ratio, because a larger cut may create disproportionately many components. The calculator therefore examines every vertex subset, including the empty subset, rather than stopping after finding the first separator.

The star separator gives toughness one thirdDelete the center0123Three surviving components1231 removed ÷ 3 components = 1/3
Scroll across to see the full diagram.
For the star centered at 0 with leaves 1,2,3, removing {0} leaves three singleton components. The ratio is 1/3, and exhaustive subset comparison confirms that no smaller ratio exists.

Compare this with the Minimum vertex cut calculator with disjoint paths. Minimize the ratio of removed vertices to remaining components,not just the number removed.

Describe an undirected network

Enter a vertex count and one unordered endpoint pair per edge row. All vertices from zero to n−1 exist, even if they never appear in the edge list. A blank edge list represents isolated vertices; it does not delete the vertices themselves or imply missing data.

Loops, repeated unordered pairs, fractional endpoints and endpoints outside the declared range are rejected. For a directed network, choose a specific undirected interpretation before using this page. The calculator does not silently decide whether an arc should represent a weak connection, a reciprocal connection or a directed reachability requirement.

Check the star calculation

In the four-vertex default star, vertex 0 is the sole connection among the three leaves. Remove it and the remaining graph has components {1}, {2} and {3}. The numerator is one and the denominator is three, giving toughness one third rather than one.

Deleting only a leaf leaves a connected smaller star, so that subset is ineligible. Deleting the center together with a leaf leaves two components and gives ratio two over two, which is larger. Larger deletions cannot improve on the displayed one-third certificate for this graph.

Understand the candidate comparison

For each subset S, the algorithm computes the connected components of the induced graph on the vertices outside S. It ignores candidates with zero or one component, because the toughness denominator is defined only for a genuine separation into at least two remaining pieces.

Every eligible subset contributes its cardinality divided by that component count. The smallest ratio is retained alongside the actual deleted labels and surviving components. The search has no heuristic early termination. For an accepted graph it completes all subsets, allowing the final minimum to be called exact.

Handle zero and infinity correctly

A disconnected graph already has more than one component before any deletion. Choosing the empty set therefore gives ratio zero, which cannot be improved by a negative ratio. The witness will show no removed vertices and the original connected components rather than inventing a nonempty cut.

For a complete graph, every nonempty surviving induced graph is connected. There is no eligible separating set, so toughness is infinite by convention. Infinity is not a large estimate or a numerical overflow. A single vertex is complete and receives the same convention, although its practical interpretation is trivial.

Use the witness without overclaiming

The removed list explains which vertices realize the minimum, and the component lists explain the denominator. Count their entries to recompute the ratio. A competing separator with an equal ratio may exist, so a different vertex labeling can produce a different but equally valid minimum witness.

Toughness has important relationships with cycle and factor existence, but the calculator does not assert that a graph is Hamiltonian from its score. A graph parameter can supply necessary conditions without supplying a complete decision test. Use a dedicated cycle search when the actual cycle is required.

Scale and comparison limits

Fourteen vertices produce at most 16384 deletion subsets. Each subset still requires a component computation, so the exponential subset count determines the practical boundary. The limit is on declared vertices, including isolates, rather than only on vertices incident to at least one edge.

The displayed fraction uses integer numerator and denominator from the chosen witness, with the quotient reported numerically. It need not be presented in lowest terms to be verifiable. Compare graphs under the same simple, undirected convention, and inspect disconnectedness before treating zero as a subtle robustness finding.

A few questions, answered

Why is a complete graph infinite?

No vertex deletion leaves two nonempty components, so no finite separating ratio exists.

Can a disconnected graph have positive toughness?

No. The empty deletion set gives ratio 0.

Why not search minimum cuts only?

A larger cut can create enough additional components to lower the ratio.

Does toughness certify a Hamilton cycle?

No. This calculator reports a graph parameter and its separator witness, not a Hamiltonicity decision.

Find your calculator

Start typing to explore the library.