For a directed graph, store in for the edge . The reverse edge is separate and is stored only if it exists. Consequently, list length is outdegree, not indegree, and each directed edge contributes one entry in total. An incoming-list index is additional storage.[ref]
Orient the seven edges of our example from earlier to later labels. The resulting directed graph has
There are now seven entries, with outdegrees . In particular, needs an empty list even though it is reached from : incoming edges do not make 's outgoing list nonempty. Replacing each directed edge by an undirected graph connection would lose this distinction.
Our running simple graph excludes self-loops and repeated edges. If those restrictions are relaxed, specify how the adjacency list encodes them. Here an undirected self-loop at contributes two copies of to , matching its contribution of two to the degree of a vertex. A directed self-loop contributes one copy, and one each to outdegree and indegree. Distinct parallel edges retain distinct entries; a multigraph's list length can therefore exceed its number of distinct neighbours.[ref][ref]
For example, add one undirected self-loop at to the seven-edge example. Its list becomes , the vertex degree of becomes four, and the total entry count becomes sixteen for eight edges. If an application instead stores a self-loop once, it must account for its doubled undirected vertex degree separately. In a weighted graph, an entry can be an ordered pair meaning destination and weight ; the weight belongs to the edge, not to the destination vertex.
If a finite simple graph is a connected graph, a bipartite graph, and a planar graph, with vertices, then . Every facial boundary walk has even length and length at least three, hence at least four. Thus ; substitute the Euler formula for a connected planar graph.[ref]
The square cycle graph attains equality: . The three-vertex graph path also attains equality: . Its repeated bridges in a graph illustrate why counting facial boundary walk length correctly matters. Neither bound applies unchanged to a multigraph: two vertices may support arbitrarily many parallel edges in a plane graph.
Chromatic index bounds 2026-10-14
For every finite simple graph, Vizing's theorem gives
Here is the maximum degree of a graph, taken as zero when there are no vertices. A bipartite graph has the stronger equality . The six-job complete bipartite graph above attains this lower bound, while the triangle in a graph attains the extra-colour alternative. The simple-graph restriction in the upper bound matters.[ref]
The bipartite graph equality still holds for finite loopless multigraphs, with parallel edges counted separately in each vertex degree. For instance, parallel jobs between two resources need exactly slots: every pair conflicts, and . For a general finite loopless multigraph, however, the simple graph upper bound can fail. Put two parallel edges on each side of a triangle in a graph. All six edges pairwise share a vertex, so each needs its own colour; every vertex has degree of a vertex four. Consequently . A multiplicity-aware bound is , where is the largest number of parallel edges between a pair of vertices. The doubled triangle in a graph has and attains that bound. These statements exclude self-loops; the two-distinct-resource scheduling model excludes them too.[ref]
For historical orientation, Graph Theory by Reinhard Diestel (Colouring preview, §5.3, p. 132) dates the bipartite equality to 1916 and Vizing's theorem to 1964. These are textbook attributions; the original papers have not been inspected here. The results state existence of optimal or nearly optimal proper edge colourings, rather than saying that arbitrary greedy choices will find them. The list-chromatic index asks the further question of success for every sufficiently large family of allowed-colour lists.
Around each of points draw its at most distinct-distance circles. On every circle containing at least three points, join cyclically consecutive points by arcs. The resulting loopless multigraph has at least edges and a drawing with crossings. A pair joined by several arcs has every corresponding centre on its perpendicular bisector, which is the key to bounding multiplicity.
Configuration model Created 2026-10-14 Updated 2026-10-20
For a prescribed degree sequence with even sum , attach labelled half-edges to vertex and choose a uniform perfect matching of the half-edges. Each pair becomes an edge, giving a multigraph that may have self-loops or parallel edges. The number of pairings is . Every simple graph with that degree sequence has exactly pairing representations, so conditioning on simplicity produces the uniform simple-graph model.
Here a loopless multigraph has vertices, edges, and at most parallel edges per pair. In a minimum-crossing drawing, crossings between incident edges can be removed by exchanging their initial segments, so every crossing involves four distinct vertices. For each parallel class choose an edge with probability per edge, with the remaining probability choosing none. Retain vertices independently with probability . The sampled simple graph has expected edge count , expected vertex count , and expected crossing count . Deleting one edge per crossing and using the planar graph edge bound gives . Choose .
DFS lowpoint 2026-10-14
For a finite simple graph that is an undirected graph, the DFS lowpoint of is the smallest DFS discovery time reachable by following zero or more discovery edges down its rooted tree, then at most one non-discovery edge to an ancestor. Staying at is allowed. Ignore the reverse traversal of the discovery edge to the parent in a rooted tree: it is the same edge, not an escape route. Start with . On returning from a child in a rooted tree , replace by . For a non-discovery edge from to an earlier ancestor , replace it by . This summarizes how far upward the explored branch can reconnect. [ref]
The cut vertex criterion has a separate case for each root of a tree in the discovery forest:
Why does equality matter? If , the branch below can reconnect to , so the discovery edge lies on a graph cycle and is not a bridge in a graph. Deleting the vertex destroys that reconnection too. If has a parent in a rooted tree, the branch is then separated from that parent in a rooted tree, explaining the non-strict cut vertex test. For a root of a tree, there is no earlier side to separate from; distinct discovery branches cannot have an edge between them, since depth-first search would have explored them as one branch. This gives the two-children in a rooted tree rule. These are proof outlines of the criteria. [ref][ref]
In the joined- example with DFS discovery times , the DFS lowpoints in label order are . For and its child in a rooted tree , : is a bridge in a graph, and is a cut vertex. For and its child in a rooted tree , : is a cut vertex, although is not a bridge in a graph. The root of a tree has only one child in a rooted tree, , so it is not a cut vertex. In the shared- example, the root of a tree has two children in a rooted tree, and , and is a cut vertex, while every DFS lowpoint is and no edge passes the strict bridge in a graph test.
Restart depth-first search at every undiscovered vertex to cover a disconnected graph, applying the root of a tree rule separately in each connected component of a graph. With adjacency lists and constant-cost label operations, computing all DFS lowpoints, cut vertices and bridges in a graph has time complexity in Big O notation, because each vertex is discovered once and each edge is inspected twice. The simple parent-skipping rule assumes a simple graph. In a multigraph, skip only the actual parent edge, identified individually: a parallel edge to the same parent in a rooted tree is a valid reconnection and can prevent the first edge from being a bridge in a graph. The criteria here concern undirected graphs; a directed graph requires a different connectivity analysis.
Directed percolation 2026-10-14
In bond percolation on a directed graph, independently open each directed edge with probability . The out-cluster of consists of vertices reachable by open directed paths. In site percolation, independently open vertices and require every vertex of the directed path, including , to be open. The same definitions allow a multigraph. The orientation matters: an infinite underlying connected graph need not contain an infinite out-cluster from a specified root.
Suppose each job occupies two distinct resources for one whole slot, and each resource can serve at most one job in that slot. Make resources vertices and jobs edges. Two jobs conflict exactly when their edges share a vertex, so a valid schedule is a proper edge colouring. Each slot is a matching in a graph; the chromatic index is the minimum number of slots. The colour labels specify the slots, rather than physical colours. This model assumes all jobs are available initially, with equal duration, interchangeable slots and no additional conflicts. The school-timetable motivation in Graph Theory by Reinhard Diestel (author-hosted Colouring preview, opening paragraphs, pp. 123–124) uses this resource-pair interpretation.
Here is a complete example. Two technicians must each use three instruments once. Each job needs its technician and its instrument simultaneously. The six jobs are the edges of the complete bipartite graph :
Within each , the two jobs use different technicians and different instruments, so is a matching in a graph. The three matchings in a graph together cover every job exactly once. Technician has three jobs, so fewer than three slots cannot suffice; the displayed schedule uses three. This is an optimal proper edge colouring with chromatic index three, witnessed by both a schedule and a resource-workload lower bound.
Figure 1.
Six jobs on a complete bipartite graph become three scheduling slots, each a matching in a graph
. The vertices are resources, and each numbered edge is one job. The slot table uses the same colour labels as the proper edge colouring. A technician or instrument appears at most once within a column. Crossings of drawn edges introduce no resource and no conflict. Details.
Repeated jobs requiring the same resource pair become distinct parallel edges of a multigraph, rather than one edge. Additional restrictions change the problem: prescribed allowed slots lead to list edge coloring, while unequal durations, deadlines, or jobs needing more than two resources require a richer scheduling model. Selecting a largest matching in a graph solves a single-round question; a shortest complete schedule must organize all jobs across rounds.
Edge contraction Created 2026-10-05 Updated 2026-10-14
An edge contraction merges the two endpoints of an existing edge. For a finite simple graph and , replace by a new vertex . Retain every edge with neither endpoint in , and join to every member of
Here and denote the original open graph neighbourhoods, and is the new graph neighbourhood. Remove the self-loop arising from and merge duplicate edges, so the result is again a simple graph. This is not deletion of , which keeps both original vertices.[ref]
The left example contracts in the cycle graph to give . Its endpoints have no common neighbours, so four edges become three. The right example contracts in the triangle in a graph with edges . Its endpoints have the single common neighbour , so the two edges become one edge : three edges become one.
For any such edge contraction, the exact counts are
The contracted edge accounts for one loss. Each common neighbour contributes exactly one further loss, since become a single edge . All other edges correspond one-to-one to surviving edges. In particular the new degree of a vertex is
These formulas depend on simplifying to a simple graph; a multigraph convention that retains duplicate edges has different counts. In the six-vertex branch set of a graph minor diagram, contracting loses one edge, contracting the resulting loses two because of its common neighbour , and contracting loses one. Hence its seven edges become the three edges of : .
An edge contraction can increase a degree of a vertex even while decreasing both total counts. For example, contracting in the tree with edges merges two vertices of degree of a vertex three into one of degree of a vertex four. This is the mechanism behind the distinction between a graph minor and a topological minor.
Edge set 2026-10-31
The set of edges of a specified graph. In a simple graph, an edge is determined by its endpoints; a multigraph additionally distinguishes parallel edges with the same endpoints. A subgraph can be specified by selecting a vertex set and an edge set whose endpoints belong to it.
Edge support of a graph 2026-10-14
For a finite undirected multigraph , its edge support of a graph is the subgraph with . It removes exactly the isolated vertices, retaining every edge, including self-loops and parallel edges. When , connectivity of this subgraph is the relevant condition for an Eulerian trail or Euler circuit.
Euler circuit Created 2026-10-07 Updated 2026-10-14
An Euler circuit, also called an Euler tour, is an Eulerian trail whose final vertex equals its initial vertex. Its length is . It can revisit other vertices, unlike a Hamiltonian cycle, which visits each vertex once before returning to the start. For a finite undirected multigraph with at least one edge, an Euler circuit exists exactly when the edge support of a graph is a connected graph and every vertex degree is even.
For example, let be distinct parallel edges joining , let be a self-loop at , and add an isolated vertex . Then , and is an Euler tour. The self-loop supplies one traversal and two incidences; need not be visited. Replacing by a single edge changes both vertex degrees to odd numbers and removes the possibility of an Euler circuit. Thus collapsing parallel edges can change the answer.
Two triangles in a graph sharing one vertex give another instructive Euler circuit: . The shared vertex has vertex degree four, the others have vertex degree two, and is revisited between the two closed trails. This is precisely the splice used by Hierholzer's algorithm.
Euler circuit criterion Created 2026-09-24 Updated 2026-10-14
Let be a finite undirected multigraph, allowing self-loops and distinct parallel edges, with . Then
where is the edge support of a graph, and vertex degrees count each self-loop twice. There is no lower bound of three on the number of vertices. If , the zero-length convention gives an Euler circuit exactly when .[ref]
The two requirements are independent: two separate vertices, each carrying a self-loop, have even vertex degrees but disconnected edge support of a graph, so no Euler circuit can cover both edges.
Necessity follows because a single trail cannot cover edges in different connected components of a graph, while a closed trail pairs all arriving and departing incidences, including those at its starting vertex. For sufficiency, extend a trail using unused edges until no extension is possible. Even vertex degree parity prevents it from stopping anywhere except its starting vertex: a different stopping vertex would have an odd number of used incidences and hence at least one unused incidence. The result is a closed trail.
If unused edges remain, connectivity of the edge support of a graph supplies a vertex on the current closed trail with an unused incident edge. Removing a closed trail leaves even unused vertex degrees, so the same argument constructs another closed trail from that vertex. Splice it into the existing record. The two trails use disjoint edge identities, so the splice repeats no edge. Each splice uses more edges; finiteness ensures termination with an Euler circuit. This is the constructive idea of Hierholzer's algorithm.
Figure 1.
Hierholzer's algorithm inserts one closed trail into another at their shared vertex, using each of six edges exactly once
. Details.
In the drawing, arrows indicate the chosen traversal direction along undirected edges. The first closed trail uses and the second uses . Insert the second at the final occurrence of in , giving . A reader can check consecutive endpoints, closure, and the six distinct edges directly. With multigraphs, perform the same check on edge identities, since endpoint pairs alone cannot distinguish parallel edges.
Eulerian graph Created 2026-09-24 Updated 2026-10-14
An Eulerian graph has an Euler circuit: a closed trail traversing every edge exactly once. Here the graph is a finite undirected graph, possibly a multigraph with self-loops. Parallel edges retain distinct identities, and each self-loop contributes two to its vertex degree. Repeated vertices are allowed. This models inspecting every road segment once, even when a junction must be revisited.
For a nonempty set of edges, the Euler circuit criterion requires a connected graph only on the edge support of a graph: isolated vertices impose no travel requirement. A single vertex with a self-loop and two vertices joined by two parallel edges are both Eulerian graphs. Neither requires three vertices. With no edges and at least one vertex, we allow the zero-length trail at that vertex as an Euler circuit; the graph with no vertices has no such walk.
The motivating Seven Bridges of Königsberg problem asks for an Eulerian trail, which need not return to its starting vertex. In Leonhard Euler's Solutio problematis ad geometriam situs pertinentis by Leonhard Euler, §2 poses the bridge-crossing question and §§4–6 encode land regions by letters. The river's shape drops out: only the connections matter. The paper was written in 1735 and published in 1741, according to the Euler Archive; the journal volume carries the nominal year 1736.[ref]
Eulerian trail 2026-10-14
An Eulerian trail, also called an Eulerian path, is a trail in a graph traversing every edge exactly once. The name Eulerian path does not require a graph path: vertices may repeat. A Hamiltonian path instead visits every vertex exactly once, and may omit edges. An Eulerian trail may omit isolated vertices, so these are different coverage requirements.
For a finite undirected multigraph with at least one edge, allowing self-loops, an Eulerian trail exists exactly when the edge support of a graph is a connected graph and there are zero or two vertices of odd vertex degree. In the two-odd-vertex case they must be the two distinct endpoints; in the zero-odd-vertex case every Eulerian trail is an Euler circuit. Count a self-loop twice in the vertex degree but once in the trail, and count each parallel edge separately.[ref]
The parity obstruction is local: each intermediate visit pairs an arriving edge with a departing edge. Only the distinct endpoints can have an unpaired incidence. The handshaking lemma, , also shows that the number of vertices with odd vertex degree is even. Sufficiency in the two-endpoint case reduces to the Euler circuit criterion: add one extra edge between the odd vertices, construct an Euler circuit, rotate its record to start with the extra edge, then delete that edge. The remaining trail has the required endpoints.
For the Seven Bridges of Königsberg multigraph, the vertex degrees at are , so no Eulerian trail exists. Remove the unique edge : the vertex degrees become , and a six-edge Eulerian trail runs from to . Label the parallel edges between and between ; label by and by . A complete record is . It revisits while using every remaining edge once.
Figure 1.
Four odd vertex degrees forbid an Eulerian trail; two allow distinct endpoints; zero allow an Euler circuit
. Details.
Graph Created 2026-09-24 Updated 2026-10-18
Figure 1.
Two drawings of the same six-vertex graph and its adjacency matrix
. Details.
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 has
where 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]
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]
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]
Graph kernel Created 2026-10-14 Updated 2026-10-18
For a connected graph whose 2-core contains a vertex of degree of a vertex at least three, suppress each maximal graph path with degree-two internal vertices to a single edge, allowing its two endpoints to coincide. Here suppression is the reverse of graph subdivision. The resulting multigraph, retaining self-loops and parallel edges, is its graph kernel. Each suppressed internal vertex removes one vertex and one edge, preserving graph excess; counting a self-loop twice toward degree of a vertex, every remaining vertex has degree of a vertex at least three. A purely cyclic 2-core is a separate unicyclic case: it has no branching vertex to anchor this construction.
For the barbell in bridges and connectivity in the 2-core, the graph kernel has two vertices , one self-loop at each, and a single joining edge . Suppressing contracts the joining graph path to that bridge in a graph; suppressing the two other vertices on each triangle turns the triangle into a self-loop. The graph excess stays . Thus forming a graph kernel compresses degree-two chains rather than deleting everything outside graph cycles.
Multiple edges 2026-10-14
Multiple edges are distinct edges with the same pair of endpoint vertices in an undirected graph. A multigraph permits them; a simple graph does not. In an orientation of a graph of a multigraph, each such edge receives its own direction, so two of them can supply opposite directed edges between the same vertices.
Neighbour enumeration 2026-10-14
Neighbour enumeration reports the neighbours of a specified vertex. For a simple graph, scan its adjacency list and report each entry. With constant-time list access and work per entry, a list of length needs time in Big O notation, conventionally written for nonempty lists. Use vertex degree for an undirected graph and outdegree for a directed graph. Obtaining the list reference can take constant time; consuming it requires visiting every entry.[ref]
In our undirected example, enumerating 's neighbours reads : three entries. Scanning row of the full adjacency matrix reads six entries, , to produce the same answer. In the directed variant, enumerating 's outgoing neighbours reads no neighbour entries, but still needs constant work to locate and recognize its empty list. For a multigraph, scanning lists enumerates incident edges with multiplicity; reporting only distinct neighbours additionally requires removing repetitions.
For a short time complexity argument, each reported entry requires at least one output operation, and one scan suffices. Across all vertices, the undirected entry count is by the handshaking lemma; the directed count is . A graph search that processes each vertex once and scans each of its entries once therefore does structural work, provided its visited-state access and FIFO queue or stack operations also have the required constant-time costs. With a full adjacency matrix, scanning every row instead inspects entries. This is how the representation enters the analysis of breadth-first search and depth-first search.