Chromatic number Created 2026-09-24 Updated 2026-10-14
For a nonempty finite simple graph , the chromatic number is the least positive integer for which has a proper vertex graph coloring with at most colours. To establish an exact chromatic number, give a colouring using that many colours and explain why fewer cannot suffice. A colouring alone gives only an upper bound.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, Definition 11.7.1
These small graphs show why the chromatic number measures more than the presence of triangles in a graph:
- The cycle graph , also the complete graph , has chromatic number three. Every pair of vertices is adjacent, so three distinct colours are necessary and sufficient.
- The cycle graph has chromatic number two. Around the graph cycle, the assignment is proper, and a single colour would violate every edge.
- The cycle graph has chromatic number three. With two colours, alternation around the graph cycle would force the first and fifth vertices to have the same colour despite their joining edge. The assignment works. Thus a triangle-free graph can still require more than two colours.
- The complete graph has chromatic number : all vertices are pairwise adjacent, so each must have its own colour.[ref]
For a cycle graph of even length, alternating two colours closes consistently; for an odd cycle, it does not, and a third colour on the final vertex suffices. More generally, the two-colourability criterion for bipartite graphs says that exactly when is a bipartite graph, and the odd-cycle characterization of bipartite graphs identifies the obstruction as an odd cycle. A nonempty graph with no edges has chromatic number one; a bipartite graph with at least one edge has chromatic number exactly two.
In the pairwise-conflict scheduling model of graph coloring, is the least number of interchangeable slots needed. This turns a drawing into an optimization question: how many groups of compatible activities are unavoidable? Greedy coloring constructs a valid grouping quickly, but its number of colours can exceed the chromatic number.
Closed walk Created 2026-10-06 Updated 2026-10-14
A closed walk is a walk with equal endpoint vertices, . Under our convention this includes the zero-length walk ; returning after traversing at least one edge requires . Closure imposes no other restriction on repeated vertices or edges. In a directed graph, a closed directed walk must also follow every directed edge in its permitted direction.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, §§9.2 and 11.8.1: closed walks
Returning to : backtracking closed walk, closed trail with a repeated internal vertex, and graph cycle
. Details. In the shared simple graph, is a length-two closed walk that immediately backtracks along . It is not a trail, since is used twice, and it is not a graph cycle. The length-six closed walk is a trail, since its six edges are distinct, but is not a graph cycle: it returns to midway through the journey. The length-three closed walk is a graph cycle, with all vertices distinct apart from the required endpoint repetition. In a simple graph that is an undirected graph, a graph cycle has length at least three; the two-step backtrack is excluded.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, §11.8.1: cycles and backtracking
A positive-length closed walk therefore need not reveal a graph cycle: even a tree permits an out-and-back journey on an edge. A positive-length closed trail in a simple graph does contain a graph cycle. For a proof outline, choose a shortest positive-length consecutive portion of the trail whose endpoint vertices coincide. It cannot repeat an internal vertex, since that would give a shorter such portion; it cannot have length one or two because self-loops and repeated edges are excluded. It is consequently a graph cycle. Cutting it out leaves another closed trail, possibly of length zero, so repetition partitions the original edges into graph cycles. In our six-step example these are the two triangles in a graph. A closed trail using every edge would be an Euler circuit; here is omitted.
Counting return journeys makes closed walks useful even when they repeat edges. For a finite simple graph with adjacency matrix , the walk count from powers of an adjacency matrix gives length- walks from to , for every nonnegative integer . A proof outline is that matrix multiplication appends one allowed step, summing over the previous endpoint; is the identity matrix, recording the unique zero-length walk at each vertex. ConsequentlyThe trace counts closed walks with a specified starting vertex and traversal order, not distinct graph cycles. These formulas use adjacency entries, not arbitrary travel costs in a weighted graph.[ref]
https://ocw.mit.edu/courses/14-15-networks-spring-2022/mit14_15s22_lec2.pdf. Alexander Wolitzky, Graph Theory and Social Networks, slides 9–10: powers of adjacency matrices
In our example, : the five length-two closed walks are , , , , and . Also , going round either triangle in a graph in either direction, and : each of the two triangles in a graph supplies three choices of starting vertex and two directions. These exact counts for the constructed graph illustrate why return counts and graph cycle counts differ.
A closed walk naturally models a delivery or inspection journey that returns to its depot. Repeated vertices let it combine several excursions; repeated edges let it serve a dead end and return. For an Euclidean travelling salesman tour, one can first construct a closed walk visiting all locations and then use the triangle inequality to shortcut repeated visits without increasing total length. That argument assumes direct travel between the retained locations is permitted, as in a complete graph weighted by Euclidean distance; an arbitrary road network need not contain those shortcut edges.
Planar graph edge bound Created 2026-09-24 Updated 2026-10-14
A finite simple graph that is a connected graph and a planar graph, with vertices and edges, satisfies . Choose a plane graph: each facial boundary walk has length at least three, so . Substitute from the Euler formula for a connected planar graph.[ref]
Mathematics for Computer Science by Eric Lehman and others. Mathematics for Computer Science, §12.4, Lemma 12.4.2 and Theorem 12.4.3, printed pp. 485–486
The complete graph attains equality: . The bound also holds for a disconnected finite simple graph that is a planar graph with : place its connected components of a graph in disjoint regions and join them with new bridges in a graph, then apply the connected bound.
Walk in a graph Created 2026-10-06 Updated 2026-10-14
A walk records a journey through a graph as a finite alternating sequencewhere each edge joins the consecutive vertices and . Both vertices and edges may repeat. Its length is , counting edge traversals with repetitions, rather than counting different edges or measuring the drawing. Here a graph path means a walk with no repeated vertices; a trail instead forbids repeated edges. These conventions distinguish a journey's record from the subgraph consisting of the connections it used.[ref]
https://ptwiddle.github.io/MAS341-Graph-Theory-2017/lecturenotes/lecture3.html. Paul Johnson, MAS341, Lecture 3: walks and trails
Unless stated otherwise, the examples below use a finite simple graph that is an undirected graph, so an edge may be traversed in either direction. In a multigraph, retain each edge's individual identity as well as its endpoint vertices: two parallel edges are different choices for the same step. If self-loops are allowed, traversing one leaves the current vertex unchanged but adds one to the length. In a directed graph, each step must follow its directed edge from its initial to its terminal vertex, giving a directed walk; reversing a journey need not be possible.[ref]
https://people.math.binghamton.edu/zaslav/Oldcourses/581.S99/notes.html. Thomas Zaslavsky, Supplementary Notes for Graduate Graph Theory: edge identities and walks
We allow the zero-length walk at every vertex . It uses no edges, so it is also a trail and a graph path, and its coinciding endpoints make it a closed walk. This means staying put is a legitimate journey; a graph with no vertices has no such walk. Positive-length restrictions will be stated explicitly.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, §11.8.1: length-zero convention
Use the same constructed graph throughout these three sections:Here denotes the unordered pair , and . Two triangles in a graph, and , share , with one extra edge . These are schematic connections, not measured roads; the highlighted connections in the diagram show which edges are used, while the numbered sequence records their order.
The length-six walk uses and twice, so it is not a trail. The length-six trail returns to but uses six different edges, so it is not a graph path. The length-three graph path repeats neither vertices nor edges. Thusfor this particular graph. The restrictions answer different routing questions: revisiting a junction is harmless for many journeys, whereas reusing a serviced road segment can matter for an inspection route. Travel costs require a weighted graph; a walk's cost adds the weight of each traversal, even when an edge is used again.
Every finite walk from to contains a graph path from to after deleting detours. For a proof outline, if with , delete the intervening closed walk. The retained steps still meet at the same vertex, and the length strictly decreases. Repeating terminates with no repeated vertices, or with the zero-length graph path when . This explains why reachability can be formulated using either walks or graph paths. With nonnegative edge weights, deletion also cannot increase cost, connecting the argument to the shortest path problem; with negative weights that cost conclusion fails.[ref]
https://ptwiddle.github.io/MAS341-Graph-Theory-2017/lecturenotes/lecture3.html. Paul Johnson, MAS341, Lecture 3: deleting repeated-vertex detours


