2-core of a graph Created 2026-10-14 Updated 2026-10-18
The 2-core is what remains of a finite simple graph after repeatedly removing every vertex with fewer than two surviving graph neighbours. It strips away dangling trees while keeping the part that can support itself under this local rule. Precisely, for an undirected graph , its 2-core is the unique maximum by set inclusion induced subgraph such that
The empty vertex set is allowed: the condition is then vacuous, without needing to define the minimum degree of the empty graph. "Maximum by inclusion" means that contains every other vertex set satisfying the condition. It is stronger than merely saying that one chosen set cannot be enlarged: the 2-core simultaneously contains all possible qualifying induced subgraphs. In this particular family, every inclusion-maximal qualifying set does equal that unique maximum; the union argument in why the 2-core is unique explains why. [ref]
For a complete worked example, let denote the edge and take
The triangle in a graph has a branching tail attached at , and is an isolated vertex. In alphabetical order the initial degrees of vertices are . Deleting turns into a leaf of a graph; deleting leaves with degree of a vertex two; deleting changes no other degree of a vertex. Now delete , which makes a leaf of a graph, and finally delete . Exactly the three edges of remain: .
Figure 1.
The complete leaf pruning for the 2-core trace: each panel recomputes the displayed degrees of vertices from the surviving induced subgraph, while the FIFO queue determines the next deletion
. Details.
A forest has empty 2-core: every nonempty finite forest has an isolated vertex or a leaf of a graph, so deletion cannot stop at a nonempty remainder. In particular, an isolated edge, an isolated vertex, a path graph, and the empty graph all have empty 2-core. Every cycle graph is its own 2-core. Two disjoint triangles in a graph also form their own 2-core, so a 2-core need not be a connected graph; attaching a tree to either triangle changes neither surviving triangle.
An alternating path in a matching is a graph path whose successive edges alternate between membership in and membership outside . Here graph paths have no repeated vertices. Alternation alone does not make a graph path an augmenting path in a matching: its endpoints must both be unmatched vertices in a matching. For example, relative to in the six-vertex path graph, alternates but has matched endpoints; toggling just those three edges loses one selected edge.
Augmenting path in a matching Created 2026-10-06 Updated 2026-10-14
An augmenting path in a matching is a nonempty alternating path in a matching with distinct endpoints that are both unmatched vertices in a matching. Its first and last edges lie outside . Thus it has unselected edges and selected edges, for some . Taking the symmetric difference
removes the selected edges on and inserts its unselected edges. Each internal vertex exchanges one selected edge for another; each endpoint gains its first selected edge. All choices away from stay in place, so is a matching in a graph with .[ref]
For an explicit repair, let the path graph have vertices in that order and start with
The endpoints and are initially unmatched vertices in a matching. Along the edges are outside, inside, outside, inside, outside . Remove and , then add together:
This raises the cardinality from two to three and gives a perfect matching. Six vertices allow at most three disjoint pairs, so it is also a maximum cardinality matching. The initial is already a maximal matching: every unused edge touches a matched vertex. Augmentation succeeds because it can replace earlier choices instead of only adding to them.
Figure 1.
The augmenting path in a matching on P₆ replaces two selected edges by three using symmetric difference
. Details.
One unused edge joining two unmatched vertices in a matching is the shortest possible augmenting path in a matching. Longer augmenting paths in a matching reassign several partners, explaining why a stalled greedy matching need not be optimal. For edge benefits , the change in total benefit is
which need not be positive even though the cardinality increases. A maximum-weight matching therefore needs a different optimality test. In an assignment equality graph an augmenting path in a matching moves toward a perfect matching while preserving zero reduced costs on matched edges; this is the setting used by the Hungarian algorithm.
For observed neighbor win fractions on the path graph , the normalized Bradley-Terry model estimate with is . This is backward propagation of empirical odds along the path. Every edge proportion is fitted exactly, and strict concavity in edge log-ratios proves that this is the unique global maximum.
Branch set of a graph minor Created 2026-10-05 Updated 2026-10-14
A branch set of a graph minor is the connected region representing one target vertex. For finite simple graphs and , a witness to assigns a nonempty set to each , such that the sets are pairwise disjoint, each induced subgraph is a connected graph, and every has a witnessing edge of between and . Extra edges between branch sets of a graph minor are allowed: they can be deleted. Unused vertices are also allowed.[ref]
Figure 1.
Connected branch sets of a graph minor and their witnessing edges, with an optional edge deletion
. Details.
In the diagram, the host graph has vertex set and edges
Choose , , and . Their internal edges establish connectedness. The edges witness , respectively, so they form a model of the complete graph . The additional edge also joins to ; it supplies another witness for the same target edge, not a fourth target edge. Contracting and merging duplicate edges gives exactly .
The same branch sets of a graph minor also witness the path graph : retain the witnesses , and delete to remove the unwanted adjacency. This demonstrates why the definition requires an edge for every target adjacency, without forbidding other adjacencies in the host graph. For a complete graph , there are no unwanted pairs: its model consists of disjoint connected branch sets of a graph minor with an edge between every pair.
To turn a model into an operation sequence, keep a spanning tree inside each , keep one witnessing edge for each edge of , and delete all other edges and unused vertices. Contract each chosen spanning tree to one vertex. Disjointness prevents two target vertices from merging; connectedness provides the edge contractions that merge each individual region. Conversely, track the original vertices merged into every surviving vertex during a deletion-and-edge contraction sequence. They form disjoint connected branch sets of a graph minor, and each surviving edge comes from an original edge between its two regions. A list of these regions, their connecting trees, and their witnessing edges therefore gives a directly checkable certificate.
Cayley's formula 2026-10-14
For an integer , let be the set of labelled trees with fixed vertex set . Each tree is a finite simple graph, with no distinguished root of a tree, and two trees are different exactly when their sets of edges differ. Then
Equivalently, this is the number of spanning trees of the complete graph . The labelled combinatorial structure includes the fixed labels: drawings, positions, and the order in which edges are listed do not create extra trees. For , the single vertex with no edges is the unique tree; count it separately, since the Prüfer sequence construction requires . For , the unique tree has edge and corresponds to the empty Prüfer sequence. [ref]
For four fixed labels, there are labelled trees, but only two unlabelled trees: the star graph and the path graph. There are four star graphs, one for each choice of centre. There are path graphs: arrange the labels along a graph path, then identify each ordering with its reversal, which describes the same set of edges. Thus . For instance, star graphs centred at and at have different sets of edges even though they have the same shape.
Figure 1.
All sixteen labelled trees on four fixed vertices: four star graphs and twelve path graphs, each with its Prüfer sequence
. Details.
The striking point is that connectedness and the absence of a graph cycle are global restrictions on edges, yet the answer is a power with no correction factor. The Prüfer sequence supplies a bijection that turns those restrictions into freely chosen labels. The rule of product then gives immediately. The same representation makes vertex degrees easy to count and supports uniform labelled tree generation for simulations and algorithm experiments.
Arthur Cayley's 1889 paper "A theorem on trees", published in the Quarterly Journal of Pure and Applied Mathematics, volume 23, pages 376–378, treats the counting problem and its refinement by vertex degrees. It was reprinted as paper 895 in volume XIII of his Collected Mathematical Papers, pages 26–28. This publication is the historical context for the name Cayley's formula; the name alone is not a claim of priority. [ref] [ref]
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 gives
Adding the edge makes the three-vertex complete graph . Now must avoid both preceding colours, so
With 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.
Figure 1.
All twelve proper colourings of a three-vertex path using a three-colour palette
. Details.
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]. For a derivation of the counting recurrence and its leading coefficients, see Paul Johnson's MAS 341 lecture on chromatic polynomials.
For a cycle graph of length , the chromatic polynomial is . The graph triangle gives the base case . For , the deletion-contraction recurrence for the chromatic polynomial gives , since deleting an edge leaves a path graph and contracting it gives the shorter cycle graph. Substitution proves the formula by mathematical induction.
Deletion-contraction recurrence for the chromatic polynomial Created 2026-09-24 Updated 2026-10-14
Deleting an edge removes one colour constraint. Edge contraction describes exactly the newly admitted colourings that violate that constraint. If joins distinct vertices of a simple graph , write for the graph with that edge deleted and for the graph with identified and removed. Parallel edges produced by the contraction may be reduced to one edge, since they impose the same condition on a proper vertex coloring. Then
To see why, divide the proper vertex colorings of into two classes. Those with different colours at are exactly the colourings of . Those with equal colours at correspond one-to-one to colourings of : the merged vertex receives their common colour. Subtracting the second class leaves the first.
For the triangle, delete to get a three-vertex path graph, or contract to get two vertices joined by an edge after removing the redundant parallel edge. Consequently,
At , this says . Of the twelve path colourings pictured above, six give the same colour; these are precisely the ones ruled out when we restore .
Figure 1.
Deleting and contracting a triangle edge separates the allowed and newly forbidden colourings
. Details.
This recurrence is useful because it reduces a constrained counting problem to smaller graphs. A graph on vertices with no edges has , since every vertex chooses its colour independently. Repeated edge deletion and edge contraction reduce to this case and show that the counting function is a polynomial. The same recurrence gives its leading coefficients. The method is conceptually simple, although the number of recursive cases can still grow rapidly.
Diffusion on a graph 2026-10-14
The continuous-time diffusion model on a finite undirected graph uses the Graph Laplacian in the ordinary differential equation
Across each edge, the higher value sends an amount proportional to the difference to the lower value. The two contributions cancel in the sum over vertices, giving conservation of mass:
If the entries represent masses, start with nonnegative entries; signed entries can instead describe deviations from a common level. For the three-vertex path graph, the initial vector is an eigenvector with eigenvalue one, so the exact solution is
More generally, an eigenvector with eigenvalue decays by . The spectral theorem for real symmetric matrices supplies an orthonormal basis of these eigenvectors, and the kernel of a graph Laplacian identifies the surviving terms. On a nonempty connected graph,
The limiting value is the original arithmetic mean. On a disconnected graph, each connected component of a graph converges to its own original arithmetic mean. The same matrix therefore measures neighbour disagreement, detects disconnected regions and governs relaxation toward agreement.
Assign a real value to each vertex. The Graph Laplacian quadratic form measures disagreement across edges:
This makes the Graph Laplacian a positive semidefinite matrix. The energy is small when neighbours have similar values, even if distant vertices have very different values; it depends on connections rather than where the graph is drawn. In the three-vertex path graph, take . Then
and the two edges contribute and .
Figure 1.
Edge disagreement and eigenvectors of the three-vertex path Laplacian
. Details.
For a short proof, expand . Each edge contributes through the degree matrix and through the adjacency matrix, yielding . The sum over unordered edges has no factor ; a sum over all ordered pairs does:
Equivalently, let be an oriented incidence matrix, with one row per edge. Then records endpoint differences and , independently of the chosen orientations. This translates a local comparison into a global quadratic form and makes its nonnegativity visible.
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]
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 gives
This is an upper bound, not a promise that greedy coloring attains the chromatic number.[ref]
Figure 1.
Two orders for greedy coloring of the same path graph
. The edges are in both drawings. Each dot shows its assigned colour number, with the vertex label above and its processing step below. The order uses two colours; the order uses three. Details.
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.
For nonnegative weights on a finite graph, scan edges in nonincreasing weight order, selecting each when it shares no endpoint with an already selected edge. This greedy matching is a factor-two approximation algorithm for maximum-weight matching.
Proof. Charge each optimal edge to itself if selected, and otherwise to an earlier selected edge that blocked it. The receiving edge weighs at least as much. Each selected edge receives at most two charges, since its two endpoints each meet at most one optimal edge. Summing proves the bound. Sorting takes time, followed by a scan that records which vertices are used.
The factor is sharp even for strictly positive weights. On a four-vertex path graph with consecutive weights , where , the greedy matching weighs and the optimal matching in a graph weighs two. Their ratio tends to two as . For infinitely many sizes, use disjoint copies with , . This example isolates the obstruction: a locally attractive edge can block two compatible edges.
Laplacian matrix Created 2026-10-14 Updated 2026-10-20
The Graph Laplacian converts local differences along edges into a linear map. Throughout this section, is a finite undirected graph with no self-loops or repeated edges, and each edge has weight one. In a fixed order of vertices, let be the adjacency matrix and the degree matrix. The combinatorial Graph Laplacian is
Thus the value at a vertex is compared with its neighbours. Every row sums to zero, so : a constant vector produces no differences. This definition and the associated Graph Laplacian quadratic form are developed in Spielman's authored survey.[ref]
For the three-vertex path graph , the vertex degrees are , and in that order
Direct multiplication gives three eigenvectors and their eigenvalues:
The constant eigenvector has eigenvalue zero; the other two describe progressively stronger neighbour disagreement. Dividing these eigenvectors by , respectively, gives an orthonormal basis. The four-vertex cycle graph is already worked out under circulant matrix, where Fourier diagonalization of a circulant matrix gives its eigenvalues.
Every formula here uses without degree normalization. For comparison, Chung's treatment uses the degree-scaled matrix , with a convention for isolated vertices; its eigenvalues must not be substituted into the examples here.[ref]
Matching (graph theory) Created 2026-10-14 Updated 2026-10-20
A matching in a graph is a set of edges of an undirected graph with no shared endpoints: each vertex has capacity for at most one selected edge. It describes simultaneous compatible pairs, such as jobs assigned to distinct available workers, or tasks each occupying two resources that cannot be shared. The empty set is a valid matching in a graph.[ref]
For a finite simple graph , write when is selected and otherwise. The vertex capacity constraint is exactly
These are constraints on a discrete selection, not a requirement that every vertex be used. A matching in a graph with matching saturation of all vertices is a perfect matching; an unmatched vertex in a matching uses none of its capacity.
The objective must be specified separately. A maximum cardinality matching selects as many edges as possible; a maximum-weight matching selects the greatest total benefit; a minimum-weight perfect matching minimizes cost while requiring every vertex to be paired. A maximal matching only says that no additional edge fits alongside the current choices. The four-vertex path graph below separates these notions: choosing the middle edge blocks both outer edges, yet replacing it by those two edges pairs more vertices.
This model is useful because conflicts are local at vertices, while the quality of a selection can depend on coordinated changes along a whole augmenting path in a matching. A greedy matching gives a quick feasible selection; Berge's theorem explains when searching for such changes has reached a maximum cardinality matching. Repeating the pairing problem over time leads instead to proper edge colouring, where each time slot is a matching in a graph.
Matching number Created 2026-09-24 Updated 2026-10-14
For a finite graph , the matching number is
It is the cardinality of a maximum cardinality matching. The vertex capacity constraint gives . The worked path graph examples have and . A perfect matching reaches ; the empty graph has matching number zero.
Maximal matching Created 2026-09-24 Updated 2026-10-14
A maximal matching is a matching in a graph to which no extra edge can be added while retaining all current selected edges. Equivalently, no edge joins two unmatched vertices in a matching; those vertices form an independent set. Every maximum cardinality matching is a maximal matching, but the converse fails.
Take the path graph with vertices and edges . A greedy algorithm that first selects the middle edge produces . Both remaining edges touch a matched vertex, so this size-one matching in a graph is maximal. Yet has two edges. No matching in a graph on four vertices has more than two edges, so is a maximum cardinality matching. The two remaining free vertices of , namely and , are not adjacent; that does not prevent a longer augmenting path in a matching from joining them.
Figure 1.
Choosing the middle edge of P₄ gives a maximal matching of size one; the outer edges give a maximum cardinality matching of size two
. Details.
Maximality is useful as a quick stopping rule and a modest guarantee. For any maximal matching and maximum cardinality matching in a finite simple graph, every edge of touches an endpoint of an edge of . Assign it to one such edge of . Since has disjoint endpoints, each edge of receives at most two assignments, proving . The P₄ example reaches equality. Thus maximality guarantees at least half the largest cardinality, but says nothing comparable about arbitrary edge benefits. Its selected endpoints also form a vertex cover, as explained under vertex cover.
Maximum-weight matching 2026-10-14
Assign each edge a real benefit . A maximum-weight matching maximizes over all matchings in a graph ; the empty matching in a graph is allowed. Setting every recovers a maximum cardinality matching, but otherwise the objectives can disagree.
On the same path graph , give the middle edge benefit and each outer edge benefit . The matching in a graph has total benefit , while the two-edge matching in a graph has total benefit . Thus the smaller choice is the unique maximum-weight matching. If instead the requirement is to find a maximum cardinality matching and then maximize benefit among those, the outer edges must be chosen. Requiring a perfect matching before optimizing cost is another distinct problem, covered by minimum-weight perfect matching. With negative benefits a maximum-weight matching can even be empty, so it need not be a maximal matching.
The sharp approximation algorithm factor is . Charge each edge of an optimal maximum-weight matching to an edge of the greedy matching . If , charge it to itself. Otherwise it was rejected because a previously selected edge shared an endpoint; charge to one such . Since the scan is in nonincreasing weight order, .
Each receives at most two charges, since each of its two endpoints meets at most one edge of the matching in a graph . If , only its own charge is possible. Thus
This inequality also covers the edgeless graph, for which both weights are zero and the displayed ratio in the question is undefined.
For tightness, take a four-vertex path graph with weights in order, where . The greedy matching chooses only the middle edge, of weight , whereas the optimal matching in a graph chooses both outer edges, of total weight . Hence
To obtain infinitely many different sizes, for each take disjoint copies with . Their weights add, so their ratio is . All weights are strictly positive, and the middle edge is uniquely heaviest in each copy. With all three weights equal to , a permitted tie order selecting each middle edge first attains ratio exactly. The greedy two-approximation for maximum-weight matching is therefore best possible.
Figure 1.
A uniquely heavier middle edge gives a greedy matching of weight , while the two outer edges give a maximum-weight matching of weight
. Details.
First reduce the unicyclic graph to its unique graph cycle . Delete the edges of but retain every vertex. The remaining graph is a forest, since any surviving graph cycle would be a second one in . Each of its connected components of a graph contains a vertex of : follow a graph path to in the original connected graph, stopping at the first vertex of ; this initial segment uses no edge of .
No such connected component of a graph contains two vertices of . Otherwise, on the tree graph path between them, choose two successive visits to . The segment between these visits has no internal vertex on and uses no edge of . Combining it with either connecting arc of gives a second graph cycle, a contradiction. Thus the remaining graph consists of trees, each rooted at exactly one vertex of .
After choosing a proper vertex colouring of from colours, colour these rooted trees away from their roots. Each of the off-graph cycle vertices has one already coloured parent in a rooted tree, leaving exactly choices. The multiplication principle therefore gives
Equivalently, this repeatedly applies the chromatic polynomial after attaching a leaf formula.
To compute the chromatic polynomial of a cycle, the base case is the graph triangle:
For , deleting a cycle graph edge gives a path graph on vertices, while edge contraction gives . The chromatic polynomial of that path graph is , by choosing the colour of its first vertex and then each successive vertex. Hence the deletion-contraction recurrence for the chromatic polynomial gives
Using mathematical induction, substitute to obtain
Multiplying by the factor for the attached trees proves the chromatic polynomial of a unicyclic graph formula