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.
Chromatic polynomial Created 2026-09-24 Updated 2026-10-14
The chromatic polynomial turns a graph coloring problem into a counting problem: how many choices remain when adjacent vertices must have different colours? For a finite simple graph and a positive integer , is the number of proper vertex colorings using a fixed, distinguished palette of colours. A colouring need not use every available colour, and exchanging two palette colours generally gives a different colouring. Although is a polynomial, its values at arbitrary noninteger arguments are not counts of colourings.
Consider the three-vertex path graph ----. Choose in ways, then in ways, then in ways: and may agree because they are not adjacent. The multiplication principle givesAdding the edge makes the three-vertex complete graph . Now must avoid both preceding colours, soWith three available colours, the path graph has 12 colourings, whereas the triangle has 6. With two colours the counts are and : the extra constraint makes the triangle impossible to colour.
For a nonempty graph, the chromatic number records only the first positive integer for which . The chromatic polynomial also counts the choices for every larger palette. For the path the chromatic number is , and for the triangle it is . Counting assignments also gives a useful interpretation for scheduling: if adjacent vertices represent tasks that must use different slots, the chromatic polynomial counts the valid assignments to named slots. Adding a conflict edge can only remove assignments.
The chromatic polynomial also remembers some of the graph's structure. For a simple graph with vertices and edges, its leading terms are ; its degree of a polynomial gives the number of vertices, and its next coefficient gives the number of edges. It does not determine the graph completely. A four-vertex path graph and a four-vertex star graph are not related by a graph isomorphism, but both are trees and have chromatic polynomial .
The early connection to map colouring appears in George D. Birkhoff's article [ref]
https://www.jstor.org/stable/1967597. A Determinant Formula for the Number of Ways of Coloring a Map, Annals of Mathematics 14 (1912–1913), pp. 42–46
. For a derivation of the counting recurrence and its leading coefficients, see Paul Johnson's MAS 341 lecture on chromatic polynomials.In a proper partial graph coloring, let count coloured neighbours and count their distinct colours. The saving leaves available colours for only initially uncoloured neighbours. If the displayed inequality holds at every vertex, ordinary greedy completion succeeds. Each additionally coloured neighbour removes at most one available colour while also reducing the number of uncoloured neighbours by one.
Graph Created 2026-09-24 Updated 2026-10-14
A graph describes objects, called vertices, and pairwise connections, called edges. Its vertex set tells us what the objects are; records their connections. The basic abstraction retains graph adjacency while discarding positions, angles and Euclidean distances: moving the dots in a drawing changes none of the edges. A crossing of two drawn lines is not an extra vertex unless explicitly designated as one. Even the labels can change: a graph isomorphism is a relabelling that preserves graph adjacency in both directions.[ref]
This makes graphs useful when the question concerns possible connections rather than physical shape. For example, model locations by vertices and direct links by edges; a graph path answers whether one location can reach another. Alternatively, let vertices be activities and edges represent conflicts: a graph coloring then assigns compatible time slots. These are mathematical models, so one must decide which pairwise relationship an edge means before applying graph theory.[ref]
Our running simple graph haswhere abbreviates the unordered pair . It consists of two triangles in a graph, and , joined by . The two drawings above have identical graph adjacency, even though their apparent lengths differ. What counts is that and are adjacent, whereas and are not.
Route questions require precise vocabulary. A walk is a sequence of consecutive adjacent vertices, permitting repetitions; its length counts traversed edges. A trail is a walk that repeats no edge; a graph path repeats no vertex. For a multigraph, the walk must also specify which parallel edge each step uses. For instance, is a length-five walk but not a trail, since it uses twice. The length-three graph path is a shortest route: crossing between the two triangles in a graph requires , with at least one edge before it and one after it. Thus in graph distance, regardless of the drawing.[ref]
https://ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1200j_s24_lec13.pdf. MIT, Connectivity and Trees, Section 1
An Eulerian trail uses every edge exactly once, allowing repeated vertices; a Hamiltonian path visits every vertex exactly once, without needing every edge. Here is an Eulerian trail of length seven, whereas is a Hamiltonian path of length five. The first repeats ; the second omits . Calling an Eulerian trail an "Eulerian path" must not be taken to impose our graph path convention.[ref]
https://ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1200j_s24_lec13.pdf. MIT, Connectivity and Trees, Section 3
The classic historical example is Euler's Königsberg bridge problem: represent the four land regions by vertices and the seven bridges by distinct edges, giving a multigraph. Their degrees of vertices are . In a trail using every edge, arrivals and departures pair at every internal vertex, so at most the two endpoints can have odd vertex degree. Four odd degrees of vertices therefore rule out such a route. This early foundational example of graph theory needs neither bridge lengths nor a geographical map. Euler's paper is conventionally associated with 1736, the volume's nominal year; the Euler Archive records its writing in 1735 and publication in 1741.[ref][ref]
https://la.wikisource.org/wiki/Solutio_problematis_ad_geometriam_situs_pertinentis. Euler, original Latin text and edition details
Graph coloring 2026-10-14
A graph coloring assigns labels called colours to elements of a graph, subject to specified constraints. Here we focus on proper vertex colouring of a simple graph : it is an undirected graph with a finite set of vertices, and a colouring with at most colours is a functionThe colour labels need not be visual colours: they can represent time slots or resources. Unused labels are allowed. Properness concerns graph adjacency, so moving vertices in a drawing does not change whether the graph coloring is valid.[ref]
https://ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1200j_s24_lec11.pdf. MIT, Graphs and Coloring, Section 2.1
Each colour class is an independent set: no edge has both endpoints in it. Conversely, a set partition of into independent sets gives a proper graph coloring by assigning one colour to each part. Thus graph coloring groups mutually compatible objects, and its chromatic number asks for the fewest such groups.
For an illustrative scheduling model, let each vertex represent an activity of equal duration and each edge represent a pair that cannot occur in the same time slot. A proper graph coloring is then a schedule respecting those pairwise conflicts. If the conflicts form a cycle graph with edges , activities can share one slot and another. This model assumes interchangeable slots and includes only the pairwise conflicts encoded by the graph.[ref]
https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/1ccaf180bcd244fddd32e60789fa922f_h9wxtqoa1jY.pdf. Leighton, MIT Graph Theory and Coloring, transcript pages 8–10
The word "colouring" also occurs in edge coloring, which requires different colours on edges sharing an endpoint. The chromatic number discussed here always refers to proper vertex colouring.
Greedy coloring 2026-10-14
For a finite simple graph, choose an order of its vertices and process them one at a time. Give each vertex the smallest positive colour label not already used by its coloured neighbours, and keep all earlier assignments. This is greedy coloring: each step makes a locally available choice. The resulting graph coloring is proper because, for each edge, its later endpoint avoids the colour of its earlier endpoint.[ref]
https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/1ccaf180bcd244fddd32e60789fa922f_h9wxtqoa1jY.pdf. Leighton, MIT Graph Theory and Coloring, transcript pages 12–13
If the maximum degree of a graph is , a vertex has at most previously coloured neighbours, forbidding at most that many distinct colours. At least one label among remains available. Consequently every order givesThis is an upper bound, not a promise that greedy coloring attains the chromatic number.[ref]
Consider the path graph with edges . In the order , greedy coloring assigns the colours respectively. In the order , it assigns colours in processing order: vertices both get colour , then vertex gets colour , and finally vertex sees colours and at its two neighbours and must take colour . Written in vertex order , this second colouring is .
The path graph has chromatic number two: the first assignment achieves two colours, and any edge rules out one. Its maximum degree of a graph is two, so three colours in the second assignment still satisfy the bound. The extra colour comes entirely from the processing order. The crown graph gives a larger family where a poor order can make greedy coloring use arbitrarily many colours although the chromatic number remains two.
Independent set (graph theory) 2026-10-14
An independent set selects mutually compatible objects when an edge of a graph represents a conflict. For example, if vertices are activities and edges join activities that cannot occur together, an independent set is a collection that can share one time slot. Finding the largest such collection is measured by the independence number.[ref]
https://introtcs.org/public/lec_12_NP.html. Barak, Introduction to Theoretical Computer Science, Chapter 14, The independent set problem
In a finite simple graph , an independent set is a subset with no edge joining two selected vertices:The empty set and every singleton set are independent sets. In the cycle graph drawn under vertex cover, is an independent set, but is not: the closing edge joins those two vertices. Choosing nonconsecutive labels is insufficient unless the wraparound edge is checked.
An independent set of maximum size has cardinality equal to the independence number. Being unable to add another vertex only makes an independent set inclusion-maximal. In the star graph , the centre alone is inclusion-maximal, since it is adjacent to every leaf, but the three leaves form a larger independent set. This distinction mirrors the difference between an inclusion-minimal vertex cover and a minimum vertex cover.
Every independent set has a vertex cover as its complement of a set; a largest independent set has a minimum vertex cover as its complement. In every proper vertex colouring, each colour class is an independent set, so graph coloring partitions the vertices into mutually compatible groups.
Kernel list-coloring lemma 2026-10-14
In a kernel-perfect directed graph, lists of size at least admit a proper graph coloring. Choose a color and a digraph kernel in the subgraph on vertices whose lists contain . Color that kernel , delete it, and remove from the remaining lists. Every vertex losing a color also loses an outgoing neighbour; hence the inequality persists. Induction on the vertex count finishes the proof.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 13 3 i Solution Created 2026-10-03 Updated 2026-10-06
Throughout this question the binomial random graph has , as fixed in the introduction. Let and . Count the -vertex independent sets by a random variable . Linearity of expectation givesFor the second inequality, implies . For the limit, grows faster than . By the first moment method, with high probability there is no such independent set; any larger independent set would contain one. Thus the independence number satisfies with high probability.
Every class of a proper graph coloring is an independent set, giving the claimed chromatic lower bound:
Perfect elimination ordering 2026-10-14
A perfect elimination ordering of a finite simple graph is a permutation of its vertices such that each set of later graph neighboursis a clique. Thus is a simplicial vertex in the remaining induced subgraph . Empty and one-vertex sets satisfy the clique condition automatically. The order here is the order of deletion: goes first.
The characterization is powerful: a finite simple graph is a chordal graph if and only if it has a perfect elimination ordering. For one proof outline, the earliest vertex of an induced cycle of length at least four would have two later graph neighbours on that graph cycle that are not adjacent, contradicting the clique condition. Conversely, every nonempty chordal graph has a simplicial vertex, and every induced subgraph of a chordal graph is a chordal graph; repeatedly deleting such a vertex supplies the ordering.[ref]
In the square-plus-diagonal chordal graph above, is a perfect elimination ordering, with later graph neighbourhoods , , , and . Starting instead with fails: its graph neighbours do not form a clique, because is absent. Thus even a chordal graph can have a poor elimination ordering.
For a larger example, join three triangles along shared edges, usingThe exact graph neighbourhoods are , , , , and . The ordering has later graph neighbourhoods , , , , and , all cliques; this certifies that the graph is a chordal graph without enumerating its graph cycles. Its maximal cliques , , form a junction tree in that order, with intersections and .
A perfect elimination ordering removes three overlapping triangles without fill-in; choosing the central vertex first adds three edges
. Details. To find an ordering, maximum cardinality search starts with all scores zero, repeatedly selects an unselected vertex of largest score, and increases each unselected graph neighbour's score by one. Reverse the selection order to obtain a candidate perfect elimination ordering. For the three-triangle graph, one valid selection sequence is , with scores at selection ; reversing it gives the displayed deletion order. On a chordal graph every tie choice works. On an arbitrary graph, test the resulting later graph neighbourhoods for the clique condition to recognize chordal graphs. Suitable adjacency lists, score buckets and a linear-time verification method give recognition.[ref]
The deletion rule also explains sparse Gaussian elimination. For a symmetric positive-definite matrix whose matrix graph is , eliminating pivot applies the Schur complement updateOnly pairs of remaining graph neighbours of can acquire new off-diagonal entries. A perfect elimination ordering already has all those edges, so Cholesky decomposition creates no symbolic fill-in. Positive definiteness ensures nonzero pivots in exact arithmetic. Special numerical cancellation can suppress predicted entries, and floating-point rounding affects their values.[ref]
Chordal Graphs and Semidefinite Optimization by Lieven Vandenberghe and others. §9.1; equation 9.2; Theorem 9.1
In the three-triangle graph, deleting first instead connects every pair in and adds exactly . The graph was already a chordal graph; the extra fill-in comes from the ordering.One further reward is optimal graph coloring. Process a perfect elimination ordering backwards and give each vertex the smallest positive color absent from its already colored graph neighbours. Those graph neighbours form a clique, so this greedy algorithm uses at most the clique number colors; any clique of that size requires at least that many. In the three-triangle graph, coloring gives colors , so both the chromatic number and the clique number are three. Every maximal clique also occurs among : take its earliest vertex and use maximality. The same ordering therefore supports graph coloring, maximal clique extraction and sparse computation.
Historically, Donald J. Rose, Robert E. Tarjan and George S. Lueker's 1976 paper connected graph elimination to symmetric sparse matrices and gave a search-based algorithm for finding a perfect elimination ordering when one exists. Its abstract distinguishes a minimal elimination ordering from a minimum one: removing avoidable fill-in does not by itself minimize the total number of added edges.[ref]
Proper vertex coloring 2026-10-14
A proper vertex coloring assigns labels to the vertices of a graph so that vertices joined by an edge have different labels. Each colour class is an independent set. The chromatic number is the least number of labels needed for this form of graph coloring.
Second-order logic Created 2026-10-06 Updated 2026-10-14
Second-order logic extends first-order logic by allowing existential quantification and universal quantification over second-order relation variables, as well as over individual objects. In the relational presentation used here, an individual variable ranges over a domain , while a second-order relation variable of arity denotes a subset of . Unary second-order relation variables denote subsets of ; binary ones denote binary relations. Presentations with function variables can instead describe their graphs by second-order relation variables, with first-order formulas requiring a unique output for every input.
For a graph with vertices and fixed graph adjacency , the first-order sentence says that every vertex has a neighbour. It selects individual vertices while retains its given interpretation. By contrast,selects an entire subset and says that it is a nonempty independent set. Here is a unary second-order relation variable, rather than a symbol in the input first-order signature. This particular property also has a simple first-order sentence on simple graphs; the example illustrates the change in what can be selected, rather than proving a separation in expressive power.
The usefulness of second-order logic is that one can describe a whole proposed solution, such as a graph coloring, and then impose local constraints on it. Syntax alone does not specify which proposed relations are available: full semantics for second-order logic permits all external subsets of , whereas Henkin semantics supplies designated ranges. The second-order encoding of three-colorability makes this distinction concrete.




