A graph invariant is a quantity or property that depends only on the structure of a graph, not on the names of its vertices, the order in which the vertices are listed, or the way the graph is drawn. If two graphs are isomorphic, then every graph invariant has the same value on both graphs. This is the defining idea: graph invariants are preserved under isomorphism.
Graph invariants are used to describe graphs, compare graphs, rule out isomorphism, state theorems, and organize graph classes. They are not usually enough to determine a graph completely, but they give compact structural information.
14.1 Definition
Let be a class of graphs. A graph invariant is a function
such that whenever
we have
Here may be a set of numbers, sequences, polynomials, matrices up to equivalence, or truth values.
For example:
| Invariant | Value type |
|---|---|
| Number of vertices | Integer |
| Number of edges | Integer |
| Degree sequence | Sequence of integers |
| Chromatic number | Integer |
| Connectedness | Truth value |
| Characteristic polynomial | Polynomial |
| Spectrum | Multiset of eigenvalues |
A graph property is often a Boolean invariant. It answers yes or no. For example, “is connected,” “is bipartite,” and “is planar” are graph properties.
14.2 Isomorphism and Invariance
Graph invariants are tied to isomorphism.
If
then and have the same abstract structure. Their vertices may have different names, and their drawings may look different, but their adjacency pattern is the same.
An invariant must ignore superficial representation.
For example, suppose has vertices
and edges
Let have vertices
and edges
These graphs are isomorphic. Both are paths on three vertices. Therefore they have the same order, size, degree sequence, diameter, chromatic number, and number of components.
14.3 Order and Size
The simplest graph invariants are order and size.
The order of a graph is
The size of a graph is
If two graphs are isomorphic, their vertex sets have the same cardinality and their edge sets have the same cardinality. Hence order and size are invariants.
These invariants are weak but useful. If two graphs have different order or different size, they cannot be isomorphic.
For example, a graph with vertices cannot be isomorphic to a graph with vertices. A graph with edges cannot be isomorphic to a graph with edges.
14.4 Degree Sequence
The degree sequence of a finite graph is the list of vertex degrees, usually sorted in nonincreasing order.
If the degrees are
then the degree sequence is
The degree sequence is a graph invariant. An isomorphism preserves adjacency and incidence, so it preserves the degree of each corresponding vertex.
If two graphs have different degree sequences, they cannot be isomorphic.
The converse does not hold. Two non-isomorphic graphs may have the same degree sequence.
For example, a cycle of length and the disjoint union of two triangles both have degree sequence
but one graph is connected and the other is disconnected.
14.5 Connectedness and Number of Components
Connectedness is a graph property. It is invariant under isomorphism.
If is connected and , then is connected. An isomorphism maps paths in to paths in .
The number of connected components is also an invariant:
If two graphs have different numbers of components, they cannot be isomorphic.
For example:
| Graph | Number of components |
|---|---|
| Path | 1 |
| Cycle | 1 |
| Empty graph on vertices | 5 |
| Disjoint union | 2 |
The invariant gives global information that the degree sequence may miss.
14.6 Distance Invariants
Distances give several graph invariants.
For a connected graph, the distance between vertices and is
the length of a shortest path between them.
From distances, one obtains:
| Invariant | Definition |
|---|---|
| Diameter | |
| Radius | |
| Eccentricity multiset | Multiset of all vertex eccentricities |
| Wiener index | Sum of distances over unordered vertex pairs |
The diameter of is
The diameter of , for , is
Distance invariants describe how spread out a connected graph is.
14.7 Cycle Invariants
Cycle structure gives important invariants.
The girth of a graph is the length of its shortest cycle. If the graph has no cycles, the girth is often taken to be .
The circumference is the length of its longest cycle, when such a cycle exists.
The cycle rank, or cyclomatic number, is
For a connected graph, this becomes
This number measures how many independent cycles the graph contains.
For a tree with vertices and edges,
Thus trees have cycle rank .
14.8 Planarity
Planarity is a graph invariant.
A graph is planar if it can be drawn in the plane without edge crossings. If is planar and , then is also planar, because the same abstract adjacency structure can be drawn in the same crossing-free way after relabeling.
Planarity is a property, rather than a numerical invariant.
Examples:
| Graph | Planar? |
|---|---|
| Yes | |
| No | |
| No | |
| Any tree | Yes |
| Any cycle | Yes |
Planarity depends on the existence of some crossing-free drawing, not on a particular drawing. A graph may be drawn with crossings even when it is planar.
14.9 Bipartiteness
Bipartiteness is another graph property.
A graph is bipartite if its vertex set can be partitioned into two sets
and
so that every edge has one endpoint in and one endpoint in .
Bipartiteness is invariant under isomorphism. Relabeling vertices does not change whether such a partition exists.
A graph is bipartite if and only if it has no odd cycle.
Thus the property can be detected through cycle structure.
Examples:
| Graph | Bipartite? |
|---|---|
| Yes | |
| with even | Yes |
| with odd | No |
| Yes | |
| No |
14.10 Chromatic Number
The chromatic number of a graph , written
is the minimum number of colors needed to color the vertices so that adjacent vertices receive different colors.
The chromatic number is a graph invariant. If two graphs are isomorphic, a valid coloring of one transfers to a valid coloring of the other.
Examples:
| Graph | Chromatic number |
|---|---|
| Empty graph on vertices | 1 |
| Bipartite graph with at least one edge | 2 |
| Odd cycle | 3 |
| Even cycle | 2 |
The chromatic number is often hard to compute, but it is structurally important.
14.11 Clique Number and Independence Number
The clique number of , written
is the largest number of vertices in a clique of .
The independence number, written
is the largest number of vertices in an independent set of .
Both are graph invariants.
Complementation exchanges them:
and
These invariants measure two opposite kinds of structure: complete adjacency and complete non-adjacency.
14.12 Matching and Covering Invariants
Matchings and covers also define invariants.
A matching is a set of edges no two of which share an endpoint. The matching number is
the maximum size of a matching.
A vertex cover is a set of vertices that meets every edge. The vertex cover number is
the minimum size of a vertex cover.
Both quantities are preserved under isomorphism.
For bipartite graphs, these two invariants are connected by König’s theorem:
For general graphs, they may differ.
14.13 Algebraic Invariants
Matrices associated with a graph produce algebraic invariants.
The adjacency matrix , the Laplacian matrix , and the signless Laplacian matrix are examples. Since a relabeling of vertices permutes rows and columns, quantities unchanged under simultaneous row-column permutation are graph invariants.
Important algebraic invariants include:
| Invariant | Source |
|---|---|
| Adjacency spectrum | Eigenvalues of |
| Laplacian spectrum | Eigenvalues of |
| Characteristic polynomial | |
| Number of spanning trees | Laplacian cofactors |
| Algebraic connectivity | Second-smallest Laplacian eigenvalue |
Algebraic invariants are central in spectral graph theory, network analysis, chemistry, and combinatorial optimization.
14.14 Polynomial Invariants
Some graph invariants are polynomials.
The chromatic polynomial counts the number of proper vertex colorings of using colors.
The Tutte polynomial is a more general invariant that encodes several other graph quantities.
Polynomial invariants can contain more information than a single number. Their values may specialize to count colorings, flows, spanning trees, connected subgraphs, or other structures.
However, polynomial invariants are not usually complete. Non-isomorphic graphs may have the same chromatic polynomial or the same Tutte polynomial.
14.15 Complete Invariants
A graph invariant is complete if
implies
A complete invariant distinguishes every pair of non-isomorphic graphs.
Most familiar invariants are not complete. Order and size are not complete. Degree sequence is not complete. Spectrum is not complete. Chromatic polynomial is not complete.
A canonical labeled form of a graph can be viewed as a complete invariant, but computing such a form efficiently is closely related to the graph isomorphism problem. In general, easily computable invariants help rule out isomorphism, but equal invariant values do not prove isomorphism.
14.16 Using Invariants to Disprove Isomorphism
Graph invariants are often used negatively.
If two graphs differ in any invariant, then they are not isomorphic.
For example, suppose and both have six vertices and seven edges. These two invariants do not distinguish them.
Now suppose the degree sequences are
and
The degree sequences differ, so
No further comparison is needed.
This is the common practical use of invariants: they quickly eliminate impossible isomorphisms.
14.17 Equal Invariants Do Not Prove Isomorphism
Equal invariants give evidence, but not proof, unless the invariant is complete.
For example, two graphs may have the same:
and still fail to be isomorphic.
Consider:
- The cycle .
- The disjoint union .
They have the same order and size:
They also have the same degree sequence:
But they have different component counts:
Adding the component count distinguishes them. Yet in other cases, many common invariants may still agree.
14.18 Invariants Under Operations
Graph operations affect invariants in predictable ways.
For disjoint union,
and
when the graphs are vertex-disjoint.
The number of components satisfies
The chromatic number satisfies
For complements,
Understanding how invariants change under operations allows one to build examples and prove structural results.
14.19 Example
Let be the graph with
and
Then .
Its order is
Its size is
Its degree sequence is
It is connected, so
Its diameter is
It is bipartite, so
It has no cycle, so its girth is
under the usual convention for acyclic graphs.
Its clique number is
because it has edges but no triangles.
Its independence number is
These values do not merely describe one drawing of the path. They describe the abstract graph .
14.20 Summary
A graph invariant is a value or property preserved by graph isomorphism. It depends on the abstract adjacency structure, not on labels or drawings.
Basic invariants include order, size, degree sequence, component count, diameter, girth, chromatic number, clique number, independence number, matching number, spectra, and graph polynomials.
Invariants are essential tools for comparison. If two graphs differ in any invariant, they cannot be isomorphic. If many invariants agree, the graphs may still be non-isomorphic unless the invariant used is complete. Graph theory uses invariants to classify graphs, state theorems, design algorithms, and expose structure.