Unit 4 Graphs
Unit 4 Graphs
G=(V,E)
isolated vertex
multiple
edges
adjacent
simple graph: an undirected graph without loop or multiple edges
degree of a vertex: number of edges connected
(indegree, outdegree)
For simple graphs, deg(v i ) 2 | E |
vi V
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
Chapter 11 An Introduction to Graph Theory
11.1 Definitions and Examples
a
x y
path: no vertex can be repeated e
b
a-b-c-d-e
trail: no edge can be repeat
a-b-c-d-e-b-d
d
walk: no restriction
a-b-d-a-b-c c
length: number of edges in
closed if x=y this (path,trail,walk)
closed trail: circuit (a-b-c-d-b-e-d-a,
one draw without lifting pen)
closed path: cycle (a-b-c-d-a)
d d
c c
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
Chapter 11 An Introduction to Graph Theory
11.1 Definitions and Examples
Def. 11.5 For any graph G = (V , E ), the number of components
of G is denoted by ( G ).
1 ( G ) | V |
Def. 11.6
multigraph of multiplicity 3
multigraphs
a a
a b e
e e
b b
d d
c c
d d induced subgraph
c c include all edges
spanning subgraph of E in V1
V1=V
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
Chapter 11 An Introduction to Graph Theory
11.2 Subgraphs, Complements, and Graph Isomorphism
a
Def. 11.11 complete graph: Kn
e
b
K5
Def. 11.12 complement of a graph
a G G a d
c
e e
b b
d d
c c
Discrete Math by R.S. Chang, Dept. CSIE, NDHU
Chapter 11 An Introduction to Graph Theory
11.2 Subgraphs, Complements, and Graph Isomorphism
Theorem: Any graph of six vertices contains a K3 or K3.
(In a party of six, There exists 3 people who are either
mutually acquainted or mutually inacquainted.)
5 is not enough. For 6 people, let's look from the point of
a view of a:
From the pigeonhole principle, there are
e 3 who know a or 3 who does not know a.
b
a a
d b c d b c d
c K3 or K3. K3 or K3.
area b area d
a area c
c
Discrete Math by R.S. Chang, Dept. CSIE, NDHU 1
Chapter 11 An Introduction to Graph Theory
11.3 Vertex Degree: Euler Trails and Circuits
Def. 11.15 Let G=(V,E) be an undirected graph or multigraph
with no isolated vertices. Then G is said to have an Euler circuit
if there is a circuit in G that traverses every edge of the graph
exactly once. If there is an open trail from a to b in G and this
trail traverses each edge in G exactly once, the trail is called an
Euler trail.
Theorem 11.3 Let G=(V,E) be an undirected graph or multigraph
with no isolated vertices. Then G has an Euler circuit if and only
if G is connected and every vertex in G has even degree.
a
All degrees are odd. Hence no Euler circuit
b d for the Konigsberg bridges problem.
c
Discrete Math by R.S. Chang, Dept. CSIE, NDHU 1
Chapter 11 An Introduction to Graph Theory
11.3 Vertex Degree: Euler Trails and Circuits
K4
K5
K4,4
u w u v w
G1 and G2 are called homeomorphic if they are isomorphic
or if they can both be obtained from the same loop-free
undirected graph H by a sequence of elementary subdivisions.
a b a b a b a b
c c c c
e d e d e d e d
Two homeomorphic graphs are simultaneously planar or nonplanar.
R3 v=4,e=6,r=4, v-e+r=2
number number
number
of vertices of regions
of edges
Discrete Math by R.S. Chang, Dept. CSIE, NDHU 2
Chapter 11 An Introduction to Graph Theory
11.4 Planar Graphs
proof: The proof is by induction on e.
e=0 or 1 v=1 v=1 v=2
r=1 r=2 r=1
v-e+r=2
e=0 e=1 e=1
Assume that the result is true for any connected planar graph or
multigraph with e edges, where 0 e k
Now for G=(V,E) with |E|=k+1 edges, let H=G-(a,b) for a,b in V.
Since H has k edges, v H e H rH 2
And, v G v H , e G e H 1.
Now consider the situation about regions.
case 1: H is connected
b
b
a
a(=b) a(=b) a
v G e G rG v H ( e H 1) ( rH 1) v H e H rH 2
a a H1
b b H2
a b H1 a b H2
v H1 v H2 v G , e H1 e H2 e G 1, rH1 rH2 rG 1.
And by the induction hypothesis, v H1 e H1 rH1 2 ,
v H2 e H2 rH2 2 . Therefore, v G e G rG ( v H1 v H2 )
( e H1 e H2 1) ( rH1 rH2 1) ( v H1 e H1 rH1 )
( v H2 e H2 rH2 ) 2 2 2 2 2
Discrete Math by R.S. Chang, Dept. CSIE, NDHU 2
Chapter 11 An Introduction to Graph Theory
11.4 Planar Graphs
degree of a region (deg(R)): the number of edges traversed in
a shortest closed walk about the boundary of R.
two different embeddings R
a b 6
R8
R2 R4
c R3 R5
R7
R1 g h
d f
deg(R1)=5,deg(R2)=3 deg(R5)=4,deg(R6)=3
deg(R3)=3,deg(R4)=7 deg(R7)=5,deg(R8)=6
abghgfda
4 8
deg( Ri ) 18 deg( Ri ) 2 9 2 | E |
i 1 i 5
Ex. 11.19 For K3,3, each region has at least 4 edges, hence
4r 2e. If K3,3 is planar, r=e-v+2=9-6+2=5. So 20=4r 2e=18,
a contradiction.
Ex. 11.21
b e cut-sets: {(a,b),(a,c)},
{(b,d),(c,d)},{(d,f)},...
d f
a h
c g
a bridge
For planar graphs, cycles in one graph correspond to cut-sets
in a dual graphs and vice versa.
g h
i
Discrete Math by R.S. Chang, Dept. CSIE, NDHU 3
Chapter 11 An Introduction to Graph Theory
11.5 Hamilton Paths and Cycles
Ex. 11.25
x start labeling from here
4x's and 6y's, since x and y must
y y x y y interleave in a Hamilton path (or cycle),
the graph is not Hamiltonian
y
x x
y
The method works only for bipartite graphs.
The Hamilton path problem is still NP-complete when restricted
to bipartite graphs.
case 3. v1 v2 ...vm v
a b c
x y
n1 vertices n2 vertices
a contradiction
or v1 v2 v3 ...vt-1 vt ... vm
otherwise assume deg(v1)=k, then deg(vm)<m-k.
deg(v1)+deg(vm)<m<n-1, a contradiction
Therefore, v can be added to the cycle. v
n
Corollary 11.5 If deg( v ) for all vertices, then the graph has a
2
Hamilton cycle.
c
d
G Ge G'e
G b Ge G'e
In a proper coloring of Ge:
case 1. a and b have the same color: a proper coloring of G'e
case 2. a and b have different colors: a proper coloring of G.
Hence, P(Ge,)=P(G,)+P(G'e,).