12 Graph
12 Graph
12 Graph
Graph
Dr. Lê Nguyên Khôi
The VNU University of Engineering and Technology
Contents
Definition
Terminology
Representation
Traversal
Topological sort
Directed
Weighted
Connected
Cycle
Network
undirected directed
Cầu Giấy Cầu Giấy
Ngã tư Sở Ngã tư Sở
unweighted weighted
Cầu Giấy 5 Cầu Giấy 7
11 15
Ngã tư Sở Ngã tư Sở
connected disconnected
cycle no cycle
Transportation
Communication
Information
Social
Dependency
PVD
ORD
SFO
LGA
HNL
LAX
DFW
MIA
Adjacency list
One-dimensional array of lists
Each list for a vertex consists of
Node such that
Adjacency matrix
Two-dimensional array
Each vertex is numbered
Value of 1 indicates that
Adjacency list
Sparse graph
is much smaller than
Determine edges reached from
Adjacency matrix
Dense graph
is close to
Determine edge
For both directed and undirected graphs
Determine cycles
LTNC
Toán
cao
cấp
LTHĐT CTDL
>
(a, c, b, d, e, f)
or
c d
(a, b, d, c, e, f)
…
e f