It is a bijection that preserves adjacency
Both directions: adjacent vertices map to adjacent vertices, and non-adjacent to non-adjacent.
An isomorphism is a relabelling preserving adjacency. Proving two graphs isomorphic means exhibiting one; proving they are not means finding an invariant that differs.
Core ideas
Isomorphism is Sets, Relations, and Functions's bijection with a structure-preserving condition attached.
Both directions: adjacent vertices map to adjacent vertices, and non-adjacent to non-adjacent.
Matching every invariant you can think of is not a proof of isomorphism. Only an explicit bijection is.
Graph isomorphism is not known to be in P and not known to be NP-complete — an unusual position for a natural problem.
The material
The definition, the invariants, and how to argue each way.
H is a subgraph of G when V(H) ⊆ V(G) and E(H) ⊆ E(G). It is induced by a vertex set S when it contains every edge of G with both ends in S.
Graphs G₁ and G₂ are isomorphic, written G₁ ≅ G₂, when there is a bijection f : V₁ → V₂ such that u and v are adjacent in G₁ if and only if f(u) and f(v) are adjacent in G₂.
Isomorphic graphs are the same graph with different labels and different drawings. Every property expressible in terms of adjacency alone — connectivity, cycle lengths, degrees, colourability — is shared by isomorphic graphs.
Any difference in any invariant proves non-isomorphism, and this is the practical method: check the cheap invariants first and stop at the first disagreement. Agreement on all of them proves nothing.
Take G₁ to be two disjoint triangles and G₂ to be a 6-cycle. Both have 6 vertices, both have 6 edges, and both are 2-regular with degree sequence (2,2,2,2,2,2). They are not isomorphic: G₁ has two components and G₂ has one, and G₁ contains 3-cycles while G₂'s only cycle has length 6.
That example is the standard warning. The degree sequence is the invariant people reach for first, and it is genuinely weak — there are non-isomorphic pairs agreeing on every invariant in the table above.
The only proof is an explicit bijection, verified on every edge. A practical strategy is to use the degrees to narrow the possibilities: a vertex of degree 5 must map to a vertex of degree 5, and often that pins most of the map.
Take the 4-cycle labelled 1–2–3–4–1 and the graph on a,b,c,d with edges ab, bd, dc, ca. Map 1→a, 2→b, 3→d, 4→c. Check all four edges: 12→ab ✓, 23→bd ✓, 34→dc ✓, 41→ca ✓. And there are four edges in each, so no non-edge maps to an edge. Isomorphic.
Deciding isomorphism has no known polynomial-time algorithm and is not known to be NP-complete. It sits in an unusual middle position that very few natural problems occupy. Babai announced a quasi-polynomial algorithm in 2015 — running in time exp((log n)^{O(1)}), faster than exponential and slower than polynomial.
In practice, isomorphism testers handle graphs with thousands of vertices routinely, because real graphs have structure the worst case does not. This is the same gap between worst-case hardness and practical difficulty that Logic and Proof noted for SAT.
Interactive
Your graph, the course's algorithms
Method
Try to disprove first; it is much cheaper.
Vertex count, edge count, degree sequence. Any difference ends the question immediately.
Component count, cycle lengths, triangle count, bipartiteness. These catch most remaining pairs.
Use degrees to constrain it: degree-k vertices must map to degree-k vertices, and neighbourhoods must correspond.
Both directions. A bijection preserving edges but mapping a non-edge to an edge is not an isomorphism — though for graphs with equal edge counts, preserving edges is enough.
G₁: 6-cycle. G₂: two disjoint triangles.
This asymmetry is the whole method. Disproving is a matter of finding one difference, and proving requires exhibiting a bijection — which is why every practical algorithm spends its time trying to disprove.
Given two graphs on eight vertices, list the invariants you would check and in what order. Cheapest first, and stop at the first disagreement.
Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.
No recommendations yet for this lesson.