Undirected Graph (G = (V, E), where V, E are sets): may not be all reachable
1 \leq n = |V|: number of vertice
0 \leq m = |E| \leq n^2: number of edges
Trivial Graph: n = 1
Regular Graph: every vertex has same degree (d-regular if all vertices has degree of d)
Sparse Graph: m = O(n)
Dense Graph: m = \Omega(n^2)
Connected Graph: (\forall u, v \in V)(v \text{is reachabble from }u)
Walk(path): walk in G is sequence of vertices v_0, v_1, v_2, ..., v_n such that (\forall 1 \leq t \leq n)(\{v_{t-1}, v_t\} \in E)
walk length: length of walk from v_0 to v_n is n.
distance: length of shorted path \text{dist}(u, v) = \min(|\pi| | \pi : u \rightarrow v)
simple: all vertices are distinct in path
cycle: source is the target for |V| \geq 1
simple cycle: all nodes appear once, ignore the target
Cost Function: \lambda: E \rightarrow \mathbb{N}_+
Path Cost: \lambda(\pi) = \sum_{p \in \pi} \lambda(p)
Cost Between Vertex: \text{cost}(s, t) = \min(\lambda(\pi) | \pi : s \rightarrow t)
No Path Cost: \text{cost}(s, t) = \infty
Reachable (equivalence relation): v is reachable from u if there is a path from u to v
Reachable in B step as Boolean Matrix Multiplication: C(i, j) = \bigvee_k A(i, k) \land A(k, j)
Let A be adjacency matrix of G, then A^k(u, v) = 1 \iff \text{ there is a path } \pi : u \rightarrow v \text{ of length} k \text{ in } G.
but boolean matrix multiplication is costly
Worst Case: A^* = I + A + A^2 + ... + A^{|V|-1}
Directed Graph: edge is ordered pair
out degree: number of edges come out \text{deg}_{\text{out}}(u) = |\{v | (u, v) \in E\}|
in degree: number of edges come in \text{deg}_{\text{in}}(u) = |\{v | (v, u) \in E\}|
strongly connected: (\forall u, v \in V)(v \text{is reachabble from }u)
General Graph: allow parallel edges and self-loops
Endpoints: u, v are endpoints of e = \{u, v\} \in E. Adjacent: u, v are adjacent when e = \{u, v\} \in E. Incident: u, v are incident on e = \{u, v\} \in E. Neighbore: u, v are neighbore of v, u respectively when e = \{u, v\} \in E. Neighborehood: neighborehood of vertice u is the set of vertices N(u) = \{v | \{u, v\} \in E\} connected to u. Degree: degree of u is |N(u)|
Adjacency Matrix: A[i,j] = \begin{cases} 1 \text{ if } i, j \text{ are adjacent}\\ 0 \text{ otherwise}\\ \end{cases}
O(1) look up, but n^2 space (wasteful for sparse graph)
\Omega(n) to enumerate neighbores
Adjacency List: |V|-dimension array each storing its neighbores in chain.
\Omega(\text{degree}(u)) = \Omega(n) look up O(m+n) space
O(\text{degree}(u)) to enumerate neighbores
Maximum Cut: separate vertice into two groups, making as many edges connected to different group as possible
Graph: equivalent to relation
Dirrected Graph: G = \langle{V, E \subseteq V \times V}\rangle
Dirrected Multi-Graph: G = \langle{V, E, \text{src}, \text{trg}}\rangle such that \text{src}, \text{trg}: E \rightarrow V are two maps
Undirected Graph: G = \langle{V, E \subseteq V \times V}\rangle where E is a set of one or two element (depending on whether self loop)
Isomorphic: Let G_1 = \langle{V_1, E_1}\rangle, G_2 = \langle{V_2, E_2}\rangle. G_1, G_2 are isomorphic if there is a bijection f : V_1 \rightarrow V_2 such that (u, v) \in E_1 \iff (f(u), f(v)) \in E_2
Sparse Graph: |E| \leq |V|^2
Minor: graph H is a minor of G if it can be obtained from G by a sequence of vertex removals.
edge removal: remove edge only
edge contraction: remove edge \{x, y\}, introduce new vertex v and connect it to the neighbors of x and y (kill multiple edges)
Obstruction: a minor of the graph that, once find, get the entire graph out of the class
Checking minor is for fixed minor O(n^2) but we don't know the exact constant.
Planar Graph: can be drawned without any edges
Theorem: a graph is planar iff it does not contain a K_5 or a K_{3, 3} as a minor
Algorithm: Tarjan
Closed Under Minor: every minor of a planer graph is a planar graph
Table of Content