2
Graphs
• Telecommunication and computer networks are naturally
represented by graphs
• A graph
G = (V, E)
is a mathematical structure consisting of
two sets
V
and
E
two sets
and
• Elements of
V
are called
vertices
(or nodes)
–For example, switches, routers, crossconnects
• Elements of
E
are called
edges
–Communication links are edges (wired or wireless)
–Each edge has two endpoints
Vertex
V
v
v
)
,
(
2
1
Telcom 2110
3
A
B
C
D
E
F
G
V
={A,B,C,D,E,F,G}
E
= {(A,B),(A,C), (A,D), (B,C), …. , (F,G)}
Edge
Terminology
• Networking tends to use notation
G(N,L)
instead of
G(V, E)
for a graph where
N
is set of nodes and
L
is set of links
• A graph is
simple
if it has no loops or parallel edges.
Loop
–
• Link where both endpoints are the same node. Also called a self-loop.
–
Parallel
edges
•
A collection of two or more links having identical ends. Also called a multi-edge.
– Focus on simple graphs
•
Degree
of a node (vertex):
d
i
– Number of
links/edges out of a node (assuming same number of in
and out links
Telcom 2110
4
and out links)
• Adjacent nodes/vertices:
– Two nodes are adjacent if there is a link that has them as endpoints
node degree
d
i
= number of neighbor nodes of node
i