Download presentation
Presentation is loading. Please wait.
1
Playing with Graphs Alex Andreotti
2
Countries of Bug World
3
Countries of Bug World
4
Countries of Bug World Bugs are stupid: can’t measure length, curving.
Tunnels are dark, and bugs can’t see much anyway.
5
Countries of Bug World Country
6
Countries of Bug World City
7
Countries of Bug World City City City City
8
Countries of Bug World Tunnels
9
Bug An lives in this country
Countries of Bug World Bug An lives in this country
10
Bug Adam lives in this one
Countries of Bug World Bug Adam lives in this one
11
Can they figure out they live in different countries?
Countries of Bug World Can they figure out they live in different countries?
12
Countries of Bug World An’s Country Jeremy’s Country
13
Same or Different?
14
Same or Different?
15
Same or Different?
16
Same or Different?
17
Same or Different?
18
Same or Different?
19
Same or Different?
20
Same or Different?
21
Countries of Bug World Task 1:Devise a precise description of what it means for two countries to be “the same” as far as the bugs are concerned.
22
Countries of Bug World Task 2:Julie-Bug says “My country has seven cities and nine tunnels. One city has just one tunnel connected to it, one city has five tunnels connected to it, two cities have three tunnels connected to them, and the other three cities have two connecting tunnels” How many different countries can you draw that fit this description? How can you tell them apart?
23
Countries of Bug World Graph Theory
24
Graph Theory Countries Graphs
25
Graph Theory Countries Cities Graphs Points/Vertices
26
Graph Theory Countries Cities Tunnels Graphs Points/Vertices
Lines/Edges
27
Graph Theory Graph
28
Graph Theory Vertex
29
Graph Theory Vertices
30
Note: One Vertex, Many Vertices
Graph Theory Vertex Vertices Note: One Vertex, Many Vertices
31
Graph Theory Edges
32
Graph Theory One Graph…
33
Graph Theory One Graph…
34
Graph Theory One Graph…
35
Graph Theory One Graph…
36
Graph Theory One Graph…
37
Graph Theory One Graph…
38
Graph Theory One Graph…
39
One Graph, Many Graph Diagrams
Graph Theory One Graph, Many Graph Diagrams
40
Here’s another graph diagram of the same graph
Graph Theory Here’s another graph diagram of the same graph
41
Graph Theory Connected Graph
42
Graph Theory Disconnected Graph
43
Disconnected graph is just a collection of connected components
Graph Theory Disconnected Graph Component Component Disconnected graph is just a collection of connected components
44
Diagrams are just one way to represent (some) graphs.
Graph Theory Diagrams are just one way to represent (some) graphs.
45
Graph Theory Other examples:
People (vertices), know each other (edges)
46
Graph Theory Other examples:
Tennis players (vertices), played against (edges)
47
Graph Theory Other examples:
Countries (vertices), share a border (edges)
48
Graph Theory New Rules
49
Graph Theory New Rules 1. No Loops
50
Graph Theory New Rules 1. No Loops 2. No multiple edges
51
Draw all the graphs with 4 vertices.
Task 3 Draw all the graphs with 4 vertices.
52
Task 3 Draw all the graphs with 4 vertices. • • • •
Here’s one with no edges
53
Draw all the graphs with 4 vertices.
Task 3 Draw all the graphs with 4 vertices. • • • • • • • • Is there a different graph (not a graph diagram, but a graph), with only one edge?
54
Draw all the graphs with 4 vertices.
Task 3 Draw all the graphs with 4 vertices. • • • • • • • • Same or different?
55
Task 3 Draw all the graphs with 4 vertices. • • • • • • • •
Find all the other graphs in our catalog.
56
Task 4 Draw all the graphs with 5 vertices. (Hint: there are between 30 and 40. Look for patterns.)
57
Task 5 Explain the patterns that we find while counting graphs with 1, 2, 3, etc. edges in graphs with n vertices.
58
Task 6 Device a simplest way to communicate a graph (not a graph diagram, just a graph) over the telephone.
59
Paths a b g c f e d
60
Paths a b g c f e d (d, c, …)
61
Paths a b g c f e d (d, c, b, …)
62
Paths a b g c f e d (d, c, b, d)
63
Paths a b g c f e d (f, e, d, b, c)
64
Paths a • b g • c f e d (e, g, b, a, b, g)
65
Paths • • • • • • • closed not closed not closed
66
Paths • • f closed simple not closed simple not closed not simple
67
Paths not closed not closed closed+simple simple not simple circuit ll
g not closed simple not closed not simple closed+simple ll circuit
68
Trees
69
Trees Not a Tree Tree
70
Trees Draw a bunch of trees
71
Task 7 What is the relationship between the number of vertices
and the number of edges in a tree? Why does this relationship hold?
72
Task 8 Draw all the trees with 5 vertices. Then all the ones with 6.
There are between 20 and 30 with 8 vertices. Find them.
73
Task 9 Which algorithm/method would you use if you had to find
all trees with a given number of vertices (say, 12)?
74
Task 10 Revisit the method we had to communicate a graph
over the phone. Do you have a better, simpler one that would work just for trees?
75
Trees in Graphs
76
Trees in Graphs A Spanning Tree
77
Trees in Graphs Can you find another one?
How can we count how many there are in a given graph?
78
Regions in Graphs
79
Regions in Graphs 1
80
Regions in Graphs 1 2
81
Regions in Graphs 1 2 4 3
82
Regions in Graphs 1 5 2 4 3 The Outside region
83
(Regions are aka Faces)
Regions in Graphs 1 5 2 4 3 (Regions are aka Faces)
84
Draw several graphs and record the following:
Task 11 Draw several graphs and record the following: Number of vertices (v) Number of edges (e) Number of faces (f) Number of vertices in Spanning Tree (A) Number of edges in Spanning Tree (B) Number of edges not in Sp. Tree (C)
85
Task 11
86
Task 11 • • • • • v=8 • • •
87
Task 11 3 1 2 4 5 v=8 e=11 11 6 9 8 10 7
88
Task 11 5 1 v=8 e=11 f=5 2 4 3
89
Task 11 • • • v=8 e=11 f=5 A=8 • • • • •
90
Task 11 7 v=8 e=11 f=5 A=8 B=7 1 2 3 6 4 5
91
Task 11 v=8 e=11 f=5 A=8 B=7 C=4
92
Task 11 Draw several graphs and record the following:
Number of vertices (v) Number of edges (e) Number of faces (f) Number of vertices in Spanning Tree (A) Number of edges in Spanning Tree (B) Number of edges not in Sp. Tree (C) Do only connected graphs w/o crossing edges
93
What patterns did you find? Explain why they work.
Task 12 What patterns did you find? Explain why they work.
94
Use your findings to show
Task 13 Use your findings to show v – e + f = 2
95
Euler’s Formula v – e + f = 2
96
Euler’s Formula “Oiler’s” v – e + f = 2
97
A graph has 7 vertices and 9 edges. How many faces should it have?
Task 13 A graph has 7 vertices and 9 edges. How many faces should it have? Try to draw a graph with 7 v’s and 9 e’s without the requisite number of faces.
98
Euler’s Formula? • • • •
99
Euler’s Formula? • • v=4 e=6 f=5 • •
100
Euler’s Formula? • • v=4 e=6 f=5 • • 4 – ≠ 2 ???
101
Euler’s Formula? • • v=4 e=6 f=5 • • “Fake” regions
102
Euler’s Formula? 4 • • • • v=4 e=6 f=4 3 1 2 • • • • “Fake” regions
103
Euler’s Formula? v=4 e=6 f=4 4 – 6 + 4 = 2 “Fake” regions • • • • • •
3 1 2 • • • • 4 – = 2 “Fake” regions
104
Planar version of same graph
Euler’s Formula? • • • • • • • • Non-planar graph Planar version of same graph
105
Euler’s Formula Non-planar graph Planar version of same graph
• • • • • • • • Non-planar graph Planar version of same graph Euler’s only works on planar graphs
106
Do all graphs have a planar version?
Important Question Do all graphs have a planar version? If not, which ones do? • • • • • • • •
107
Task 14 What happens with Euler’s Formula when a graph is NOT connected? Can you fix it?
108
n vertices - all connected to each other
K Graphs n vertices - all connected to each other
109
K Graphs • • • • K4
110
How many edges does K5, K6, Kn have?
Task 15 How many edges does K5, K6, Kn have?
111
Draw K5, both in non-planar, and in planar versions.
Task 16 Draw K5, both in non-planar, and in planar versions.
112
Task 16 Draw K5, both in non-planar, and in planar versions.
You are failing at this, aren’t you?
113
Task 16 Draw K5, both in non-planar, and in planar versions.
Let’s see if you can prove it’s not possible
114
Let’s focus on this face
Orders of Faces Let’s focus on this face
115
Orders of Faces It has 4 edges as boundary
we call this the order of the face
116
Orders of Faces o(f)=4
117
Orders of Faces o(f)=3
118
Task 17 Claim 1: Sum of all orders of all faces = 2 x number of edges
Draw a bunch of graphs and see if true. Why is it true?
119
Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges
is true for all (planar) graphs. Try to prove me wrong, find which graphs have 3f=2e, and see if you can understand why my claim is true.
120
Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges
is true for all (planar) graphs. aka, Every face is at least a triangle
121
Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges
is true for all (planar) graphs. aka, Every face is at least a triangle (and each edge has two faces - so it’s counted twice)
122
Task 19 Proving that K5 is not planar:
Use Euler’s Formula and 3f≤2e to prove it. (Hint: What do we know about K5?)
123
Task 20 Draw a planar version of the following graphs,
or prove that it’s not possible to do so: v=7, e=17 v=8, e=12 v=7, e=15
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.