Professional Documents
Culture Documents
Michael Kirley
Lecture 7
Semester 1, 2017
f d f
d
b e g b e g
d f f
d
b e g b e g
d f d f
b e g b e g
V = {a, b, c, d , e, f , g } V = {a, b, c, d , e, f , g }
E = symmetric closure of E = {(a, b), (a, c), (a, d ),
{(a, b), (a, c), (a, d ), (a, e), (b, d ), (c, f ),
(a, e), (b, d ), (b, e), (d , e), (e, b), (g , f )}
(c, f ), (d , e), (f , g )}
Algorithms and Complexity (2017) Graphs and Graph Concepts 4 / 17
More Graph Concepts: Degrees of Nodes
d f
A cycle is a simple path, except that v0 = vk , that is, the last node is
the same as the first node.
Algorithms and Complexity (2017) Graphs and Graph Concepts 6 / 17
More Graph Concepts
Unweighted: Weighted:
9
a c a c
1 3
f 7
d
4 f
d
1 2 2
b e g b e g
5
Dense: Sparse:
a c a c
d f f
d
b e g b e g
d f f
d
b e g b e g
d f f
d
b e g b e g
a
A (free) tree is a connected
acyclic graph. b c d
A rooted tree is a tree with
e f g h i
one node identified as special.
Every other node is reachable
j
from the node.
When the root is removed, a set of rooted (sub-)trees remain.
walls doors
foundation windows
roof painting
a b c d e f g
a c a 0 1 1 1 1 0 0
b 1 0 0 1 1 0 0
f c 1 0 0 0 0 0 0
d
d 1 1 0 0 1 0 0
b e g e 1 1 0 1 0 0 0
f 0 0 0 0 0 0 1
g 0 0 0 0 0 1 0
a →b→c →d →e
a c b →a→d →e
c →a
d →a→b →e
d f
e →a→b →d
e g f →g
b
g →f
a b c d e f g
a 0 1 1 1 1 0 0
a c b 0 0 0 1 0 0 0
c 1 0 0 0 0 0 0
f d 0 0 0 0 1 0 0
d
e 0 1 0 0 0 0 0
b e g f 0 0 0 0 0 0 0
g 0 0 0 0 0 1 0
a →b→c →d →e
b →d
a c
c →a
d →e
d f
e →b
g f
b e
g →f
Think of some! ✎