Skip to content

Chapter 14. Graph Invariants

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 G\mathcal{G} be a class of graphs. A graph invariant is a function

I:GX I : \mathcal{G} \to X

such that whenever

GH, G \cong H,

we have

I(G)=I(H). I(G)=I(H).

Here XX may be a set of numbers, sequences, polynomials, matrices up to equivalence, or truth values.

For example:

InvariantValue type
Number of verticesInteger
Number of edgesInteger
Degree sequenceSequence of integers
Chromatic numberInteger
ConnectednessTruth value
Characteristic polynomialPolynomial
SpectrumMultiset 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

GH, G \cong H,

then GG and HH 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 GG has vertices

{a,b,c} \{a,b,c\}

and edges

{{a,b},{b,c}}. \{\{a,b\},\{b,c\}\}.

Let HH have vertices

{1,2,3} \{1,2,3\}

and edges

{{1,2},{2,3}}. \{\{1,2\},\{2,3\}\}.

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

V(G). |V(G)|.

The size of a graph is

E(G). |E(G)|.

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 55 vertices cannot be isomorphic to a graph with 66 vertices. A graph with 77 edges cannot be isomorphic to a graph with 88 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

1,3,2,2,0, 1,3,2,2,0,

then the degree sequence is

(3,2,2,1,0). (3,2,2,1,0).

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 66 and the disjoint union of two triangles both have degree sequence

(2,2,2,2,2,2), (2,2,2,2,2,2),

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 GG is connected and GHG \cong H, then HH is connected. An isomorphism maps paths in GG to paths in HH.

The number of connected components is also an invariant:

c(G). c(G).

If two graphs have different numbers of components, they cannot be isomorphic.

For example:

GraphNumber of components
Path P5P_51
Cycle C5C_51
Empty graph on 55 vertices5
Disjoint union K3K2K_3 \cup K_22

The invariant c(G)c(G) 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 uu and vv is

d(u,v), d(u,v),

the length of a shortest path between them.

From distances, one obtains:

InvariantDefinition
Diametermaxu,vd(u,v)\max_{u,v} d(u,v)
Radiusminvmaxud(v,u)\min_v \max_u d(v,u)
Eccentricity multisetMultiset of all vertex eccentricities
Wiener indexSum of distances over unordered vertex pairs

The diameter of PnP_n is

n1. n-1.

The diameter of KnK_n, for n2n \geq 2, is

1. 1.

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 \infty.

The circumference is the length of its longest cycle, when such a cycle exists.

The cycle rank, or cyclomatic number, is

E(G)V(G)+c(G). |E(G)|-|V(G)|+c(G).

For a connected graph, this becomes

E(G)V(G)+1. |E(G)|-|V(G)|+1.

This number measures how many independent cycles the graph contains.

For a tree with nn vertices and n1n-1 edges,

EV+1=(n1)n+1=0. |E|-|V|+1 = (n-1)-n+1 = 0.

Thus trees have cycle rank 00.

14.8 Planarity

Planarity is a graph invariant.

A graph is planar if it can be drawn in the plane without edge crossings. If GG is planar and HGH\cong G, then HH 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:

GraphPlanar?
K4K_4Yes
K5K_5No
K3,3K_{3,3}No
Any treeYes
Any cycleYes

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

A A

and

B B

so that every edge has one endpoint in AA and one endpoint in BB.

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:

GraphBipartite?
PnP_nYes
CnC_n with nn evenYes
CnC_n with nn oddNo
Km,nK_{m,n}Yes
K3K_3No

14.10 Chromatic Number

The chromatic number of a graph GG, written

χ(G), \chi(G),

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:

GraphChromatic number
Empty graph on nn vertices1
KnK_nnn
Bipartite graph with at least one edge2
Odd cycle3
Even cycle2

The chromatic number is often hard to compute, but it is structurally important.

14.11 Clique Number and Independence Number

The clique number of GG, written

ω(G), \omega(G),

is the largest number of vertices in a clique of GG.

The independence number, written

α(G), \alpha(G),

is the largest number of vertices in an independent set of GG.

Both are graph invariants.

Complementation exchanges them:

ω(G)=α(G) \omega(G)=\alpha(\overline{G})

and

α(G)=ω(G). \alpha(G)=\omega(\overline{G}).

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

ν(G), \nu(G),

the maximum size of a matching.

A vertex cover is a set of vertices that meets every edge. The vertex cover number is

τ(G), \tau(G),

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:

ν(G)=τ(G). \nu(G)=\tau(G).

For general graphs, they may differ.

14.13 Algebraic Invariants

Matrices associated with a graph produce algebraic invariants.

The adjacency matrix A(G)A(G), the Laplacian matrix L(G)L(G), 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:

InvariantSource
Adjacency spectrumEigenvalues of A(G)A(G)
Laplacian spectrumEigenvalues of L(G)L(G)
Characteristic polynomialdet(λIA)\det(\lambda I-A)
Number of spanning treesLaplacian cofactors
Algebraic connectivitySecond-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 PG(k)P_G(k) counts the number of proper vertex colorings of GG using kk 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 II is complete if

I(G)=I(H) I(G)=I(H)

implies

GH. G \cong H.

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 GG and HH both have six vertices and seven edges. These two invariants do not distinguish them.

Now suppose the degree sequences are

(4,3,3,2,1,1) (4,3,3,2,1,1)

and

(3,3,3,3,1,1). (3,3,3,3,1,1).

The degree sequences differ, so

G≇H. G \not\cong H.

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:

V,E,degree sequence,c(G), |V|, \qquad |E|, \qquad \text{degree sequence}, \qquad c(G),

and still fail to be isomorphic.

Consider:

  1. The cycle C6C_6.
  2. The disjoint union C3C3C_3 \cup C_3.

They have the same order and size:

V=6,E=6. |V|=6, \qquad |E|=6.

They also have the same degree sequence:

(2,2,2,2,2,2). (2,2,2,2,2,2).

But they have different component counts:

c(C6)=1,c(C3C3)=2. c(C_6)=1, \qquad c(C_3\cup C_3)=2.

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,

V(GH)=V(G)+V(H) |V(G\cup H)|=|V(G)|+|V(H)|

and

E(GH)=E(G)+E(H) |E(G\cup H)|=|E(G)|+|E(H)|

when the graphs are vertex-disjoint.

The number of components satisfies

c(GH)=c(G)+c(H). c(G\cup H)=c(G)+c(H).

The chromatic number satisfies

χ(GH)=max(χ(G),χ(H)). \chi(G\cup H)=\max(\chi(G),\chi(H)).

For complements,

degG(v)=V(G)1degG(v). \deg_{\overline{G}}(v)=|V(G)|-1-\deg_G(v).

Understanding how invariants change under operations allows one to build examples and prove structural results.

14.19 Example

Let GG be the graph with

V={a,b,c,d} V=\{a,b,c,d\}

and

E={{a,b},{b,c},{c,d}}. E=\{\{a,b\},\{b,c\},\{c,d\}\}.

Then G=P4G=P_4.

Its order is

4. 4.

Its size is

3. 3.

Its degree sequence is

(2,2,1,1). (2,2,1,1).

It is connected, so

c(G)=1. c(G)=1.

Its diameter is

3. 3.

It is bipartite, so

χ(G)=2. \chi(G)=2.

It has no cycle, so its girth is

\infty

under the usual convention for acyclic graphs.

Its clique number is

2, 2,

because it has edges but no triangles.

Its independence number is

2. 2.

These values do not merely describe one drawing of the path. They describe the abstract graph P4P_4.

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.