61B-27: Graphs
Contents
intro
types of graph
terminology
图论问题
- s-t Path. Is there a path between vertices s and t?
- Shortest s-t Path. What is the shortest path between vertices s and t?
- Cycle. Does the graph contain any cycles?
- Euler Tour. Is there a cycle that uses every edge exactly once?
- Hamilton Tour. Is there a cycle that uses every vertex exactly once?
- Connectivity. Is the graph connected, i.e. is there a path between all vertex pairs?
- Biconnectivity. Is there a vertex whose removal disconnects the graph?
- Planarity. Can you draw the graph on a piece of paper with no crossing edges?
- Isomorphism. Are two graphs isomorphic (the same graph in disguise)?
Graph problems: Unobvious which are easy, hard, or computationally intractable.
Graph Representations
- Common Simplification: Integer Vertices
API
|
|
#1 Adjacency Matrix
#2 edge set
#3 Adjacency List
$\Theta(V) \rightarrow \Theta(V^2) $ √
$$
\Theta(V+E)
$$
才是有意思的答案
总结
|
|
Depth First Traversal
implementation
|
|