Graph Theory
Graph theory studies graphs — collections of objects (vertices) connected pairwise by relations (edges). One-line statement: a graph encodes which pairs of a set are related. Key result in words: deep structure (connectivity, colorability, planarity, matchings, flows) follows from simple combinatorial axioms. Applies in computer science, networks, chemistry, operations research, and discrete optimization. Founded by Leonhard Euler in 1736 with the Königsberg bridges problem; matured in the 19th–20th centuries.
Almost any system of pairwise relations can be abstracted to a graph, and once abstracted, the same combinatorial tools apply regardless of the original domain. The structure of a graph is governed by local data (vertex degrees, neighborhoods) that constrains global properties (connectivity, cycles, colorability). The art of graph theory is translating a question — "Can we schedule these exams?", "Is this network robust?", "Can this molecule exist?" — into a statement about vertices and edges, then exploiting universal theorems.
Formal Statement
A (simple, undirected) graph is an ordered pair where:
- is a finite nonempty set of vertices (also nodes),
- is a set of edges, each an unordered pair of distinct vertices.
We write for the order and for the size. Two vertices joined by an edge are adjacent; an edge is incident to its endpoints. Variants:
- A multigraph allows multiple edges between the same pair.
- A graph with loops allows edges .
- A directed graph (digraph) uses ordered pairs (arcs).
- A weighted graph assigns .
The degree of a vertex is the number of edges incident to it. In a simple graph,
Derivation hint: count neighbors directly; each adjacency contributes exactly one to the count. The minimum and maximum degrees are and .
For any finite graph ,
Derivation hint: each edge has two endpoints, so summing degrees double-counts every edge. A corollary: the number of vertices of odd degree is even.
Derivation hint: split the sum in [2] into odd- and even-degree parts; the total is even, the even part is even, so the odd part has even cardinality.
For , the adjacency matrix is the matrix with
Derivation hint: read off adjacency as a 0/1 incidence indicator; for simple graphs is symmetric with zero diagonal. The number of walks of length from to equals the entry of :
Derivation hint: induct on ; matrix multiplication sums over all intermediate vertices, exactly enumerating concatenations of a walk of length with one edge.
A walk is an alternating sequence of vertices and edges; a path is a walk with no repeated vertex; a cycle is a closed path. is connected if every pair of vertices is joined by a path. A maximal connected subgraph is a connected component. The distance is the length of a shortest – path (or ).
Why It Holds / Derivation
We prove equation [2]. 1. Consider the set of incidences . 2. Count by vertices. For each vertex , the number of incidences involving is exactly (one per incident edge). Hence . 3. Count by edges. Each edge has exactly two endpoints, contributing exactly incidences. Hence . 4. Equating the two counts: .
∎We prove [5] by induction on . 1. Base : counts the walks of length 1 (single edges) from to . True. 2. Inductive step: Assume counts walks of length from to . A walk of length from to is a walk of length from to some intermediate vertex , followed by an edge . 3. Summing over all valid :
Derivation hint: this is the definition of matrix multiplication ; each term counts (walks to ) × (edge ). 4. The right side counts exactly all length- walks, completing the induction.
∎Euler launched graph theory in 1736 by solving the Seven Bridges of Königsberg: could a citizen cross each of the city's seven bridges exactly once and return home? Euler abstracted the four landmasses into vertices and the bridges into edges, then showed the walk is impossible because more than two vertices had odd degree. This established the principle — still central — that the answer depends only on the abstract incidence structure, not on geometry. Euler also gave the polyhedral formula , foundational to planar graph theory and topology. His genius was recognizing that a physical puzzle reduces to a counting argument over degrees.
Building Intuition
Think of a graph as a "relationship diagram." Vertices are entities; an edge means "these two are directly linked." Almost every property has a tangible reading:
- Degree = popularity / number of direct connections.
- Connected = you can travel between any two points.
- Path = a route with no backtracking through the same place.
- Cycle = a round trip returning to start.
- Bipartite = the entities split into two camps, with links only between camps (think jobs vs. applicants).
- Tree = a minimally connected network — remove any edge and it falls apart; add any edge and you create a loop.
The handshaking lemma is just "at a party, the total number of handshake-ends is twice the number of handshakes." The adjacency-matrix power trick says "to count -step journeys, multiply the one-step map by itself times" — propagation of reachability through repeated composition.
Worked Examples
Given: A graph on with edges . So .
Step 1 — compute degrees.
- : edges →
- : edges →
- : edges →
- : edges →
- : edges →
Step 2 — sum degrees. .
Step 3 — check against . . ✓
Step 4 — odd-degree count. Odd-degree vertices: → exactly , which is even, consistent with [3].
Given: A path graph on vertices with adjacency matrix
Derivation hint: entry 1 marks each adjacent pair; vertex 2 is the center adjacent to both ends.
Step 1 — square .
Derivation hint: multiply ; since vertex 2 reaches itself via and .
Step 2 — interpret entries. Number of length-2 walks from vertex 1 to vertex 3 is (the walk ). Number of length-2 closed walks at center vertex 2 is .
Step 3 — total closed length-2 walks (each edge traversed forward+back gives 2 closed walks; edges → 4). ✓
Common Misconceptions
"A walk, path, trail, and cycle are the same thing." They are not:
- Walk: vertices/edges may repeat.
- Trail: no repeated edge (vertices may repeat).
- Path: no repeated vertex (hence no repeated edge).
- Cycle/Circuit: closed; a cycle additionally has no repeated internal vertex.
Confusing these breaks theorems: an Eulerian trail uses every edge once; a Hamiltonian path uses every vertex once. These are vastly different in difficulty — Eulerian existence is decided instantly by degree parity, while Hamiltonicity is NP-complete.
Two graphs can have identical degree sequences yet not be isomorphic. Consider degree sequence on six vertices:
- Graph A: a single 6-cycle .
- Graph B: two disjoint triangles .
Both have every vertex of degree 2 and satisfy [2] (, ). But is connected while is not — they are not isomorphic. Hence the degree sequence is a necessary but not sufficient invariant for graph identity.
Connections
Graph theory connects to many areas:
- <span class="wiki-link-missing">Linear Algebra</span>: the adjacency and Laplacian Matrix turn graph questions into eigenvalue problems (spectral graph theory); eigenvalues bound connectivity, expansion, and colorability.
- <span class="wiki-link-missing">Topology</span>: planar graphs and the Euler characteristic link to surfaces and embeddings; graph minors relate to topological structure.
- <span class="wiki-link-missing">Combinatorics</span>: enumeration (counting trees via Cayley's Formula), extremal results (Turán-type theorems), and Ramsey theory all live here.
- <a class="wiki-link" href="/wiki/probability-theory">Probability Theory</a>: random graphs exhibit sharp threshold phenomena and underlie network science.
- <span class="wiki-link-missing">Computational Complexity</span>: many canonical NP-complete problems (Hamiltonian cycle, graph coloring, clique) are graph problems; others (shortest path, max flow) are polynomial.
- <span class="wiki-link-missing">Group Theory</span>: the automorphism group of a graph and Cayley graphs bridge algebra and combinatorics.
Real-World Applications
Historical Development
Subtleties & Limits
Several deep questions remain partly open or computationally hard:
- Graph Isomorphism: is there a polynomial-time algorithm to decide whether two graphs are isomorphic? Babai (2015) gave a quasi-polynomial algorithm, but its exact complexity status (P vs NP-intermediate) is unresolved.
- Hamiltonicity & the Traveling Salesman: deciding whether a Hamiltonian cycle exists is NP-complete; no efficient characterization analogous to Eulerian degree-parity is known.
- Reconstruction Conjecture (Kelly–Ulam, 1942): is every graph on vertices uniquely determined (up to isomorphism) by its multiset of vertex-deleted subgraphs? Still open.
- Chromatic number bounds: while always holds (and Brooks's theorem refines it), computing exactly is NP-hard, and structural conjectures (e.g., Hadwiger's conjecture relating to minors) remain unproven in general.
See Also
Trees and Forests · Planar Graphs · Matching Theory · Eulerian and Hamiltonian Paths · Laplacian Matrix · Kuratowski's Theorem · Cayley's Formula · Network Flows