Graph

Dependencies: None

A directed graph $G$ is the pair $(V, E)$, where $E$ contains some ordered pairs on $V$. I.e. $E \subseteq V \times V$.

An undirected graph $G$ is the pair $(V, E)$, where $E$ contains some 2-element subsets of $V$. These subsets are often denoted as $(u, v)$ instead of $\{u, v\}$.

When $E$ is allowed to be a multi-set (a set which can have repeated elements), we get directed multigraphs or undirected multigraphs.

Definitions

Definitions for directed graphs

Definitions for undirected graphs

Dependency for:

  1. Path in Graph
  2. Topological sort
  3. Transpose of a graph
  4. Adjacency matrix
  5. Degree sum and number of edges
  6. Breadth-first search
  7. Cut in a graph
  8. Properties of DFS

Info:

Transitive dependencies: None