Lecture12 Graphs Summary
Lecture12 Graphs Summary
Summary
Aaron Tan
AY2024/25 Semester 1 1
Graphs: Introduction Trails, Paths, and Circuits Matrix Representations Isomorphism and Planar Graphs
e1 = {v1, v4}
e2 = e3 = {v2, v3}
e4 = {v3, v4}
e5 = {v4, v4}
e6 = {v6, v7}
An undirected graph G consists of 2 finite sets: a nonempty set V of vertices and a set
E of edges, where each (undirected) edge is associated with a set consisting of either
one or two vertices called its endpoints.
An edge is said to connect its endpoints; two vertices that are connected by an edge
are called adjacent vertices; and a vertex that is an endpoint of a loop is said to be
adjacent to itself.
An edge is said to be incident on each of its endpoints, and two edges incident on the
same endpoint are called adjacent edges.
We write e = {v, w} for an undirected edge e incident on vertices v and w.
A bipartite graph (or bigraph) is a simple graph whose vertices can be divided into
two disjoint sets 𝑈 and 𝑉 such that every edge connects a vertex in 𝑈 to one in 𝑉.
A complete bipartite graph is a bipartite graph on two disjoint sets 𝑈 and 𝑉 such
that every vertex in 𝑈 connects to every vertex in 𝑉.
If 𝑈 = 𝑚 and 𝑉 = 𝑛, the complete bipartite graph is denoted as 𝐾𝑚,𝑛 .
5
Summary
10.1 Definitions and Basic Properties
The total degree of a graph is even. In any graph there are an even
number of vertices of odd degree. 6
Summary
10.1 Definitions and Basic Properties
7
Summary
10.2 Trails, Paths, and Circuits
Definitions
8
Summary
10.2 Trails, Paths, and Circuits
Definition: Connectedness
Two vertices v and w of a graph G are connected iff there is a walk from v to w.
The graph G is connected iff given any two vertices v and w in G, there is a walk from
v to w. Symbolically, G is connected iff vertices v, w V(G), a walk from v to w.
Lemma 10.2.1
Let G be a graph.
a. If G is connected, then any two distinct vertices of G can be connected by a path.
b. If vertices v and w are part of a circuit in G and one edge is removed from the
circuit, then there still exists a trail from v to w in G.
c. If G is connected and G contains a circuit, then an edge of the circuit can be
removed without disconnecting G.
Let G be a graph. An Euler circuit for G is a circuit that contains every vertex and
every edge of G.
An Eulerian graph is a graph that contains an Euler circuit.
Theorem 10.2.2
If a graph has an Euler circuit, then every vertex of the graph has positive even degree.
Theorem 10.2.3
If a graph G is connected and the degree of every vertex of G is a positive even
integer, then G has an Euler circuit.
Theorem 10.2.4
A graph G has an Euler circuit iff G is connected and every vertex of G has positive
even degree. 10
Summary
10.2 Trails, Paths, and Circuits
Let G be a graph, and let v and w be two distinct vertices of G. An Euler trail/path
from v to w is a sequence of adjacent edges and vertices that starts at v, ends at w,
passes through every vertex of G at least once, and traverses every edge of G exactly
once.
Corollary 10.2.5
Let G be a graph, and let v and w be two distinct vertices of G. There is an Euler trail
from v to w iff G is connected, v and w have odd degree, and all other vertices of G
have positive even degree.
11
Summary
10.2 Trails, Paths, and Circuits
Given a graph G, a Hamiltonian circuit for G is a simple circuit that includes every
vertex of G. (That is, every vertex appears exactly once, except for the first and the
last, which are the same.)
A Hamiltonian graph (also called Hamilton graph) is a graph that contains a
Hamiltonian circuit.
Proposition 10.2.6
If a graph G has a Hamiltonian circuit, then G has a subgraph H with the following
properties:
1. H contains every vertex of G.
2. H is connected.
3. H has the same number of edges as vertices.
4. Every vertex of H has degree 2.
12
Summary
10.3 Matrix Representations of Graphs
Let G be a directed graph with ordered vertices v1, v2, … vn. The adjacency matrix of
G is the n n matrix A = (𝑎𝑖𝑗 ) over the set of non-negative integers such that
𝑎𝑖𝑗 = the number of arrows from vi to vj for all i, j = 1, 2, …, n.
Let G be an undirected graph with ordered vertices v1, v2, … vn. The adjacency
matrix of G is the n n matrix A = (𝑎𝑖𝑗 ) over the set of non-negative integers such
that
𝑎𝑖𝑗 = the number of edges connecting vi and vj for all i, j = 1, 2, …, n.
13
Summary
10.3 Matrix Representations of Graphs
Theorem 10.3.2
If G is a graph with vertices v1, v2, …, vm and A is the adjacency matrix of G, then for
each positive integer n and for all integers i, j = 1, 2, …, m,
the ij-th entry of An = the number of walks of length n from vi to vj.
14
Summary
10.4 Planar Graphs
15
Summary
10.4 Planar Graphs
Euler’s Formula
For a connected planar simple graph G = (V, E) with e = |E| and v = |V|, if we let f be
the number of faces, then
f=e–v+2
16
END OF FILE
17