0% found this document useful (0 votes)
9 views

Lec 3

This document summarizes key concepts from a lecture on graph theory: 1. It defines complete graphs, empty graphs, path graphs, and cycle graphs. Path graphs Pn have n vertices and n-1 edges, while cycle graphs Cn have n vertices and n edges. 2. It discusses subgraphs, including induced subgraphs which preserve all edges between vertices in the subgraph. It provides examples of path graphs being subgraphs and induced subgraphs of cycle graphs. 3. It introduces disjoint unions, which combine multiple graphs by placing them alongside each other without adding connections between graphs.

Uploaded by

xigon53558
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lec 3

This document summarizes key concepts from a lecture on graph theory: 1. It defines complete graphs, empty graphs, path graphs, and cycle graphs. Path graphs Pn have n vertices and n-1 edges, while cycle graphs Cn have n vertices and n edges. 2. It discusses subgraphs, including induced subgraphs which preserve all edges between vertices in the subgraph. It provides examples of path graphs being subgraphs and induced subgraphs of cycle graphs. 3. It introduces disjoint unions, which combine multiple graphs by placing them alongside each other without adding connections between graphs.

Uploaded by

xigon53558
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Lecture 3, version April 6, 2023 page 1

Math 530 Spring 2022, Lecture 3: Walks and


paths
website: https://www.cip.ifi.lmu.de/~grinberg/t/22s

1. Simple graphs (cont’d)


1.1. Some families of graphs
We will now define some particularly significant families of graphs.

1.1.1. Complete and empty graphs


The simplest families of graphs are the complete graphs and the empty graphs:

Definition 1.1.1. Let V be a finite set.

(a) The complete graph on V means the simple graph (V, P2 (V )). It is
the simple graph with vertex set V in which every two distinct vertices
are adjacent.
If V = {1, 2, . . . , n} for some n ∈ N, then the complete graph on V is
denoted Kn .

(b) The empty graph on V means the simple graph (V, ∅). It is the simple
graph with vertex set V and no edges.

The following pictures show the complete graph and the empty graph on the
set {1, 2, 3, 4, 5}:

complete graph empty graph

2 2
3 3

1 1

4 4
5 5

The complete one is called K5 .


Lecture 3, version April 6, 2023 page 2

Here are the complete graphs K0 , K1 , K2 , K3 , K4 :

K0

1
K1

2 1
K2

3
K3

3 1

4
K4

Note that a simple graph G is isomorphic to the complete graph Kn if and


only if it has n vertices and is a complete graph (i.e., every two distinct vertices
are adjacent).
Question: Given two finite sets V and W, what are the isomorphisms from
the complete graph on V to the complete graph on W ?
Answer: If |V | ̸= |W |, then there are none. If |V | = |W |, then any bijection
from V to W is an isomorphism. The same holds for empty graphs.

1.1.2. Path and cycle graphs


Next come two families of graphs with fairly simple shapes:
Definition 1.1.2. For each n ∈ N, we define the n-th path graph Pn to be the
simple graph

({1, 2, . . . , n} , {{i, i + 1} | 1 ≤ i < n})


= ({1, 2, . . . , n} , {12, 23, 34, . . . , (n − 1) n}) .
Lecture 3, version April 6, 2023 page 3

This graph has n vertices and n − 1 edges (unless n = 0, in which case it has
0 edges).

Definition 1.1.3. For each n > 1, we define the n-th cycle graph Cn to be the
simple graph

({1, 2, . . . , n} , {{i, i + 1} | 1 ≤ i < n} ∪ {{n, 1}})


= ({1, 2, . . . , n} , {12, 23, 34, . . . , (n − 1) n, n1}) .

This graph has n vertices and n edges (unless n = 2, in which case it has 1
edge only). (We will later modify the definition of the 2-nd cycle graph C2
somewhat, in order to force it to have 2 edges. But we cannot do this yet,
since a simple graph with 2 vertices cannot have 2 edges.)
The following pictures show the path graph P5 and the cycle graph C5 :

path graph cycle graph

2 2
3 3

1 1

4 4
5 5

Of course, it is more common to draw the path graph stretched out horizontally:

1 2 3 4 5

Note that the cycle graph C3 is identical with the complete graph K3 .
Question: What are the graph isomorphisms from Pn to itself?
Answer: One such isomorphism is the identity map id : {1, 2, . . . , n} →
{1, 2, . . . , n}. Another is the “reversal” map
{1, 2, . . . , n} → {1, 2, . . . , n} ,
i 7→ n + 1 − i.
There are no others.
Question: What are the graph isomorphisms from Cn to itself?
Answer: For any k ∈ Z, we can define a “rotation by k vertices”, which is the
map
{1, 2, . . . , n} → {1, 2, . . . , n} ,
i 7→ (i + k reduced modulo n to an element of {1, 2, . . . , n}) .
Lecture 3, version April 6, 2023 page 4

Thus we get n rotations (one for each k ∈ {1, 2, . . . , n}); all of them are graph
isomorphisms.
There are also the reflections, which are the maps
{1, 2, . . . , n} → {1, 2, . . . , n} ,
i 7→ (k − i reduced modulo n to an element of {1, 2, . . . , n})
for k ∈ Z. There are n of them, too, and they are isomorphisms as well.
Altogether we obtain 2n isomorphisms (for n > 2), and there are no others.
(The group they form is the n-th dihedral group.)

1.1.3. Kneser graphs


Here is a more obscure family of graphs:
Example 1.1.4. If S is a finite set, and if k ∈ N, then we define the k-th Kneser
graph of S to be the simple graph

KS,k := (Pk (S) , { I J | I, J ∈ Pk (S) and I ∩ J = ∅}) .

The vertices of KS,k are the k-element subsets of S, and two such subsets are
adjacent if they are disjoint.
The graph K{1,2,...,5},2 is called the Petersen graph; here is how it looks like:

{1, 4}

{2, 5}

{2, 3}
{3, 4}

{1, 2} {3, 5}

{4, 5}
{1, 5}

{1, 3}

{2, 4}
Lecture 3, version April 6, 2023 page 5

1.2. Subgraphs
Definition 1.2.1. Let G = (V, E) be a simple graph.

(a) A subgraph of G means a simple graph of the form H = (W, F ), where


W ⊆ V and F ⊆ E. In other words, a subgraph of G means a simple
graph whose vertices are vertices of G and whose edges are edges of G.

(b) Let S be a subset of V. The induced subgraph of G on the set S denotes


the subgraph
(S, E ∩ P2 (S))
of G. In other words, it denotes the subgraph of G whose vertices
are the elements of S, and whose edges are precisely those edges of G
whose both endpoints belong to S.

(c) An induced subgraph of G means a subgraph of G that is the induced


subgraph of G on S for some S ⊆ V.

Thus, a subgraph of a graph G is obtained by throwing away some vertices and


some edges of G (in such a way, of course, that no edges remain “dangling”
– i.e., if you throw away a vertex, then you must throw away all edges that
contain this vertex). Such a subgraph is an induced subgraph if no edges are
removed without need – i.e., if you removed only those edges that lost some of
their endpoints. Thus, induced subgraphs can be characterized as follows:

Proposition 1.2.2. Let H be a subgraph of a simple graph G. Then, H is an


induced subgraph of G if and only if each edge uv of G whose endpoints u
and v belong to V ( H ) is an edge of H.

Proof. This is a matter of understanding the definition.

Example 1.2.3. Let n > 1 be an integer.

(a) The path graph Pn is a subgraph of the cycle graph Cn . It is not an


induced subgraph (for n > 2), because it contains the two vertices n
and 1 of Cn but does not contain the edge n1.

(b) The path graph Pn−1 is an induced subgraph of Pn . (Namely, it is the


induced subgraph of Pn on the set {1, 2, . . . , n − 1}.)

(c) Assume that n > 3. Is Cn−1 a subgraph of Cn ? No, because the edge
(n − 1) 1 belongs to Cn−1 but not to Cn .

The following is easy:


Lecture 3, version April 6, 2023 page 6

Proposition 1.2.4. Let G be a simple graph, and let H be a subgraph of G.


Assume that H is a complete graph. Then, H is automatically an induced
subgraph of G.

Proof. This follows from the preceding proposition, since the completeness of
H means that each 2-element subset {u, v} of the vertex set of H is an edge of
H.
We note that triangles in a graph can be characterized in terms of complete
subgraphs. Namely, a triangle “is” the same as a complete subgraph (or, equiv-
alently, induced complete subgraph) with three vertices:

Remark 1.2.5. Let G be a simple graph. Let u, v, w be three distinct vertices


of G. The following are equivalent:

1. The set {u, v, w} is a triangle of G.

2. The induced subgraph of G on {u, v, w} is isomorphic to K3 .

3. The induced subgraph of G on {u, v, w} is isomorphic to C3 .

Thus, instead of saying “triangle of G”, one often says “a K3 in G” or “a C3 in


G”. Generally, “an H in G” (where H and G are two graphs) means a subgraph
of G that is isomorphic to H. (In the case when H = K3 = C3 , it does not
matter whether we require it to be a subgraph or an induced subgraph, since a
complete subgraph has to be induced automatically.)

1.3. Disjoint unions


Another way of constructing new graphs from old is the disjoint union. The
idea is simple: Taking the disjoint union G1 ⊔ G2 ⊔ · · · ⊔ Gk of several simple
graphs G1 , G2 , . . . , Gk means putting the graphs alongside each other and treat-
ing the result as one big graph. To make this formally watertight, we have to
relabel each vertex v of each graph Gi as the pair (i, v), so that vertices coming
from different graphs appear as different even if they were equal. For example,
the disjoint union C3 ⊔ C4 of the two cycle graphs C3 and C4 should not be

2
2 3

1 4
3
Lecture 3, version April 6, 2023 page 7

(which makes no sense, because there are two points labelled 1 in this picture,
but a graph can have only one vertex 1), but rather should be

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

(1, 1)

(2, 1) (2, 4)
(1, 3)
.
So here is the formal definition:
Definition 1.3.1. Let G1 , G2 , . . . , Gk be simple graphs, where Gi = (Vi , Ei ) for
each i ∈ {1, 2, . . . , k }. The disjoint union of these k graphs G1 , G2 , . . . , Gk is
defined to be the simple graph (V, E), where

V = {(i, v) | i ∈ {1, 2, . . . , k } and v ∈ Vi } and


E = {{(i, v1 ) , (i, v2 )} | i ∈ {1, 2, . . . , k } and {v1 , v2 } ∈ Ei } .

This disjoint union is denoted by G1 ⊔ G2 ⊔ · · · ⊔ Gk .


Note: If G and H are two graphs, then the two graphs G ⊔ H and H ⊔ G are
isomorphic, but not the same graph (unless G = H). For example, C3 ⊔ C4 has
a vertex (2, 4), but C4 ⊔ C3 does not.

1.4. Walks and paths


We now come to the definitions of walks and paths – two of the most funda-
mental features that graphs can have. In particular, Euler’s 1736 paper, where
graphs were first studied, is about certain kinds of walks.

1.4.1. Definitions
Imagine a graph as a road network, where each vertex is a town and each edge
is a (bidirectional) road. By successively walking along several edges, you can
often get from a town to another even if they are not adjacent. This is made
formal in the concept of a “walk”:
Definition 1.4.1. Let G be a simple graph. Then:

(a) A walk (in G) means a finite sequence (v0 , v1 , . . . , vk ) of vertices of G


(with k ≥ 0) such that all of v0 v1 , v1 v2 , v2 v3 , . . . , vk−1 vk are edges of
G. (The latter condition is vacuously true if k = 0.)
Lecture 3, version April 6, 2023 page 8

(b) If w = (v0 , v1 , . . . , vk ) is a walk in G, then:


• The vertices of w are defined to be v0 , v1 , . . . , vk .
• The edges of w are defined to be v0 v1 , v1 v2 , v2 v3 , . . . , vk−1 vk .
• The nonnegative integer k is called the length of w. (This is the
number of all edges of w, counted with multiplicity. It is 1 smaller
than the number of all vertices of w, counted with multiplicity.)
• The vertex v0 is called the starting point of w. We say that w starts
(or begins) at v0 .
• The vertex vk is called the ending point of w. We say that w ends
at vk .

(c) A path (in G) means a walk (in G) whose vertices are distinct. In other
words, a path means a walk (v0 , v1 , . . . , vk ) such that v0 , v1 , . . . , vk are
distinct.

(d) Let p and q be two vertices of G. A walk from p to q means a walk that
starts at p and ends at q. A path from p to q means a path that starts at
p and ends at q.

(e) We often say “walk of G” and “path of G” instead of “walk in G” and


“path in G”, respectively.

Example 1.4.2. Let G be the graph


({1, 2, 3, 4, 5, 6} , {12, 23, 34, 45, 56, 61, 13}) .
This graph looks as follows:

3 2

4 1

5 6

Then:
• The sequence (1, 3, 4, 5, 6, 1, 3, 2) of vertices of G is a walk in G. This
walk is a walk from 1 to 2. It is not a path. The length of this walk is 7.
• The sequence (1, 2, 4, 3) of vertices of G is not a walk, since 24 is not an
edge of G. Hence, it is not a path either.
Lecture 3, version April 6, 2023 page 9

• The sequence (1, 3, 2, 1) is a walk from 1 to 1. It has length 3. It is not a


path.

• The sequence (1, 2, 1) is a walk from 1 to 1. It has length 2. It is not a


path.

• The sequence (5) is a walk from 5 to 5. It has length 0. It is a path.


More generally, each vertex v of G produces a length-0 path (v).

• The sequence (5, 4) is a walk from 5 to 4. It has length 1. It is a path.


More generally, each edge uv of G produces a length-1 path (u, v).

Exercise 1. Prove that the edges of a path are always distinct. (See HW1 in
Spring 2017 for a rigorous proof.)

1.4.2. Composing/concatenating and reversing walks


Here are some simple things we can do with walks and paths.
First, we can “splice” two walks together if the ending point of the first is the
starting point of the second:
Proposition 1.4.3. Let G be a simple graph. Let u, v and w be three vertices
of G. Let a = ( a0 , a1 , . . . , ak ) be a walk from u to v. Let b = (b0 , b1 , . . . , bℓ ) be
a walk from v to w. Then,

( a0 , a1 , . . . , ak , b1 , b2 , . . . , bℓ ) = ( a0 , a1 , . . . , ak−1 , b0 , b1 , . . . , bℓ )
= ( a0 , a1 , . . . , ak−1 , v, b1 , b2 , . . . , bℓ )

is a walk from u to w. This walk shall be denoted a ∗ b.


Proof. Intuitively clear and straightforward to verify.
Proposition 1.4.4. Let G be a simple graph. Let u and v be two vertices of G.
Let a = ( a0 , a1 , . . . , ak ) be a walk from u to v. Then:

(a) The list ( ak , ak−1 , . . . , a0 ) is a walk from v to u. We denote this walk by


rev a and call it the reversal of a.

(b) If a is a path, then rev a is a path again.

Proof. Intuitively clear and straightforward to verify.

1.4.3. Reducing walks to paths


A path is just a walk without repeated vertices. If you have a walk, you can
turn it into a path by removing “loops” (or “digressions”):
Lecture 3, version April 6, 2023 page 10

Proposition 1.4.5. Let G be a simple graph. Let u and v be two vertices of G.


Let a = ( a0 , a1 , . . . , ak ) be a walk from u to v. Assume that a is not a path.
Then, there exists a walk from u to v whose length is smaller than k.

Proof. Since a is not a path, two of its vertices are equal. In other words, there
exist i < j such that ai = a j . Consider these i and j. Now, consider the tuple
 

a , a , . . . , ai , a j +1 , a j +2 , . . . , a k 
 
 |0 1{z } | {z }
the first i +1 vertices of a the last k− j vertices of a

(this is just a with the part between ai and a j cut out). This tuple is a walk from u
i + (k − j) < j + (k − j) = k. So we have found a walk
to v, and its length is |{z}
<j
from u to v whose length is smaller than k. This proves the proposition.

Example 1.4.6. Consider the walk (1, 3, 4, 5, 6, 1, 3, 2) from Example 1.4.2.


Then, Proposition 1.4.5 tells us that there is a walk from 1 to 2 that has
smaller length. You can find this walk by removing the part between the two
3’s. You get the walk (1, 3, 2). This is actually a path.

Corollary 1.4.7 (When there is a walk, there is a path). Let G be a simple


graph. Let u and v be two vertices of G. Assume that there is a walk from u
to v of length k for some k ∈ N. Then, there is a path from u to v of length
≤ k.

Proof. Apply Proposition 1.4.5 several times, until you get a path. (You will
eventually get a path, because the length cannot keep decreasing forever.)

You might also like