Week 13, Monday
March 30, 2026
How do we get from here to there? Need:
1. Common Vocabulary
2. Graph implementation
3. Traversal
4. Algorithms.

Graph (V,E):
V: ___________________
E: ___________________
Sparse Graph:
\(|E| = O(|V|)\)

Graph (V,E):
V: ___________________
E: ___________________
Directed Graph: each edge \((u,v)\) is ordered — \((u,v) \neq (v,u)\). Streets like Howe (↓) and Seymour (↑) make this directed.
Weighted Graph: each edge carries a weight \(w(u,v)\) — here, travel time in minutes.
In/Out-degree(v): # edges directed into / out of \(v\). A one-way intersection has in-degree \(\neq\) out-degree.
Fastest route: Seymour & Georgia → Burrard & Helmcken?

\(G = (V,E) \qquad |V| = n \qquad |E| = m\)
Running times are often reported in terms of \(n\), the number of vertices, but they often depend on \(m\), the number of edges.
Suppose \(n = 100\) vertices…
Give a lower bound on \(|E|\): ______
Give an upper bound on \(|E|\): ______

\(G = (V,E) \qquad |V| = n \qquad |E| = m\)
How many edges?
You each have a graph. Do these three things:
Sketch the graph given on your card.
Try to trace every edge exactly once without lifting your pencil.
Come up with a rule that you can use to determine if a trace is possible.
Speculate on an algorithm that will find a trace if it exists.

How do we get from here to there? Need:
1. Common Vocabulary
2. Graph implementation
3. Traversal
4. Algorithms.