core22 min studyLesson 211 in Mathematics

Graph models, degrees, and isomorphism

Choose a graph model, double-count its incidences, and distinguish relabeling from a change of structure.

On this page

What you’ll understand

  • Specify the vertices, edges, and conventions of a graph model.
  • Use degree counts to rule out impossible graphs.
  • Test isomorphism with invariants and an explicit adjacency-preserving bijection.

A graph records which objects are related while discarding features irrelevant to that relationship. Stations can become vertices and direct rail connections can become edges. The mathematical work begins before drawing: decide whether direction matters, whether two distinct connections may join the same pair, and whether an object can connect to itself. Different choices answer different questions about the same system.

State the model before counting

A finite simple undirected graph is a pair G=(V,E)G=(V,E), where VV is a finite vertex set and every edge is a two-element subset of VV. Thus an edge has distinct endpoints, there is no direction, and a given pair supports at most one edge. Vertices without incident edges still belong to the graph. A drawing is a representation of this data; positions, distances, and crossings do not become mathematical structure unless the model explicitly includes them.

Directed graphs instead use ordered pairs, and multigraphs may distinguish several edges with the same endpoints. A railway model might need parallel edges to record different lines, whereas a friendship model might deliberately merge repeated interactions. Weighted graphs attach additional numbers, such as travel times. Before applying a theorem, check its conventions: the degree formulas below concern undirected graphs, and a loop, if allowed in a different convention, contributes two incidences at its single endpoint.

G=(V,E),E⊆{{u,v}:u,v∈V, u≠v}G=(V,E),\qquad E\subseteq \bigl\{\{u,v\}:u,v\in V,\ u\ne v\bigr\}
The edge set of a simple undirected graph is a set of unordered pairs of distinct vertices.↔ Scroll wide equations horizontally.

Count the same incidences twice

The degree d(v)d(v) counts edges incident with vertex vv. Add all degrees and inspect a single edge: it appears once at each endpoint, so it contributes exactly two. This gives the handshake identity. In particular the degree sum is even, and the number of odd-degree vertices is even because even summands do not affect parity. These are necessary conditions on a proposed degree list, not a complete test for whether that list is realizable by a simple graph.

For example, the list (3,3,0,0)(3,3,0,0) has an even sum and each entry is at most three, but no simple graph on four vertices realizes it. A degree-three vertex must meet every other vertex, contradicting the two claimed isolated vertices. Local bounds and a global count can both pass while adjacency constraints still fail. This distinction is useful when checking network data: an arithmetic consistency check catches some errors without certifying that the underlying records form the intended graph.

∑v∈Vd(v)=2∣E∣,∣{v∈V:d(v) is odd}∣≡0(mod2)\sum_{v\in V}d(v)=2|E|,\qquad \bigl|\{v\in V:d(v)\text{ is odd}\}\bigr|\equiv0\pmod 2
Every edge supplies two incidences; reducing the sum modulo two gives the odd-degree parity rule.↔ Scroll wide equations horizontally.

Relabeling preserves relationships

An isomorphism from GG to HH is a bijection between their vertex sets that preserves adjacency in both directions. Names may change, but the pattern of connections must survive. Vertex count, edge count, the sorted degree list, connectedness, and the presence of triangles are therefore invariants. A mismatch proves that no isomorphism exists. Matching invariants provide evidence worth investigating, but do not replace an actual adjacency-preserving bijection.

A six-cycle and two disjoint triangles both have six vertices, six edges, and six degree-two vertices. They are not isomorphic because the first graph is connected and the second is not. Conversely, two differently drawn four-cycles are isomorphic once their cyclic orders are matched. A reliable proof gives the proposed map and checks every edge and nonedge, or explains why a structural description guarantees both. This is the first example of a recurring strategy: use inexpensive invariants to reject candidates, then construct a witness to establish the positive claim.

Check a four-vertex record

Let V={a,b,c,d}V=\{a,b,c,d\} and E={ab,ac,bc,cd}E=\{ab,ac,bc,cd\}, where abab abbreviates the unordered pair. Compute the degrees, then compare this graph with the four-cycle.

  1. List neighbors rather than counting marks in a drawing: a meets b and c; b meets a and c; c meets a, b, and d; d meets c.

  2. The degree list is (2,2,3,1)(2,2,3,1), whose sum is eight. Dividing by two recovers the four listed edges, so the incidence count agrees with the record.

  3. A four-cycle has all four degrees equal to two. An isomorphism preserves each vertex degree, so the differing sorted degree lists already rule out an isomorphism. No search through vertex permutations is needed.

The result

The record has four edges and two odd-degree vertices; it is not isomorphic to the four-cycle.

Explore the model

Interactive lab

Interactive lab · modular

Relabel a cyclic connection pattern

Pause and Reset, then set modulus m = 6 and additive step a = 1. Predict all six labels will be visited before zero returns; Step six times. Reset again and set both m = 6 and a = 5. Compare the reversed visit order with the unchanged six-vertex cycle structure. The instrument follows directed modular addition; the undirected cycle comparison here forgets arrow direction.

Relabel a cyclic connection patternAddition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Current readings: Residue r0: 0; Orbit period · m/gcd(m,a): 12; Distinct residues visited: 1 of 12. All parameters are adjustable with the labeled controls below.Repeated addition modulo 12: the current residue is 0, and the orbit period is 12.01234567891011+ 5mod 12An additive orbitn = 0rₙ = 0Period = 12Cycle starts at 0:0 → 5 → 10 → 3 →8 → 1 → 6 → 11 →4 → 9 → 2 → 7 → 0Exact residues · two additions per second
Additive orbitCurrent residue / next edge
Residue r0
0
Orbit period · m/gcd(m,a)
12
Distinct residues visited
1 of 12
t = 0 s

Addition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forDifferent label orders can describe the same undirected adjacency pattern; one orbit does not test arbitrary graph isomorphism.

Check your understanding

Which pair of observations proves that two finite simple graphs cannot be isomorphic?

Try it yourself

Two simple graphs have degree lists (2,2,2,2,2,2)(2,2,2,2,2,2) and six edges. One is connected and the other has two components. Can they be isomorphic? Give an example of each and explain why degree information alone misses the difference.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Try a cycle on six vertices and cycles on three vertices. Ask what an adjacency-preserving map does to a path connecting two vertices.

Compare with the solution

Use the six-cycle and the disjoint union of two triangles. Both have the stated degree list and edge count, but an isomorphism maps every path to a path. It therefore preserves the number of connected components, so these graphs cannot be isomorphic. The degree list records each vertex's local number of neighbors, while connectedness depends on how those neighborhoods fit together across the entire graph.

Take it with you

  • Choose simple, directed, weighted, or multiple-edge conventions explicitly.
  • An even degree sum is necessary but does not certify a simple degree sequence.
  • Isomorphism requires preserved adjacency; equal basic invariants are insufficient.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.