Professional Documents
Culture Documents
1 Graphs
2 Graph Nomenclature
3 Graph Examples
5 Tours
(Undirected) Graphs
• Graphs are items together with 𝑎 𝑏
binary relations
• Items are called vertices (or nodes)
• Relations are called edges (or arcs)
𝑐 𝑑
• Formally:
• 𝐺 = (𝑉 , 𝐸)
• 𝐺 is an ordered pair
𝐺 = (𝑉 , 𝐸)
• 𝑉 is a set of vertices
𝑉 = {𝑎, 𝑏, 𝑐, 𝑑}
• Every element of 𝐸 is an
𝐸 = {{𝑎, 𝑏}, {𝑎, 𝑐}, {𝑎, 𝑑},
unordered pair (a set) from
𝑉 ×𝑉 {𝑏, 𝑐}, {𝑐, 𝑑}1 , {𝑐, 𝑑}2 ,
• Note the two distinct edges {𝑑, 𝑑}}
between 𝑐 and 𝑑
𝑐 𝑑
Paths
𝑒1
𝑎 𝑏
𝑒7
𝑒3
𝑒6
𝑒2 𝑒5
4
𝑒
𝑒9 𝑒10
𝑒8 𝑐 𝑑 𝑒
Subgraphs
𝑒1
𝑎 𝑏
𝑒7
𝑒3
𝑒6
𝑒2 𝑒5
4
𝑒
𝑒9 𝑒10
𝑒8 𝑐 𝑑 𝑒
Rosslyn Chinatown
King Street
Fo Str aza
L’ to on
Pe yn er
iu n
sl nt
na rn
l
r t ee
P
ad te
ou n
En w
os Ce
e
M go
m
K ant
St Tot
C tV
ro
f
nt
g
et
hi
in
M
R
Metro Center 2 1 2
Rosslyn 2 1
Pentagon 1 1 2
Mount Vernon 2 1
Chinatown 1 2 2 1
L’Enfant Plaza 2 1 2 2
King Street 2
Fort Totten 1 1
Stadium 2
Degree 5 3 4 3 6 7 2 2 2
Edge Labels
Rosslyn Chinatown
King Street
Plaza
L'Enfant
za
L'E
Met
Pla
nter
nfa L'E
nt
ro C
nt
e
nf
nfa
ro C
Pla an
tP
L'E
laz
nter
za
Stadium
Met
a
Metro Center
n
go
t
ta
Rosslyn
e
re
n
Pe
St
L'Enfant Plaza
ng
Ki
• What is a vertex or an edge is up to us
• The graph is in the eye of the beholder
• Warning: It does not always make sense to swap vertices with
edges
COMPSCI 230 — Discrete Math Graphs March 23, 2017 12 / 20
Tours
Tours
𝑒1
𝑎 𝑏
𝑒4
𝑒3 𝑒2 𝑒6
𝑒7
5
𝑒
𝑒9
𝑐 𝑑 𝑒
𝑒8
• The path
(𝑒, 𝑒7 , 𝑏, 𝑒1 , 𝑎, 𝑒2 , 𝑐, 𝑒5 , 𝑏, 𝑒5 , 𝑐, 𝑒9 , 𝑑, 𝑒4 , 𝑎, 𝑒2 , 𝑐, 𝑒8 , 𝑐, 𝑒3 , 𝑎, 𝑒1 , 𝑏)
is an edge tour of 𝐺, because it traverses every edge
• It is also a vertex tour, because it traverses every vertex
• The path (𝑒, 𝑒7 , 𝑏, 𝑒5 , 𝑐, 𝑒9 , 𝑑, 𝑒4 , 𝑎, 𝑒2 , 𝑐, 𝑒8 , 𝑐, 𝑒3 , 𝑎, 𝑒1 , 𝑏, 𝑒6 , 𝑑) is
an Euler tour of 𝐺, because it traverses every edge exactly once
• The path (𝑎, 𝑒2 , 𝑐, 𝑒9 , 𝑑, 𝑒6 , 𝑏, 𝑒7 , 𝑒) is a Hamilton tour because it
traverses every vertex exactly once
𝑒4
𝑒3 𝑒2 𝑒6
𝑒7
5
𝑒
𝑒9 𝑒10
𝑐 𝑑 𝑒
𝑒8
• The circuit
(𝑑, 𝑒10 , 𝑒, 𝑒7 , 𝑏, 𝑒5 , 𝑐, 𝑒9 , 𝑑, 𝑒4 , 𝑎, 𝑒2 , 𝑐, 𝑒8 , 𝑐, 𝑒3 , 𝑎, 𝑒1 , 𝑏, 𝑒6 , 𝑑)
is an Euler circuit of 𝐺, because it traverses every edge exactly
once
• The circuit (𝑎, 𝑒2 , 𝑐, 𝑒9 , 𝑑, 𝑒10 , 𝑒, 𝑒7 , 𝑏, 𝑒1 , 𝑎) is a Hamilton circuit
because it traverses every vertex exactly once (before returning
to the original vertex)
Euler’s Theorem
• Not every graph has an Euler tour, an Euler circuit, a Hamilton
tour, or a Hamilton circuit
• This simple graph has none of them:
6 1
5 2
4 3