Lecture 9
Lecture 9
1 Isomorphic graphs
1.1 Two isomorphic families
As a motivating example, consider the following two families of graphs. (The first is defined for all
n ≥ 3, the second for all n ≥ 5.)
• Let Cn be the cycle graph, with vertices v1 , v2 , . . . , vn and edges vi vi+1 for i = 1, . . . , n − 1,
as well as vn v1 .
• Let Dn be the graph with vertices w1 , w2 , . . . , wn and edges wi wi+2 for i = 1, . . . , n−2, as well
as wn−1 w1 and wn w2 . (As far as I know, neither this graph nor the notation Dn is relevant
outside this example.)
Here is an example of each graph:
v1 w1
v7 v2 w7 w2
C7 D7
v6 v3 w6 w3
v5 v4 w5 w4
Are C7 and D7 the same graph? Well, definitely not: they don’t even have the same set of vertices.
Even if we did change all the w’s to v’s, the graphs still wouldn’t be the same: they would have
different sets of edges.
At the same time, if we look at these two graphs the right way, they have the same structure. The
following diagrams reveal the similarity:
v1 v2 v3 v4 v5 v6 v7 w2 w4 w6 w1 w3 w5 w7
1
2. f preserves adjacency—for any two vertices v, w ∈ V (G), v and w are adjacent in G if and
only if f (v) and f (w) are adjacent in H.
Two graphs are isomorphic if there is an isomorphism from one graph to the other. In which
direction? It doesn’t matter: because we defined f to be a bijection in the definition above, it has
an inverse f −1 : V (H) → V (G), and we can check that f −1 is an isomorphism from H to G.
In this example, the two identical-looking diagrams correspond to the following isomorphism
from C7 to D7 :
x v1 v2 v3 v4 v5 v6 v7
f (x) w2 w4 w6 w1 w3 w5 w7
(This table is a clearer way to write out that f (v1 ) = w2 , f (v2 ) = w4 , and so on.)
Intuitively speaking, two graphs are isomorphic if they’re “the same graph, but with different names
for the vertices”. The graph isomorphism is a dictionary that translates between vertex names in G
and vertex names in H.
We can say more:
Claim 1.1. For all odd n ≥ 3, Cn and Dn are isomorphic.
Proof. A proof-writing note, first: to prove the general claim, we should find a general rule for an
isomorphism from Cn to Dn . Typically, this is done by looking at small examples and generalizing,
but it’s good to look for options that will generalize well. In the case of C7 and D7 , there’s 14
possible automorphisms and some are easier to generalize than others.
The automorphism in the example above, however, was chosen to be the one that generalizes the
best. Its generalization is given by the following function from {v1 , . . . , vn } to {w1 , . . . , wn }:
(
w2i if i < n/2
f (vi ) =
w2i−n if i > n/2.
This is a bijection: the first case of the definition always gives us a vertex wj where j is even, and
the second case always gives us a vertex wj where j is odd, so for any j, we know which case to
look at to find an inverse f −1 (wj ).
At this point, working directly from the definition, we should be checking for every pair of vertices
in Cn whether f preserves their relationship in Dn . There is a common shortcut, however. First,
we observe that Cn and Dn both have n edges. This means that if we check that f takes edges
of Cn to edges of Dn , we’ll be done; this “uses up” all n edges of Dn , so f will also take non-edges
of Cn to non-edges of Dn .
Let’s go through all the edges of Cn in four cases:
1. First, consider edges vi vi+1 where i + 1 < n/2. We get f (vi ) = w2i and f (vi+1 ) = w2i+2 ,
which are indeed adjacent in Dn .
2. Second, consider edges vi vi+1 where i > n/2. We get f (vi ) = w2i−n and f (vi+1 ) = w2i+2−n ,
which are also adjacent in Dn .
2
3. One special case we’ve missed is vn v1 , which doesn’t follow the pattern. We get f (vn ) = wn
and f (v1 ) = w2 , and these are adjacent in Dn .
4. The other special case is vi vi+1 for i = n−1 n+1
2 and i + 1 = 2 , because here, different cases of f
apply to vi and vi+1 . We get f (vi ) = w2i = wn−1 and f (vi+1 ) = w2i+2−n = w1 , and these are
adjacent in Dn .
In all cases, vertices adjacent in Cn are sent to vertices adjacent in Dn by f , completing our check
that f is an isomorphism.
Proof. The graph Cn is connected: for any vi and vj , if i < j, then the path (vi , vi+1 , . . . , vj )
connects them, and if i > j, just reverse the path from vj to vi .
The graph Dn is not connected when n is even: there is no edge from any of the vertices
{w1 , w3 , w5 , . . . , wn−1 }
The implied rule is: when two graphs are isomorphic and one is connected, so is the other, so
checking that Cn is connected and Dn isn’t proves that they can’t be isomorphic. This is something
we can prove directly: if f is an isomorphism from G to H, and G is connected, then we can use f
to turn any path in G into a path in H, letting us find a path in H between any two vertices.
It’s also a general principle, though. Any property that depends only on the structure of a graph—
not on, say, the way the vertices are labeled, or the way that they’re ordered, or the way that the
graph is drawn—should be preserved by isomorphism. For example, if G is isomorphic to H, then
we can say that:
• G and H have the same number of vertices and edges.
• G and H have the same number of connected components.
• G is bipartite if and only if H is bipartite.
• G and H have the same diameter.
3
• G and H have the same degree sequence; in particular, the same minimum degree and the
same maximum degree. We can be more precise: if f is a graph isomorphism from G to H,
and v is a vertex of G, then degG (v) = degH (f (v)).
Sometimes, we call these invariants of a graph: “invariant” because they not change when we
rearrange the vertices.
Watch out for one common pitfall. Even if G and H share some vertices, the isomorphism between G
and H does not have to care about the shared vertices—isomorphisms don’t care about vertex
names. If G and H both have a vertex v, and are isomorphic, v might do different things in the
two graphs (for example, degG (v) might be different from degH (v)).
However, if you can describe some property without making reference to vertex names, then it
should be preserved by isomorphism. For example, if G has the property “no two vertices of
degree 4 in G are adjacent”, and H is isomorphic to G, then H must also have this property.
The middle graph here immediately sticks out as different from the other two by its degree sequence.
It has vertices of degrees 2 and 4. The other two graphs are 3-regular.
The first graph—the cube graph Q3 —is bipartite. In the third graph, there are odd cycles (for
example, going around the top half of the octagon, and then coming back along the horizontal di-
agonal, gives a cycle of length 5). Therefore the first and third graph are also not isomorphic.
Finding invariants like this can also help us along even when two graphs are isomorphic. Consider
the following two graphs as an example:
y1 y2
x1 x2 x3
y8 y3
x4 x5
y7 y4
x6 x7 x8 y6 y5
4
Which one? Normally, we’d try both and see. In this case, there’s a nice time-saving observation
that can help us. The diagram of the graph on the right is symmetric: if you take its mirror image,
flipping it horizontally, you get an identical diagram. The topic of symmetry is one we’ll return
to in a bit, but in this case it tells us that we have two isomorphisms: from one isomorphism, we
can get another by applying mirror symmetry. If one isomorphism sends x2 to y1 , the other will
send x2 to y2 , which means that we can make the choice arbitrarily and not have to worry about
making a mistake.
Let’s decide to set f (x2 ) = y1 , which means f (x7 ) = y2 . Does this mean that we get to make
another arbitrary choice for x4 and x5 ? No: our hand is forced! Now that we’ve made some initial
decisions, we can distinguish x4 as the degree-2 vertex adjacent to x2 , which means that f (x4 ) must
be the degree-2 vertex adjacent to f (x2 ) or y1 . Therefore f (x4 ) can only be y8 , and f (x5 ) is left to
be y3 .
Similarly, our decisions about the degree-3 vertices are forced. For each of them, just look at its
neighbors among the vertices we’ve already placed. Let’s start with x1 . It is adjacent to x2 and x4 ,
so f (x1 ) is adjacent to f (x2 ) = y1 and f (x4 ) = y8 . The only such vertex is y7 and so f (x1 ) = y7 .
I’ll leave you to check, by similar reasoning, that f (x3 ) = y5 , f (x6 ) = y6 , and f (x8 ) = y4 are are
only options.
We can be certain that the result is an automorphism if we check every adjacency along the way.
(For example, when we get to x8 , it is adjacent to x3 , x5 , and x7 , and so we should check that f (x8 )
is adjacent to f (x3 ), f (x5 ), and f (x7 ).) If there are some we didn’t check—and maybe in general,
just to be safe—we should now verify that f satisfies the definition of an isomorphism. As before,
we can count edges and take a shortcut: both graphs have 12 edges, so once we check that every
edge on the left is sent to an edge on the right, we know that f is an isomorphism.
2 Fancier topics
2.1 Graph automorphisms (symmetries)
An automorphism of a graph G is an isomorphism from G to itself. The function f : V (G) →
V (G) such that f (v) = v for all vertices v is always an automorphism: the identity or trivial
automorphism. However, there may be more complicated ones. For example, the path graph Pn
has an automorphism that “reverses the path”: f (vi ) = vn+1−i . We saw another one in the last
example in the previous section: the diagram on the right had mirror-image symmetry, which can be
described by an automorphism that swaps the pairs y1 ↔ y2 , y8 ↔ y3 , y7 ↔ y4 , and y6 ↔ y5 .
Just as in that example, automorphisms are useful because they let us describe ways in which a
graph is “symmetric”: either geometrically or abstractly. This lets us avoid dealing with many
identical cases in proofs about that graph.
Here’s an example. First, we will prove a lemma about automorphisms of the cycle graph Cn ,
which admittedly takes a bit of work.
Lemma 2.1. If x and y are any two adjacent vertices of the cycle graph Cn , then Cn has an
automorphism f such that f (x) = v1 and f (y) = vn .
5
Proof. If g and h are two automorphisms of Cn , then their composition g◦h is also an automorphism.
So we will build the automorphism f we want by composing simpler automorphisms.
One simple automorphism of Cn is the “left shift” automorphism s, defined by
(
vi−1 if i > 1,
s(vi ) =
vn if i = 1.
If it happens that x = vk and y = vk−1 for some k ≥ 2, then applying the left shift automorphism
k − 1 times will take x to v1 and y to vn . (Also, if x = v1 and y = vn already, then the identity
automorphism is the automorphism we’re looking for.)
However, x and y might appear in the other order around the cycle. In this case, we’ll need another
simple automorphism of Cn : the “reverse” automorphism r, defined by r(vi ) = vn+1−i for all i.
This is the automorphism we’re looking for if x = vn and y = v1 . Finally, if x = vk−1 and y = vk
for some k ≥ 2, then we can apply the left shift automorphism k − 1 times (taking x to vn and y
to v1 ) then apply the reverse automorphism.
Now we can use this lemma to make lots of proofs about Cn much easier, because we don’t have
to check many very similar cases! For example:
Theorem 2.2. If xy is any edge of Cn , then Cn − xy (the graph we obtain by deleting xy) is still
connected.
Proof. By Lemma 2.1, we may assume that x = v1 and y = vn . Here’s how: let f be the
automorphism that takes x to v1 and y = vn . Then the same f is also an isomorphism between
Cn − xy and Cn − v1 vn . So if we show that Cn − v1 vn is connected, we conclude that Cn − xy is
connected.
(Warning: you may see proofs that skip the explanation of how the automorphism helps us, and
just say “because the graph has such-and-such symmetry, we may assume this-and-that”.)
When x = v1 and y = vn , then Cn − xy = Pn , which we already know is connected. (See lecture 3.)
So Cn − xy is connected for all edges xy.
6
• Similarly, a cycle of length n in a graph G can also be described as a copy of Cn inside G.
Sometimes one way of thinking about these objects is more convenient than the other. Thinking
of a path or cycle as a sequence of vertices means that we pick a starting vertex, an ending vertex
(the same as the start, in the case of the cycle) and a direction of travel. So, for example, an x − y
path and a y − x path are different objects from this point of view, even though they correspond
to the same subgraph. We might sometimes prefer not to make this distinction—for example, if we
want to know the number of cycles in a graph, it’s probably better to count them as subgraphs,
which avoids redundancy.
We also saw this in action when talking about induction on the hypercube Qn . We can say,
informally, that “Qn consists of two disjoint copies of Qn−1 with corresponding vertices in the two
copies joined by edges.” What does this mean?
• Well, we start with two disjoint graphs that are each isomorphic to Qn−1 .
(In the definition of Qn , we can be more precise about what these are. Recall that Qn−1
has vertex set {0, 1}n−1 : sequences of n − 1 zeroes and ones. To make one copy of Qn−1 ,
we rename the vertices by adding a 0 to the end of each sequence. To make a second copy
of Qn−1 disjoint from the first, we rename the vertices by adding a 1 at the end of each
sequence instead.)
• Because they are both isomorphic to Qn−1 , they are isomorphic to each other. Let f be an
isomorphism between them.
(Specifically, we can say that f is the function which takes vertex (x1 , . . . , xn−1 , 0) in one
copy to the vertex (x1 , . . . , xn−1 , 1) in the other copy.)
• For every vertex v in one copy of Qn−1 , we add an edge between v and f (v): these are the
edges between “corresponding vertices”.
(If we follow the specific details in these parenthetical comments, we’ll get exactly the Qn
with vertex set {0, 1}n and edges between vertices that differ in one coordinate. If we don’t
get that specific about the details of the copies of Qn−1 and the isomorphism between them,
we’ll still get a result isomorphic to Qn .)
v1 v2 v3 v4 v1 v2 v3 v4
One possible isomorphism from the graph on the left to the graph on the right is given by f (v1 ) = v2 ,
f (v2 ) = v4 , f (v3 ) = v1 , f (v4 ) = v3 .
If you look for self-complementary graphs on 5 vertices, you’ll probably find the 5-cycle:
7
v1 v1
v5 v2 v5 v2
v4 v3 v4 v3
There are many isomorphisms here (since C5 has many automorphisms). One of them is given by
f (v1 ) = v1 , f (v2 ) = v3 , f (v3 ) = v5 , f (v4 ) = v2 , and f (v3 ) = v4 .
A more complicated example is a graph on 9 vertices known as the 3 × 3 “rook graph”. Here, if we
imagine the vertices as being laid out in a 3 × 3 grid, we declare vertices to be adjacent if they are
in the same row or the same column. (The name “rook graph” comes from the way that a rook
moves in chess.) In the diagram below, the rook graph as we just defined it is shown on the left,
and its complement is shown on the right:
Can you find an isomorphism between these two graphs? (Hint: you can start by declaring that the
center vertex on the left maps to the center vertex on the right. From there, a lot of your decisions
will be forced.)
We can say a lot about the structure of a self-complementary graph. For example, if G is an
n-vertex graph with m edges, then G has n2 − m edges. If we want G to be isomorphic to G, then
we want m = n2 − m, which means m = 21 n2 = n(n−1)
4 .
What’s more, if G is self-complementary, its degree sequence must be symmetric. Suppose G has
a vertex of degree k; then that same vertex has degree n − 1 − k in G. This means there must
also be a vertex of degree n − 1 − k in G: in fact, as many of these vertices as there are vertices
of degree k. We see this in P4 , which has degree sequence 2, 2, 1, 1. The other two examples we
have take the easy way out by being regular of degree n−1 2 . But from the degree sequence point
of view, it’s possible that another 5-vertex self-complementary graph exists, with degree sequence
3, 3, 2, 1, 1. (In fact, there is such a graph; can you find it?)
When we come up with a new definition, and start playing around with it, there is the danger of
putting in a lot of work for nothing. What if we spend hours and hours proving theorems about
self-complementary graphs, only to find out that actually, we’ve found all the ones that exist, and
there are no more? This would be very disappointing, so maybe it’s best to first ask: are there
actually many self-complementary graphs?
From what we’ve done, we can actually prove a limitation on their existence.
Proposition 2.3. A self-complementary graph on n vertices can only exist if n has the form 4k
or 4k + 1 for some integer k.
n(n−1)
Proof. We know that a self-complementary graph on n vertices must have 4 edges, so in
8
particular, n(n−1)
4 must be an integer. One of n or n − 1 is always odd, so the other one must be
divisible by 4. If n is divisible by 4, then n = 4k for some integer k; if n − 1 is divisible by 4, then
n = 4k + 1 for some integer k.
However, beyond that, there are no restrictions! Here’s the formal statement.
Theorem 2.4. For all integers k ≥ 1, there are self-complementary graphs on 4k and 4k + 1
vertices.
Proof. We induct on k. Our base cases for k = 1 are the path graph P4 and the cycle graph C5 ,
which we’ve already seen.
Now assume that a self-complementary graph G on either 4k or 4k + 1 vertices exists; the same
argument will actually apply to both cases. We’ll use it to build a larger self-complementary graph
with 4 more vertices (either 4(k + 1) or 4(k + 1) + 1 vertices).
Here’s how: take G, and add 4 new vertices ak , bk , ck , dk . Between them, add edges ak bk , bk ck ,
and ck dk . Also, join every vertex in G by an edge to ak and dk (but not bk or ck ).
ak bk ck dk ak bk ck dk
G G
If f : V (G) → V (G) is an isomorphism from G to G, extend it to the four new vertices by defining
f (ak ) = ck , f (bk ) = ak , f (ck ) = dk , and f (dk ) = bk . You can check (looking at the diagram above)
that this defines an isomorphism from the bigger graph to its complement, showing that it’s also
self-complementary.
By induction, we can generate self-complementary graphs of every possible size!
9
3 Practice problems
1. Prove that none of these five graphs are isomorphic: find invariants distinguishing them all
from each other.
2. In fact, the five graphs shown above are the complete collection of 3-regular connected graphs
on 8 vertices, up to isomorphism.
In particular, this means that the cube graph Q3 must be isomorphic to one of the five graphs
above. Which one is it isomorphic to?
3. Find all automorphisms of the graph shown below: that is, all functions f : {1, 2, 3, 4, 5, 6} →
{1, 2, 3, 4, 5, 6} that preserve the edges of the graph.
2
1 3
4 6
5
10
7. The “Möbius ladder” graph Mn is defined for every even n > 4, and it has two definitions:
• According to one definition, we define it by starting with a path graph on vertices
v1 , v2 , . . . , vn/2 , another path graph on vertices w1 , w2 , . . . , wn/2 , adding the edges vi wi
for i = 1, 2, . . . , n/2, and finally adding the edges v1 wn/2 and w1 vn/2 .
• According to another definition, we define it by starting with a cycle graph on vertices
x1 , x2 , . . . , xn , and adding an edge xi xi+n/2 for i = 1, 2, . . . , n/2.
The two diagrams below show the graph M16 according to each of the definitions.
Prove that for all even n > 4, the two definitions of Mn give isomorphic graphs.
8. Define two vertices v, w of a graph G to be similar if there is an automorphism of G that
takes v to w.
(a) Prove that if v and w are similar, then G − v and G − w are isomorphic.
On the other hand, the converse to (a) is false! Let G be the graph below:
v1 v2 v3
v6
v4 v5
v7 v8
11