Advanced maths

Coarsest equitable graph partition calculator

Refine an initial vertex partition until every vertex in a cell has the same number of neighbors in each cell.

Your numbers

Each row: from,to; optional third weight. Empty allowed for an edgeless graph.

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

Refine an initial vertex partition until every vertex in a cell has the same number of neighbors in each cell. The page returns the coarsest equitable refinement, its per-vertex neighbor-count quotient and refinement history. It avoids equating indistinguishable neighbor counts with proven graph symmetry.

THE FORMULAu,v in same cell ⇒ equal neighbor counts into every cell.

A worked example

For a four-vertex path starting in one cell, degrees first split endpoints {0,3} from interiors {1,2}. Every endpoint sees one interior; every interior sees one endpoint and one interior. Two cells are stable.

Good to know

Undirected n≤30; coarsest equitable refinement preserving initial distinctions. Cells need not equal automorphism orbits; per-vertex quotient can be asymmetric.

Start from a partition with a stated meaning

Each vertex receives an initial nonnegative integer cell label. Equal labels mean the vertices begin in the same cell; different labels are distinctions the refinement must preserve. The numeric magnitude of a label has no role, so labels ten and twenty are not farther apart than labels zero and one.

A single initial cell asks for refinement based on graph structure alone. Multiple initial cells can encode externally known types that must remain separate. Choosing those types changes the problem. The algorithm refines the supplied partition and never merges cells merely because their later neighbor-count patterns happen to match.

Equitable refinement separates endpoint and interior neighbor counts0123Cells: {0,3} and {1,2}Endpoint counts: (0,1)Interior counts: (1,1)Stable partition
For a four-vertex path starting in one cell, degrees first split endpoints {0,3} from interiors {1,2}. Every endpoint sees one interior; every interior sees one endpoint and one interior. Two cells are stable. Diagram is schematic; labels specify the numerical values.

The Graph edit distance calculator for two small graphs optimizes a correspondence between two graphs. Equitable cells summarize one graph and need not coincide with its symmetry orbits, so equal quotient counts are not an isomorphism certificate.

Define equitability through counts into every cell

For any two vertices in one cell, count their neighbors in each partition cell. Equitability requires the complete count vectors to agree. Equal total degree is necessary within a stable cell but is not always sufficient, because neighbors can be distributed differently across the other cells.

The graph is simple and undirected, and optional weights are ignored. These are integer neighbor counts, not summed edge weights or transition probabilities. A weighted equitable partition would require another definition and should not be inferred from the presence of a third number on an edge row.

Follow refinement on a four-vertex path

Start with all four path vertices in one cell. The endpoints have degree one while the two interior vertices have degree two, so the first refinement separates them into cells {zero,three} and {one,two}. Their structural labels may be renumbered without affecting the partition.

Each endpoint sees zero endpoints and one interior vertex. Each interior vertex sees one endpoint and one interior vertex. Those count vectors are constant within the two cells, so the partition is stable. The answer has two cells rather than four; vertices need not become singletons for the refinement to be valid.

Read the refinement process as repeated splitting

At each round, a vertex signature contains its current cell and its neighbor counts into all current cells. Vertices with different signatures split. Including the current cell prevents any old distinction from being lost. Because a strict split increases the number of cells, the process stabilizes after finitely many rounds.

The final partition is the coarsest equitable one refining the initial partition. It does not search arbitrary unrelated partitions for the fewest cells. Calling the result globally coarsest without mentioning the starting distinctions would conceal important input information, particularly when some vertices begin in singleton cells.

Interpret quotient entries as per-vertex counts

Entry Qij is the number of neighbors in cell j of any one vertex in cell i. Equitability guarantees that the choice of representative in cell i does not matter. The output uses those per-vertex counts rather than the total number of edges between the two cells.

Even for an undirected graph, Q can be asymmetric when cells have different sizes. The consistency relation is |Ci|Qij=|Cj|Qji. In the path example, the two equal-sized cells happen to give symmetric cross counts, but symmetry is not a general requirement and an asymmetric quotient is not automatically a bug.

Separate refinement cells from automorphism orbits

Graph automorphisms preserve adjacency and therefore preserve the structural distinctions found by a compatible refinement. The converse is not guaranteed: two vertices can remain in one equitable cell without any automorphism mapping one to the other. Equal neighbor-count signatures are weaker than a complete isomorphism or symmetry proof.

This is why the tool is not presented as a graph-automorphism classifier. If all vertices begin in a single cell, regular graphs can remain in that cell even when their deeper structure differs. Refinement is useful information but should not be overstated as a complete structural identification algorithm.

Use the stable partition as a checkable abstraction

The table lists vertices in each cell and the corresponding quotient row. You can independently count neighbors from every listed vertex to verify that the row is shared. The recorded history helps locate when a chosen starting distinction propagates to other vertices through the graph.

Applications can use such partitions for structured aggregation, but preserving neighbor counts does not automatically preserve every dynamics, weight or measurement on the graph. The form supports at most thirty vertices and only this topology-based refinement. State what the initial labels encode before using the quotient as an abstraction of a real network.

A few questions, answered

Can different initial cells be merged later?

No. Refinement preserves every initial distinction and only splits cells.

Does one final cell prove its vertices are symmetric?

No. Equitable cells can be larger than automorphism orbits; neighbor-count equality is not a complete symmetry proof.

Why can the quotient be asymmetric for an undirected graph?

Entries are per-vertex counts. Cell-size-weighted counts satisfy |Ci|Qij=|Cj|Qji.

Do large numeric cell labels imply greater distance?

No. Labels identify cells only; their numerical magnitudes are irrelevant.

Find your calculator

Start typing to explore the library.