0% found this document useful (0 votes)
39 views44 pages

Ds9graphintro Handout

This document introduces graphs and their representations. It contains sections on graph definitions and terminology, representing graphs, graph isomorphism, and exercises on graphs and bipartite graphs. It is written by Huynh Tuong Nguyen, Tran Tuan Anh, and Nguyen Ngoc Le from the University of Technology - VNUHCM.

Uploaded by

Lê Văn Hoàng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views44 pages

Ds9graphintro Handout

This document introduces graphs and their representations. It contains sections on graph definitions and terminology, representing graphs, graph isomorphism, and exercises on graphs and bipartite graphs. It is written by Huynh Tuong Nguyen, Tran Tuan Anh, and Nguyen Ngoc Le from the University of Technology - VNUHCM.

Uploaded by

Lê Văn Hoàng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Introduction to Graphs

Huynh Tuong Nguyen,


Tran Tuan Anh, Nguyen

Chapter 9 Ngoc Le

Introduction to Graphs
Discrete Structures for Computing
Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

Huynh Tuong Nguyen, Tran Tuan Anh, Nguyen Ngoc Le


Faculty of Computer Science and Engineering
University of Technology - VNUHCM
{htnguyen;trtanh}@hcmut.edu.vn
9.1
Introduction to Graphs
Contents
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

1 Graph definitions
Terminology
Special Graphs
Contents

Graph definitions

2 Representing Graphs and Graph Isomorphism Terminology


Special Graphs
Representing Graphs Representing Graphs
Graph Isomorphism and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
3 Exercise Graph

Graph Bipartie graph


Isomorphism
Bipartie graph
Isomorphism

9.2
Introduction to Graphs
Course outcomes
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Course learning outcomes

L.O.1 Understanding of logic and discrete structures


L.O.1.1 – Describe definition of propositional and predicate logic
L.O.1.2 – Define basic discrete structures: set, mapping, graphs
Contents
L.O.2 Represent and model practical problems with discrete structures Graph definitions
L.O.2.1 – Logically describe some problems arising in Computing Terminology

L.O.2.2 – Use proving methods: direct, contrapositive, induction Special Graphs

L.O.2.3 – Explain problem modeling using discrete structures Representing Graphs


and Graph
Isomorphism
L.O.3 Understanding of basic probability and random variables Representing Graphs
Graph Isomorphism
L.O.3.1 – Define basic probability theory
Exercise
L.O.3.2 – Explain discrete random variables
Graph
Bipartie graph
L.O.4 Compute quantities of discrete structures and probabilities Isomorphism

L.O.4.1 – Operate (compute/ optimize) on discrete structures


L.O.4.2 – Compute probabilities of various events, conditional
ones, Bayes theorem

9.3
Introduction to Graphs
Motivations
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

The need of the graph Its applications

• Representation/Storing • Electric circuit/board


Contents
• Searching/sorting • Chemical structure Graph definitions

• Optimization • Networking Terminology


Special Graphs

• Map, geometry, . . . Representing Graphs


and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

• Graph theory is useful for analysing “things that are Exercise


Graph
connected to other things”. Bipartie graph

• Some difficult problems become easy when represented using Isomorphism

a graph.

9.4
Introduction to Graphs
Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
A graph (đồ thị) G is a pair of (V, E), which are:
• V – nonempty set of vertices (nodes) (đỉnh) Contents

• E – set of edges (cạnh) Graph definitions


Terminology
Special Graphs
A graph captures abstract relationships between vertices.
Representing Graphs
and Graph
Isomorphism
2 4 2 4 Representing Graphs
Graph Isomorphism

Exercise
1 3 1 3 Graph
Bipartie graph
Isomorphism

Undirected graph Directed graph

9.5
Introduction to Graphs
Undirected Graph (Đồ thị vô hướng)
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition (Simple graph (đơn đồ thị))

• Each edge connects two different vertices, and Contents

• No two edges connect the same pair of vertices Graph definitions


Terminology

An edge between two vertices u and v is denoted as {u, v} Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.6
Introduction to Graphs
Undirected Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition (Multigraph (đa đồ thị))


Graphs that may have multiple edges connecting the same vertices. Contents

Graph definitions
An unordered pair of vertices {u, v} are called multiplicity m (bội Terminology

m) if it has m different edges between. Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.7
Introduction to Graphs
Undirected Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition (Pseudograph (giả đồ thị))


Are multigraphs that have Contents

• loops (khuyên)– edges that connect a vertex to itself Graph definitions


Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.8
Introduction to Graphs
Directed Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition (Directed Graph (đồ thị có hướng))


A directed graph G is a pair of (V, E), in which:
• V – nonempty set of vertices Contents

• E – set of directed edges (cạnh có hướng, arcs ) Graph definitions


Terminology

A directed edge start at u and end at v is denoted as (u, v). Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.9
Introduction to Graphs
Terminologies For Undirected Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Neighborhood
In an undirected graph G = (V, E),
• two vertices u and v ∈ V are called adjacent (liền kề ) if they
are end-points (điểm đầu mút) of edge e ∈ E, and Contents

• e is incident with (cạnh liên thuộc) u and v Graph definitions


Terminology
• e is said to connect (cạnh nối) u and v; Special Graphs

Representing Graphs
and Graph
Isomorphism
The degree of a vertex Representing Graphs
Graph Isomorphism

The degree of a vertex (bậc của một đỉnh), denoted by deg(v) is Exercise
the number of edges incident with it, except that a loop Graph
Bipartie graph
contributes twice to the degree of that vertex. Isomorphism

• isolated vertex (đỉnh cô lập): vertex of degree 0


• pendant vertex (đỉnh treo): vertex of degree 1

9.10
Introduction to Graphs
Example
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Example
What are the degrees and neighborhoods of the vertices in these
graphs?
b c d a b c
Contents

Graph definitions
Terminology
Special Graphs
a f e g e d Representing Graphs
and Graph
G H Isomorphism
Representing Graphs
Graph Isomorphism

Solution Exercise
Graph

In G, deg(a) = 2, deg(b) = deg(c) = deg(f ) = 4, deg(d) = 1, . . . Bipartie graph


Isomorphism
Neiborhoods of these vertices are
N (a) = {b, f }, N (b) = {a, c, e, f }, . . .
In H, deg(a) = 4, deg(b) = deg(e) = 6, deg(c) = 1, . . .
Neiborhoods of these vertices are
N (a) = {b, d, e}, N (b) = {a, b, c, d, e}, . . .
9.11
Introduction to Graphs
Basic Theorems
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Theorem (The Handshaking Theorem)


Let G = (V, E) be an undirected graph with m edges. Then
X Contents

2m = deg(v) Graph definitions


Terminology
v∈V
Special Graphs

Representing Graphs
(Note that this applies even if multiple edges and loops are and Graph
Isomorphism
present.) Representing Graphs
Graph Isomorphism

Exercise
Graph

Theorem Bipartie graph


Isomorphism

An undirected graph has an even number of odd-degree vertices.

9.12
Introduction to Graphs
Prove that ...
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

...
If the number of vertices in an undirected graph is an odd number,
then there exists an even-degree vertex. Contents

Graph definitions

... Terminology
Special Graphs

If the number of vertices in an undirected graph is an odd number, Representing Graphs


and Graph
then the number of vertices with even degree is odd. Isomorphism
Representing Graphs
Graph Isomorphism

... Exercise
Graph
If the number of vertices in an undirected graph is an even Bipartie graph

number, then the number of vertices with even degree is even. Isomorphism

9.13
Introduction to Graphs
Terminologies for Directed Graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Neighborhood
In an directed graph G = (V, E),
• u is said to be adjacent to (nối tới) v and v is said to be
adjacent from (được nối từ) u if (u, v) is an arc of G, and
• u is called initial vertex (đỉnh đầu) of (u, v) Contents

• v is called terminal (đỉnh cuối) or end vertex of (u, v) Graph definitions


Terminology
• the initial vertex and terminal vertex of a loop are the same. Special Graphs

Representing Graphs
and Graph
Isomorphism
The degree of a vertex Representing Graphs
Graph Isomorphism
In a graph G with directed edges: Exercise

• in-degree (bậc vào) of a vertex v, denoted by deg− (v), is Graph


Bipartie graph

the number of arcs with v as their terminal vertex. Isomorphism

• out-degree (bậc ra) of a vertex v, denoted by deg+ (v), is


the number of arcs with v as their initial vertex.
Note: a loop at a vertex contributes 1 to both the in-degree and
the out-degree of this vertex.
9.17
Introduction to Graphs
Basic Theorem
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Theorem Contents

Let G = (V, E) be a graph with directed edges. Then Graph definitions


Terminology
Special Graphs
X X
deg− (v) = deg+ (v) = |E|. Representing Graphs
and Graph
v∈V v∈V Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.18
Introduction to Graphs
Complete Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

A complete graph (đồ thị đầy đủ) on n vertices, Kn , is a simple


graph that contains exactly one edge between each pair of distinct
vertices.
Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

K5 K4

9.20
Introduction to Graphs
Cycles
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

A cycle (đồ thị vòng ) Cn , n ≥ 3, consists of n vertices


v1 , v2 , . . . , vn and edges {v1 , v2 }, {v2 , v3 }, . . . , {vn−1 , vn }, and
{vn , v1 }.
Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

C5 C4

9.21
Introduction to Graphs
Wheels
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

We obtain a wheel (đồ thị hình bánh xe) Wn when we add an


additional vertex to a cycle Cn , for n ≥ 3, and connect this new
vertex to each of the n vertices in Cn .
Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

W5 W4

9.22
Introduction to Graphs
n-cube
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

An n-dimensional hypercube (khối n chiều), Qn , is a graph that


has vertices representing the 2n bit strings of length n. Two
vertices are adjacent iff the bit strings that they represent differ in
exactly one bit position.
Contents

110 111 Graph definitions


Terminology
Special Graphs
10 11 100 101 Representing Graphs
and Graph
Isomorphism
Representing Graphs

010 011 Graph Isomorphism

0 1 Exercise
Graph
Bipartie graph
00 01 000 001 Isomorphism

Q1 Q2 Q3

What’s about Q4 ?
9.23
Introduction to Graphs
Applications of Special Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

• Local networks topologies Contents

Graph definitions
• Star, ring, hybrid Terminology

• Parallel processing Special Graphs

Representing Graphs
• Linear array and Graph
Isomorphism
• Mesh network Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.24
Introduction to Graphs
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Exercise (5)
Give the number of edges in function of number of vertices in a
complete graph Kn .

Exercise (6) Contents

Graph definitions
Give an undirected simple graph G = (V, E) with |V | = n, show Terminology

that Special Graphs

Representing Graphs
a ∀v ∈ V , deg(v) < n, and Graph
Isomorphism
b there does not exist simultaneously both a vertex of degree 0 Representing Graphs
Graph Isomorphism
and a vertex of degree (n − 1) with n ≥ 2, Exercise

c deduce that there are at least two vertices of the same degree. Graph
Bipartie graph
Isomorphism

Exercise (7)
Is it possible that each person has exactly 3 friends in the same
group of 9 people ?

9.25
Introduction to Graphs
Bipartite Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Definition
A simple graph G is called bipartite (đồ thị phân đôi) if its vertex
set V can be partitioned into two disjoint sets V1 and V2 such that
every edge in the graph connects a vertex in V1 and a vertex in V2
(so that no edge in G connects either two vertices in V1 or two
Contents
vertices in V2 ) Graph definitions
Terminology
Special Graphs
Example
Representing Graphs
and Graph
C6 is bipartite Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

C6

9.29
Introduction to Graphs
Complete Bipartite Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
A complete bipartite Km,n is a graph that
• has its vertex set partitioned into two subsets of m and n
vertices, respectively,
Contents
• with an edge between two vertices iff one vertex is in the first Graph definitions
subset and the other is in the second one Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

K3,3

9.30
Introduction to Graphs
Bipartite graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Example (Bipartite graphs?)

• C6
• Cn
• K3 Contents

• Kn Graph definitions
Terminology

• the following graph Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.31
Introduction to Graphs
New Graph From Old
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
A subgraph (đồ thị con) of a graph G = (V, E) is a graph
H = (W, F ) where W ⊆ V and F ⊆ E.
Contents
Definition Graph definitions

The union (hợp) of two simple graphs G1 = (V1 , E1 ) and Terminology


Special Graphs
G2 = (V2 , E2 ) is a simple graph with vertex set V1 ∪ V2 and edge Representing Graphs
set E1 ∪ E2 . The union of G1 and G2 is denoted by G1 ∪ G2 . and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

G1 G2 G1 ∪ G2

9.32
Introduction to Graphs
Planar Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.33
Introduction to Graphs
Planar Graphs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
• A graph is called planar (phẳng ) if it can be drawn in the
plane without any edges crossing.
• Such a drawing is called planar representation (biểu diễn
Contents
phẳng ) of the graph. Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

K4 K4 with no crossing

9.34
Introduction to Graphs
Important Corollaries
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Corollary

• If G is a connected planar simple graph with e edges and v


vertices where v ≥ 3, then e ≤ 3v − 6.
• If G is a connected planar simple graph with e edges and v
vertices where v ≥ 3, and no circuits of length 3, then Contents
e ≤ 2v − 4. Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

K3,3
Non-planar
K5
Non-planar

9.35
Introduction to Graphs
Elementary Subdivision
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
• Given a planar graph G, an elementary subdivision (phân chia
sơ cấp) is removing an edge {u, v} and adding a new vertex
w together with edges {u, w} and {w, v}. Contents

• Graphs G1 = (V1 , E1 ) and G2 = (V2 , E2 ) are called Graph definitions


Terminology

homeomorphic (đồng phôi) if they can obtained from the Special Graphs

same graph by a sequence of elementary subdivisions. Representing Graphs


and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.36
Introduction to Graphs
Kuratowski’s Theorem
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Theorem
A graph is nonplanar iff it contains a subgraph homeomorphic to
K3,3 or K5 .
Contents

Graph definitions
Terminology

a Special Graphs

Representing Graphs
and Graph
f f d Isomorphism
c j Representing Graphs
e b
j g Graph Isomorphism

a g Exercise
Graph
i h
e Bipartie graph
Isomorphism
i h
d c

9.37
Introduction to Graphs
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Exercise
• Is K4 planar?
• Is Q3 planar?

110 111 Contents

Graph definitions
Terminology

100 101 Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism
010 011 Exercise
Graph
Bipartie graph
Isomorphism
000 001

K4 Q3

9.38
Introduction to Graphs
Adjacency Lists (Danh sách kề)
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Vertex Adjacent vertices Initial vertex Terminal vertices


a b, c, e a b, c, d, e
b a b b, d
c a, d, e c a, c, e Contents

d c, e d c, e Graph definitions
Terminology
e a, c, d e b, c, d Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.39
Introduction to Graphs
Adjacency Matrices
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Definition
Adjacency matrix (Ma trận kề ) AG of G = (V, E)
• Dimension |V | × |V |
• Matrixelements
1 if (vi , vj ) ∈ E Contents
aij =
0 otherwise Graph definitions
Terminology
Special Graphs

Representing Graphs
a b and Graph
Isomorphism
Representing Graphs

 a b c d 
Graph Isomorphism

Exercise
a 0 1 1 1 Graph

b  1 0 1 0  Bipartie graph
  Isomorphism
c  1 1 0 0 
d 1 0 0 0

c d

9.40
Introduction to Graphs
Examples
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Example
Give the graph defined by the following adjacency matrix
Contents

Graph definitions

 A B C D E  Terminology
Special Graphs

Representing Graphs
A 
 0 0 1 1 0 
 and Graph
Isomorphism
B 
 0 1 0 1 0 
 Representing Graphs

C 
 1 0 0 1 0 

Graph Isomorphism

D 
 1 1 1 0 1 

Exercise
Graph
E  0 0 0 1 0  Bipartie graph
Isomorphism

9.41
Introduction to Graphs
Adjacency Matrices
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Example
Give the directed graph defined by the following adjacency matrix
Contents

Graph definitions

 A B C D E  Terminology
Special Graphs

Representing Graphs
A 
 1 0 1 1 0 
 and Graph
Isomorphism
B 
 0 0 0 0 0 
 Representing Graphs

C 
 1 0 0 0 0 

Graph Isomorphism

D 
 1 1 1 0 1 

Exercise
Graph
E  1 0 0 0 0  Bipartie graph
Isomorphism

9.42
Introduction to Graphs
Incidence Matrices
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le
Definition
Incidence matrix (ma trận liên thuộc) MG of G = (V, E)
• Dimension |V | × |E|
• Matrix 
elements
1 if ej is incident with vi Contents
mij =
0 otherwise Graph definitions
Terminology
Special Graphs

Representing Graphs
a e2 b and Graph
Isomorphism
Representing Graphs

 e1 e2 e3 e4 
Graph Isomorphism

Exercise
a 1 1 1 0 Graph
e1 b  0 1 0 1  Bipartie graph
e4 e3   Isomorphism
c  1 0 0 1 
d 0 0 1 0

c d

9.43
Introduction to Graphs
Examples
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Example
Give incidence matrix according to the following graph
Contents

F Graph definitions
Terminology
Special Graphs
B C Representing Graphs
and Graph
Isomorphism
Representing Graphs
A Graph Isomorphism

Exercise
Graph

E D Bipartie graph
Isomorphism
G

9.44
Introduction to Graphs
Graph Isomorphism
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Definition
G1 = (V1 , E1 ) and G2 = (V2 , E2 ) are isomorphic (đẳng cấu) if
there is a one-to-one function f from V1 to V2 with the property
that a and b are adjacent in G1 iif f (a) and f (b) are adjacent in Contents
G2 , for all a and b in V1 . Such a function f is called an Graph definitions
isomorphism (một đẳng cấu). Terminology
Special Graphs
(i.e. there is a one-to-one correspondence between vertices of the Representing Graphs
two graphs that preserves the adjacency relationship.) and Graph
Isomorphism
Representing Graphs
Graph Isomorphism
u1 u2 v1 v2
Isomorphism function f : U −→ Exercise
Graph

V with Bipartie graph

f (u1 ) = v1 f (u2 ) = v4 Isomorphism

f (u3 ) = v3 f (u4 ) = v2
u3 u4 v3 v4

9.45
Introduction to Graphs
Bipartie graph
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.46
Introduction to Graphs
Isomorphism ?
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Contents

Graph definitions
Terminology
Special Graphs

Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

Exercise
Graph
Bipartie graph
Isomorphism

9.47
Introduction to Graphs
Isomorphism?
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

A
A B Contents

B Graph definitions
Terminology
Special Graphs

C F C Representing Graphs
and Graph
Isomorphism
Representing Graphs
Graph Isomorphism

D E D Exercise
Graph
G2
F E Bipartie graph
Isomorphism
G1

9.48
Introduction to Graphs
Isomorphism?
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

A1 A2 B2

Contents

Graph definitions
Terminology

D1 E1 E2 F2 Special Graphs

Representing Graphs
and Graph
Isomorphism
F1 Representing Graphs
Graph Isomorphism

Exercise
C1 B1 D2 C2 Graph

G1 G2 Bipartie graph
Isomorphism

9.49
Introduction to Graphs
Isomorphism
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Are the simple graphs with the following adjacency matrices


isomorphic ?
   
0 0 1 0 1 1 Contents

1  0 0 1   1 0 0  Graph definitions
Terminology
1 1 0 1 0 0 Special Graphs
    Representing Graphs
0 1 0 1 0 1 1 1 and Graph
 1 0 Isomorphism
0 1   1 0 0 1  Representing Graphs
2    
 0 0 0 1   1 0 0 1  Graph Isomorphism

1 1 1 0 1 1 1 0 Exercise
Graph
   
0 1 1 0 0 1 0 1 Bipartie graph
Isomorphism
 1 0 0 1   1 0 0 0 
3    
 1 0 0 1   0 0 0 1 
0 1 1 0 1 0 1 0

9.50
Introduction to Graphs
Isomorphism
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
Ngoc Le

Determine whether the graphs (without loops) with the incidence


matrices are isomorphic.
Contents
   
1 0 1 1 1 0
Graph definitions
•  0 1 1   1 0 1  Terminology

1 1 0 0 1 1 Special Graphs

    Representing Graphs
1 1 0 0 0 0 1 0 0 1 and Graph
Isomorphism

•  1 0 1 0 1   0 1 1 1 0 
    Representing Graphs
Graph Isomorphism
 0 0 0 1 1   1 0 0 1 0 
Exercise
0 1 1 1 0 1 0 1 0 1 Graph
Bipartie graph
• Extend the definition of isomorphism of simple graphs to Isomorphism

undirected graphs containing loops and multiple edges.


• Define isomorphism of directed graphs

9.51

You might also like