COMP 210
Lecture 19
1
Announcements
2
Graphs
3
Planar Graph
4
Planar Graph
5
Planar Graph
6
Planar Graph
7
Planar Graph
8
Planar Graph
9
Bipartite Graph
10
More Bipartite
11
Are trees bipartite?
12
Graph Representations
13
Adjacency Matrix (unweighted edges)
14
Adjacency Matrix (weighted edges)
15
Adjacency Matrix Drawbacks
16
Sparse vs. Dense Graphs
17
Complete Graphs are Dense
18
Adjacency List
19
Adjacency List Misc.
20
Vertex and Edge Maps
21
Topological Sort: Our first graph algorithm
22
Examples of Topo Sort (1/2)
23
Examples of Topo Sort (2/2)
24
Degree Properties
25
Topological Sort Algorithm
26
Execute on Example (1/2)
27
Execute on Example (2/2)
28
What happens with cycles?
29
Topological Analysis
30
Efficient Topo Sort Implementation
31
Graph from LS18
32
Shortest Path Algorithms
33
Shortest Path
34
Unweighted Shortest Path
35
(Bad) Unweighted Shortest Path
36
(Bad) Unweighted Shortest Path
37
An Improvement
38
Unweighted Shortest Path (1/3)
39
Unweighted Shortest Path (2/3)
40
Unweighted Shortest Path
41
Unweighted Shortest Path
42
Convince ourselves queue gives Breadth First Search
43
Djikstra’s Algorithm
44
Djikstra’s Algorithm
45
Djikstra’s Algorithm
46
Misc. Notes
47