Graphs, Basic Invariants, and the Foundational Lemmas
Anchor (Master): Diestel 2017 *Graph Theory* (5th ed., Springer GTM 173) Ch. 1 and the topological-minors / contraction machinery threaded through Ch. 1, 3, 7, 12; Bollobás 1998 *Modern Graph Theory* (Springer GTM 184) Ch. 1; Tutte 1984 *Graph Theory* (Addison-Wesley) Ch. 1-2; the original sources Euler 1736 (Königsberg), Cayley 1857 (counting trees), Kőnig 1936 (the first textbook of graph theory)
Intuition Beginner
A graph is the simplest record of a relationship: a collection of dots, with a line drawn between two dots whenever they are related in some way. The dots are called vertices and the lines are called edges. People at a party with a line for each handshake, cities with a line for each direct flight, web pages with a line for each link — all of these are the same kind of picture once you forget the details and keep only "which pairs are joined." That deliberate forgetting is the whole point. Graph theory studies what survives when you keep only the pattern of connections.
The first thing you can measure about a vertex is how many lines touch it. This count is the vertex's degree. At a party, your degree is how many hands you shook. There is a small miracle hiding here: every handshake involves two hands, so if you add up everyone's personal count, you have counted each handshake exactly twice. The total of all the degrees is therefore always an even number, equal to twice the number of edges. This is the handshake lemma, and it is the first fact that makes graphs feel like arithmetic rather than just drawing.
Once you have dots and lines you can ask how to travel. A walk follows edges from dot to dot; a path is a walk that never repeats a dot; a cycle is a path that loops back to where it began. Two dots are connected if some walk joins them, and the graph breaks into separate islands, called components, of mutually reachable dots. A graph that is all one island with no loops at all is a tree: the leanest possible way to keep everything connected, with not one edge to spare.
Visual Beginner
Picture five dots labelled . Draw lines , , , , and . The first three lines form a little triangle on ; then a line runs out to , and one more out to , like a balloon on a string. You can walk from all the way to , so the whole picture is a single connected island.
The table beside the drawing records each vertex's degree and checks the handshake count. The triangle makes vertices and touch two lines each; vertex touches three; vertex touches two; vertex touches one.
| vertex | lines touching it (degree) |
|---|---|
| 1 | 2 |
| 2 | 2 |
| 3 | 3 |
| 4 | 2 |
| 5 | 1 |
| total | 10 |
The five lines give five edges, and the degrees total , which is exactly twice five. Each line was counted once at each of its two ends.
Worked example Beginner
Take a graph on six vertices and count its edges using only the degrees, without drawing every line. Suppose the six vertices have degrees . We find the number of edges.
Step 1. Add up all the degrees. The sum is .
Step 2. Use the handshake fact. The sum of all degrees equals twice the number of edges, because every edge is counted once at each of its two ends. So twice the number of edges is .
Step 3. Divide by two. The number of edges is . The graph has exactly eight edges, whatever its detailed shape.
Step 4. Check that the degrees are even possible. The total came out even, which it had to: a list of degrees can describe a real graph only if the degrees add up to an even number. A list like adds to , an odd total, so no graph has exactly three vertices each of degree three.
What this tells us: the degrees alone pin down the edge count, and they obey a parity rule that rejects impossible lists. You never had to see the picture. The handshake lemma turned a drawing question into a one-line sum, and that is the flavour of nearly every basic graph invariant — a global quantity read off from local counts.
Check your understanding Beginner
Formal definition Intermediate+
A graph is a pair where is a finite set of vertices and is a set of edges, each edge an unordered pair of distinct vertices [Diestel 2017 §1.1]. This is the simple graph convention: no loops and no repeated edges; multigraphs (allowing parallel edges and loops) are the natural relaxation used for edge counting in Euler's theorem below. Write for the order and for the size. Vertices are adjacent if , written ; a vertex and an edge are incident if . The neighbourhood collects the vertices adjacent to , and the degree counts them. The minimum and maximum degree are and , and the average degree is .
A graph is a subgraph of , written , if and . It is an induced subgraph if — every edge of between two vertices of is kept — and a spanning subgraph if . A walk of length is a sequence with for each ; it is a path if the are distinct, and a cycle if , the vertices are distinct, and . The girth is the length of a shortest cycle (infinite if is acyclic). Vertices lie in the same component if some walk joins them; this is an equivalence relation on , and is connected if it has one component. The distance is the length of a shortest – path, and the diameter is .
Definition (tree, forest, spanning tree). A forest is an acyclic graph; a tree is a connected forest. A leaf is a vertex of degree . A spanning tree of a connected is a spanning subgraph that is a tree.
Definition (bipartite). is bipartite if partitions into two parts with every edge having one end in and one in — equivalently, admits a proper -colouring.
Definition (contraction, minor, topological minor). Contracting an edge produces , the graph on obtained by deleting , adding a new vertex adjacent to every former neighbour of or , and discarding parallel edges and the loop. is a minor of , written , if arises from a subgraph of by a sequence of edge contractions; equivalently there are disjoint connected branch sets in with an edge between and whenever in . is a topological minor of if contains a subdivision of — a copy of with edges replaced by internally disjoint paths. Every topological minor is a minor.
Counterexamples to common slips
- A subgraph is not the same as an induced subgraph. On the triangle , taking the three vertices but only two of the edges is a subgraph; it is not induced, because the induced subgraph on all three vertices must include the third edge. Induced subgraphs are determined by their vertex set; arbitrary subgraphs are not.
- A walk may repeat; a path may not. In a triangle the sequence is a walk of length but not a path. Every – walk contains a – path (delete the loop between repeated vertices), which is why distance is well defined.
- Cycles need length at least three. The definition forbids length- "cycles" ; in a simple graph those are not cycles at all, merely a back-and-forth walk on one edge. This is why bipartite graphs forbid odd cycles rather than all closed walks: a closed walk may have even length by backtracking.
- Minimum degree large does not force the whole graph dense. A long path has minimum degree yet is connected; a disjoint union of triangles has minimum degree yet diameter is undefined across components. Degree conditions constrain local structure, not connectivity, unless coupled with it.
Key theorem with proof Intermediate+
Theorem (the foundational lemmas: handshake, tree characterisation, and minimum-degree averaging). Let be a graph with vertices and edges.
(a) Handshake lemma. . Consequently the number of vertices of odd degree is even.
(b) Tree characterisation. The following are equivalent: (i) is a tree; (ii) is connected and ; (iii) is acyclic and ; (iv) any two vertices are joined by a unique path.
(c) Averaging lemma. If has average degree , then has a subgraph with minimum degree .
(See [Diestel 2017 §1.2-§1.5], [Bondy-Murty 2008 Ch. 1-2].)
Proof. Part (a). Count incident vertex-edge pairs in two ways. Summing over vertices gives , since lies in exactly edges. Summing over edges gives , since each edge has exactly two ends. The two counts are equal, so . Reducing modulo , the odd-degree vertices each contribute and the even-degree vertices , so the number of odd-degree vertices is congruent to , hence even.
Part (b). We show (i) (iv) (ii) (iii) (i). Assume (i): is connected and acyclic. Between any a path exists by connectivity; if two distinct – paths existed, following one out and the other back would trace a closed walk containing a cycle, against acyclicity, so the path is unique — this is (iv). Assume (iv): unique paths between all pairs. Connectivity is immediate. For the edge count, root the graph at any vertex and map each to the first edge on its unique – path; this is injective, because that edge's far endpoint has its own unique path extended to , so distinct give distinct last edges by uniqueness, and the map hits every edge exactly once, giving — this is (ii).
Assume (ii): connected with . A connected graph has a spanning tree , and any spanning tree on vertices has exactly edges (build it by adding vertices one at a time, each new vertex contributing one edge). Since , already uses all edges of , so is acyclic, giving (iii). Assume (iii): acyclic with . Let the components be , each a tree (connected and acyclic), so each with vertices has edges. Then , and forces : is connected, hence a tree, giving (i).
Part (c). Build a descending sequence of subgraphs : at each step, if the current has a vertex with , delete to form ; otherwise stop. Track the quantity . Deleting a vertex of degree removes edges and one vertex, so changes by and never decreases. Initially . The empty graph has , while a single vertex deleted last would pass through a one-vertex graph with , against ; so the process cannot delete every vertex and halts at a nonempty . In no vertex has degree , so .
Bridge. This theorem builds toward the entire structural and extremal theory of graphs and appears again in every later counting, connectivity, and colouring argument, because all three parts convert a global quantity into a usable local one. The foundational reason the handshake identity, the tree equivalences, and the averaging lemma sit together is that each is a double-counting or a one-edge-at-a-time induction on the same object: the handshake count is exactly the incidence sum that the tree count refines edge-by-edge, and the averaging lemma is that same edge-accounting run as a deletion process. This is exactly the principle that a spanning tree is the minimal connected skeleton whose edges the handshake lemma then weighs, so the degree sum and the edge count are two readings of one incidence relation. The tree characterisation is dual to the cycle viewpoint: acyclic-plus-counting and connected-plus-counting are the two ways an -edge graph can be a tree, and putting these together gives the spanning-tree existence that every connectivity and matroid argument downstream assumes. The averaging lemma is the bridge from average to guaranteed local density, the first move in extremal graph theory, where a global edge bound must be turned into a dense substructure before any forbidden configuration can be located.
Exercises Intermediate+
Advanced results Master
Theorem (Cayley's formula). The number of labelled trees on the vertex set is . (Cayley [Cayley 1889]; Diestel [Diestel 2017 §1.2].) The Prüfer correspondence is a bijection between labelled trees on vertices and sequences in : repeatedly remove the leaf of smallest label and record its unique neighbour, producing a length- sequence; the construction reverses uniquely because the multiplicity of a label in the Prüfer sequence is one less than the degree of that vertex, which determines the leaf-removal order. The matrix-tree theorem of Kirchhoff gives the same count for arbitrary : the number of spanning trees equals any cofactor of the Laplacian , where is the degree diagonal and the adjacency matrix, and for the nonzero Laplacian eigenvalues are all , giving .
Theorem (high girth forces many vertices: the Moore bound). A graph with minimum degree and girth has at least vertices, where for odd , $$ n_0 = 1 + \delta \sum_{i=0}^{r-1} (\delta - 1)^i, $$ and for even a comparable bound holds. (Diestel [Diestel 2017 §1.3, §1.7].) The proof is a breadth-first count: from any vertex, the girth condition forces the first neighbourhood shells to branch without collision, so the ball of radius has the stated size. The bound makes precise the Beginner slogan that high girth forces many vertices: locally tree-like graphs of fixed degree cannot be small, and the extremal Moore graphs meeting the bound are rare (the Petersen graph for , ; the Hoffman-Singleton graph for , ; almost no others, by the Hoffman-Singleton eigenvalue argument).
Theorem (the minor and topological-minor orders; Kuratowski-Wagner). A graph is planar iff it contains neither nor as a minor, iff it contains neither as a topological minor. (Diestel [Diestel 2017 §1.7].) For graphs of maximum degree the minor and topological-minor relations coincide, since a branch set of a degree- model can be realised by a subdivision. The minor relation is a well-quasi-order on the class of all finite graphs (Robertson-Seymour), so every minor-closed graph property has a finite set of forbidden minors — the structural endpoint of the contraction language introduced in the formal definition.
Theorem (degree sequences: Erdős-Gallai). A non-increasing sequence of non-negative integers is the degree sequence of some graph iff is even and for every , $$ \sum_{i=1}^{k} d_i \leq k(k-1) + \sum_{i=k+1}^{n} \min(d_i, k). $$ (Diestel [Diestel 2017 §1.2].) The parity condition is the handshake lemma; the family of inequalities encodes that the largest-degree vertices cannot demand more edges than the rest of the graph can supply. The Havel-Hakimi algorithm gives a constructive equivalent: a sequence is graphical iff deleting the largest degree and subtracting from the next entries leaves a graphical sequence.
Synthesis. These results are one foundation seen at increasing depth, and putting these together the whole first chapter becomes the study of two dual skeletons of a graph — its spanning trees and its cycle space — weighed by the single incidence relation the handshake lemma counts. The central insight is that a tree is the minimal connected structure with edges, so Cayley's , the matrix-tree determinant, and the spanning-tree existence used everywhere are three readings of the same minimal skeleton; this is exactly the principle that the handshake double-count refines into the tree edge-count and then into the Laplacian cofactor. The averaging lemma is dual to the Moore bound: average degree pushed up guarantees a dense minimum-degree core, while girth pushed up forces that same degree to spread over many vertices, so density and locally-tree-like sparsity are the two regimes the foundational lemmas separate. The bridge onward is the minor order, which generalises subgraph containment to the contraction-stable relation under which planarity, and ultimately every minor-closed property, has a finite forbidden-minor description — the foundational reason structural graph theory organises itself around minors rather than subgraphs. The degree-sequence theorem closes the loop, characterising exactly which local degree data the handshake parity permits, so the invariants this unit defines are not merely measured but realised, the realisation question that every later extremal and structural theorem refines.
Full proof set Master
Proposition 1 (handshake lemma). For any graph, , and the number of odd-degree vertices is even.
Proof. Consider the incidence set . Counting by its first coordinate, each appears in exactly pairs, so . Counting by the second coordinate, each edge contributes exactly the two pairs , so . Equating, . Modulo , , and the even-degree terms vanish modulo , so the count of odd terms is , hence even.
Proposition 2 (every connected graph has a spanning tree, with exactly edges). A connected graph on vertices contains a spanning tree, and every spanning tree has edges.
Proof. Among all connected spanning subgraphs of pick one, , with the fewest edges. If contained a cycle, deleting any cycle edge would keep connected (a cycle edge lies on a cycle, so its endpoints remain joined by the rest of the cycle) with fewer edges, contradicting minimality. So is acyclic and connected: a spanning tree. For the edge count, order the vertices so that each () is adjacent in to some earlier vertex — possible by connectivity, growing a connected set one vertex at a time. Each for contributes exactly one new edge to (the edge to its earlier neighbour; a second edge to an earlier vertex would close a cycle), and contributes none, so has edges.
Proposition 3 (tree characterisation, full equivalence). For a graph on vertices, the four conditions (i) tree, (ii) connected with edges, (iii) acyclic with edges, (iv) unique paths, are equivalent.
Proof. (i) (iv): a tree is connected, so paths exist; two distinct – paths would produce, by symmetric difference, a nonempty even subgraph with all degrees even, which contains a cycle, against acyclicity. (iv) (i): unique paths give connectivity; a cycle would give two distinct paths between any two of its vertices, so is acyclic — a tree. (i) (ii): Proposition 2 gives edges and connectivity is part of (i). (ii) (iii): a connected graph on vertices with edges equals its spanning tree (which already has edges by Proposition 2), so it is acyclic. (iii) (i): with components of orders , each component is connected and acyclic, hence a tree with edges, so ; the hypothesis forces , so is connected, hence a tree. The cycle of implications closes, so all four are equivalent.
Proposition 4 (averaging lemma). If has average degree , it has a nonempty subgraph with .
Proof. Run the deletion process: while the current subgraph has a vertex of degree , delete one such vertex. Track . Initially . Deleting a vertex with removes edges and one vertex, changing by ; thus never decreases. The empty graph has . If the process deleted all vertices, then since is nondecreasing and ends at , it must have started at , forcing and every deletion tight; but the last deletion removes a vertex of degree from a one-vertex graph with , contradicting throughout. Hence the process halts at a nonempty in which no vertex has degree , i.e. .
Proposition 5 (Euler's theorem). A connected graph (or multigraph) with at least one edge has a closed Euler tour iff every vertex has even degree.
Proof. Necessity: a closed Euler tour visits each vertex pairing an entering edge with a leaving edge, and the closing identifies the first and last; every incident edge appears once and lies in one pair, so each degree is even. Sufficiency: assume all degrees even. Take a trail of maximum length. Its terminus has used, in , an even number of edges if is an interior repeat and otherwise pairs all but possibly the final edge; precisely, if ended at , the edges of at number one more than a multiple of two on the arrival side, leaving an unused edge at by evenness, so extends — contradiction. Hence is closed. If omits an edge, connectivity gives a vertex on incident to an unused edge; a maximal trail in the unused-edge graph from (all degrees still even there) is closed at and splices into , lengthening it — contradiction. So traverses every edge once: a closed Euler tour.
Proposition 6 (Cayley's formula via Prüfer). There are exactly labelled trees on for .
Proof. Define the Prüfer map from trees to sequences in : given a tree, repeatedly delete the leaf of smallest label and append the label of its unique neighbour, stopping when two vertices remain; this yields a sequence of length . The map is a bijection. Injectivity and surjectivity follow from a single observation: in the sequence produced, a vertex appears exactly times, because is recorded once for each neighbour deleted before itself, and is deleted (ceasing to be recorded) after its degree drops to . Given any sequence , the degrees are forced by , and the tree is reconstructed uniquely: at each step the smallest-labelled vertex not in the remaining sequence and not yet used is a current leaf, joined to the first sequence entry, which is then removed. This inverse is well defined and single-valued, so the Prüfer map is a bijection and the number of trees is .
Connections Master
Data structures: arrays, trees, and graphs
25.02.01. The structural graph defined here is the mathematical object behind the computer-science data structure: adjacency lists and adjacency matrices are concrete encodings of the edge set , breadth-first and depth-first search compute the components and distances defined in the formal section, and the spanning tree of Proposition 2 is exactly what a traversal produces. This unit owns the invariants — degree, girth, connectivity, the tree characterisation — while the algorithmic unit owns their computation; the handshake lemma is the reason an adjacency-list traversal costs rather than .Eigenvalue and eigenvector
01.01.08. The adjacency and Laplacian matrices turn the combinatorial invariants of this unit into spectral ones: the number of closed walks of length is (Exercise 6), the multiplicity of the Laplacian eigenvalue equals the number of components, and the matrix-tree theorem computes spanning-tree counts from Laplacian cofactors. The bipartite criterion of the Key theorem is the spectral statement that 's spectrum is symmetric about , so the foundational lemmas here are the combinatorial source of all of spectral graph theory.Extremal graph theory and the Turán-type bounds
40.05.01. The averaging lemma is the first move of extremal graph theory: it converts a global average-degree hypothesis into a dense subgraph of large minimum degree, the standard preprocessing before forbidding a subgraph forces structure. Exercise 8's cycle-length bound and the Moore bound of the Advanced section are the two faces — density and girth — that the extremal chapter develops into Turán's theorem and the Kővári-Sós-Turán bound, all resting on the degree and counting invariants established here.
Historical & philosophical context Master
Graph theory begins with Leonhard Euler's 1736 solution of the Seven Bridges of Königsberg, Solutio problematis ad geometriam situs pertinentis (Commentarii Academiae Scientiarum Petropolitanae 8) [Euler 1736], in which Euler abstracted the city's landmasses to points and its bridges to connections and proved that a closed walk crossing every bridge exactly once requires every landmass to meet an even number of bridges. This is the even-degree criterion of Proposition 5, and the abstraction — keep the incidences, discard the geometry — is the founding move of the subject Euler called the geometry of position. The counting of trees was carried out by Arthur Cayley, whose 1889 note A theorem on trees (Quarterly Journal of Pure and Applied Mathematics 23) [Cayley 1889] established the formula in the course of counting saturated hydrocarbons, tying the combinatorics of trees to chemical isomer enumeration.
The systematic theory consolidated in the early twentieth century. Dénes Kőnig's 1936 Theorie der endlichen und unendlichen Graphen was the first textbook devoted to graphs and fixed much of the modern vocabulary of degrees, paths, cycles, and bipartiteness. Gustav Kirchhoff's 1847 work on electrical networks had already produced the matrix-tree theorem as a tool for counting independent current loops, and Heinz Prüfer's 1918 bijective proof of Cayley's formula supplied the encoding used in Proposition 6. The contraction and minor language, latent in Kazimierz Kuratowski's 1930 and Klaus Wagner's 1937 planarity criteria, became the organising relation of structural graph theory through the Robertson-Seymour graph-minors project of 1983-2004, which proved that finite graphs are well-quasi-ordered under the minor relation. The textbook synthesis followed in Reinhard Diestel's Graph Theory [Diestel 2017], which organises the first chapter around exactly the degree, connectivity, tree, bipartite, Euler, and minor material of this unit.
Bibliography Master
@book{Diestel2017,
author = {Diestel, Reinhard},
title = {Graph Theory},
edition = {5th},
series = {Graduate Texts in Mathematics},
volume = {173},
publisher = {Springer},
year = {2017}
}
@book{BondyMurty2008,
author = {Bondy, J. A. and Murty, U. S. R.},
title = {Graph Theory},
series = {Graduate Texts in Mathematics},
volume = {244},
publisher = {Springer},
year = {2008}
}
@book{Bollobas1998,
author = {Bollob\'as, B\'ela},
title = {Modern Graph Theory},
series = {Graduate Texts in Mathematics},
volume = {184},
publisher = {Springer},
year = {1998}
}
@article{Euler1736,
author = {Euler, Leonhard},
title = {Solutio problematis ad geometriam situs pertinentis},
journal = {Commentarii Academiae Scientiarum Petropolitanae},
volume = {8},
year = {1736},
pages = {128--140}
}
@article{Cayley1889,
author = {Cayley, Arthur},
title = {A theorem on trees},
journal = {Quarterly Journal of Pure and Applied Mathematics},
volume = {23},
year = {1889},
pages = {376--378}
}
@book{Konig1936,
author = {K\H{o}nig, D\'enes},
title = {Theorie der endlichen und unendlichen Graphen},
publisher = {Akademische Verlagsgesellschaft},
year = {1936}
}
@article{RobertsonSeymour2004,
author = {Robertson, Neil and Seymour, Paul D.},
title = {Graph Minors. XX. Wagner's conjecture},
journal = {Journal of Combinatorial Theory, Series B},
volume = {92},
year = {2004},
pages = {325--357}
}