Fact-checked by Grok 2 weeks ago

Eulerian path

An Eulerian path is a in a finite undirected that visits every exactly once, possibly revisiting along the way. If the path is closed—meaning it starts and ends at the same —it is known as an Eulerian or Eulerian . This concept forms a foundational element of , a branch of mathematics that studies networks of connected by . The notion of an Eulerian path originated in 1736 with Leonhard Euler's solution to the Seven Bridges of Königsberg problem, widely regarded as the birth of . In this historical puzzle, the city of (now ) featured seven bridges spanning the Pregel River and its islands; residents sought a walk that crossed each bridge exactly once and returned to the starting point. Euler modeled the problem as a with four vertices (landmasses) and seven edges (bridges), proving no such closed path existed because the had more than two vertices of odd . For an undirected connected to possess an Eulerian path, it must have exactly zero or two vertices of odd degree; the former case yields an Eulerian circuit, while the latter starts and ends at the odd-degree vertices. Euler's original 1736 paper, "Solutio problematis ad geometriam situs pertinentis," provided the first general criteria for such paths in both undirected and directed graphs, establishing theorems that remain central to the field. These ideas have since influenced diverse applications, including network routing, , and optimization problems in .

Fundamentals

Definition

In , a is a consisting of a set of vertices (also called nodes or points) connected by edges (links or lines), which may or may not allow multiple edges between the same pair of vertices or self-loops. A is a sequence of distinct vertices connected by edges, while a is a walk in which no edge is repeated (though vertices may be revisited), and a is a closed trail that starts and ends at the same vertex. An Eulerian path in a graph is a trail that visits every edge exactly once, allowing revisits to vertices as needed. This concept differs fundamentally from a Hamiltonian path, which requires visiting every vertex exactly once but places no restrictions on edges beyond connectivity. An Eulerian circuit, also known as an Eulerian cycle, is a special case of an Eulerian path that is closed, meaning it starts and ends at the same vertex while still traversing each edge exactly once. The notion of an Eulerian path originated from the historical Seven Bridges of Königsberg problem, posed in the 18th century, where the goal was to find a walk crossing each of the city's seven bridges exactly once. In 1735, Leonhard Euler proved that no such path exists in the corresponding graph, as it features four vertices of odd degree, laying the foundational insight for Eulerian paths in graph theory.

Basic Terminology

In , a walk is a sequence of and in a where each connects consecutive in the sequence, allowing repetitions of both and . A trail is a walk in which no is repeated. A path is a trail in which no is repeated. A circuit is a closed trail, meaning it starts and ends at the same vertex with no repeated . An Eulerian path, for example, is a special type of trail that traverses every in the exactly once. A is connected if there exists a between every pair of its vertices; otherwise, it is disconnected. Graphs in foundational are typically assumed to be finite, consisting of a finite number of vertices and edges, though infinite graphs—those with infinitely many vertices or edges—are studied in advanced contexts but require careful handling of and traversal properties. The of a in an undirected graph is the number of edges incident to it, with a loop at the vertex contributing two to its degree. Vertices are classified by degree parity: a vertex has if its degree is even and if odd, a distinction critical for analyzing traversability in graphs. A generalizes a simple graph by permitting multiple edges between the same pair of vertices and loops (edges connecting a vertex to itself), which is essential in Eulerian contexts to model scenarios like multiple bridges between landmasses without assuming uniqueness of connections.

Properties

In Undirected Graphs

In undirected graphs, an Eulerian circuit exists if and only if the graph is connected and every vertex has even degree. This condition ensures that a closed trail traversing each edge exactly once can be formed, returning to the starting vertex. The theorem originates from Leonhard Euler's foundational work on the Königsberg bridge problem, where he established that traversability depends on vertex degrees. For an Eulerian path (which may be open), the must be connected and have exactly zero or two of odd ; in the latter case, the path starts at one odd- vertex and ends at the other. If all degrees are even, the path is closed (a circuit); otherwise, the two odd- serve as the endpoints. This criterion follows from considerations: each intermediate vertex in a must have even in the remaining graph to allow entry and exit via unused edges. A sketch of the proof for these theorems relies on constructing trails and using degree parity. For the circuit case, begin at any vertex and extend a trail as far as possible until stuck at a vertex v with unused incident edges; since all degrees are even, v must still have even degree in the unused edges, allowing a cycle to be found and spliced into the trail. Repeating this removes all edges, yielding the circuit. The path case extends this by starting at an odd-degree vertex if applicable, ensuring the trail ends at the other odd-degree vertex after exhausting edges. Conversely, if an Eulerian trail exists, removing its edges leaves even degrees at all vertices except possibly the endpoints, confirming the degree conditions. A representative example is the K_n, where each has n-1. Thus, K_n admits an Eulerian precisely when n is odd, as all degrees are then even. For disconnected graphs, an Eulerian path or exists only if all edges lie in a single (ignoring isolated vertices, which have no edges and thus do not affect traversability), and that component satisfies the degree conditions above.

In Directed Graphs

In s, the conditions for the existence of an Eulerian differ from those in undirected graphs primarily due to the of edges, requiring balance between incoming and outgoing edges at each along with appropriate . A has an Eulerian if and only if every has equal in-degree and out-degree, and all vertices with nonzero belong to a single . For an Eulerian path that is not closed, the degree conditions are relaxed at exactly two vertices: the graph has an Eulerian path if and only if all vertices with nonzero degree belong to a single of the underlying undirected , exactly one vertex s (the start) has out-degree equal to in-degree plus one, exactly one vertex t (the end) has in-degree equal to out-degree plus one, and all other vertices have equal in-degree and out-degree. The proof of these theorems proceeds by constructing a maximal directed and using the balance to ensure it can be extended or closed appropriately. If the conditions hold, begin at a with unused outgoing edges (or the designated start for paths) and follow directed edges until no unused outgoing edge remains at the current ; due to equal in- and out- (or the specified imbalance), the ends at the starting for circuits or the designated end for paths. If unused edges remain elsewhere, the properties—strong for circuits and weak (with start at s) for paths—guarantee the ability to find a directed subtrail using only unused edges starting from some on the current , which is then inserted into the . Repeating this splicing process exhausts all edges, yielding the Eulerian . This construction mirrors the undirected case but enforces directionality in formation and insertion to respect edge orientations. Strong is crucial, as it ensures directed paths exist between any pair of vertices, allowing the traversal to reach and incorporate all edges without needing to reverse directions. In contrast, mere weak —where the underlying undirected is connected—may permit balanced degrees but fail to provide the necessary directed routes for an Eulerian ; for instance, two vertices connected by edges in opposite directions but no would violate strong despite weak and balanced degrees. A simple example is a directed cycle graph on n \geq 3 vertices, where each vertex has in-degree and out-degree 1; it is strongly connected and thus admits an Eulerian circuit traversing the cycle once. For an Eulerian path, consider a directed path graph on n \geq 2 vertices, where the start vertex has out-degree 1 and in-degree 0, the end has in-degree 1 and out-degree 0, and intermediate vertices have both degrees 1; the underlying undirected graph is connected (i.e., the graph is weakly connected), confirming the existence of the Eulerian path along the sequence. Tournament graphs, which are complete directed graphs, provide another illustration: a strong tournament (strongly connected) with all in-degrees equal to out-degrees admits an Eulerian circuit, as seen in regular tournaments of odd order.

Construction Algorithms

Fleury's Algorithm

Fleury's algorithm provides a straightforward recursive method for constructing an Eulerian path in an undirected graph that meets the existence conditions, such as having exactly zero or two vertices of odd degree. Developed by French mathematician Pierre-Henry Fleury in , the algorithm proceeds by building the path incrementally while adhering to a key rule to ensure connectivity of the remaining graph. Central to the algorithm is the concept of a bridge, defined as an edge in a connected graph whose removal increases the number of connected components. During traversal, the algorithm avoids crossing a bridge in the subgraph induced by the unused edges unless no alternative non-bridge edge is available from the current vertex. This "bridge-avoidance" rule prevents prematurely disconnecting the graph, ensuring that all edges can be traversed. The procedure begins at a of if an Eulerian path (but not ) is sought, or at any otherwise. From the current , select an unused adjacent that is not a in the subgraph of remaining unused edges, traverse it to the next , and mark the edge as used. If the only available edges are bridges, select one and proceed. Recur until no unused edges remain, then reverse the path to obtain the Eulerian path in the correct order. For an Eulerian , the process naturally closes upon returning to the start. The following pseudocode outlines the recursive implementation, assuming the graph is represented as an adjacency list and edges are tracked for usage:
function Fleury(graph G, start_vertex v):
    path = []
    def dfs(current):
        while there are unused edges from current:
            # Prefer non-bridge edge if available
            selected_e = None
            selected_w = None
            for each unused edge e from current to neighbor w:
                if not is_bridge(G_unused, e):
                    selected_e = e
                    selected_w = w
                    break
            if selected_e is None and there are unused edges from current:
                # Take a bridge if no non-bridge available
                selected_e = first unused edge from current to some w
                selected_w = w
            if selected_e is not None:
                mark selected_e as used
                dfs(selected_w)
                path.append(selected_e)
    dfs(v)
    path.reverse()
    return path

# Helper: is_bridge checks connectivity after temporary removal via DFS/BFS on unused edges
To initiate, call Fleury on the full graph starting from an appropriate vertex; the full path is assembled by concatenating recursive results in reverse. Bridge checks can be performed by temporarily removing the edge and verifying via DFS or BFS on the unused . The of Fleury's is O(E^2), where E is the number of edges, arising from O(E) traversal steps, each potentially requiring O(E) time to check for via queries. Consider a small with vertices A, B, and C, and edges: two between A and B (labeled e1, e2), two between B and C (e3, e4), and one between A and C (e5). Degrees are odd at A (3) and C (3), even at B (4), so an Eulerian path exists from A to C. Start at A. From A, possible edges are e1 to B or e5 to C. Checking the unused subgraph, e5 is a (removing it disconnects C from A-B), so prefer e1 to B (non-bridge). Traverse e1 to B; now unused: e2 (A-B), e3/e4 (B-C), e5 (A-C). From B, e2 leads back to A (non-bridge), e3/e4 to C (non-bridge). Suppose take e3 to C. From C, only e4 back to B (but e4 unused? Wait, e4 still unused, but from C now only e5? No: current unused after e1 and e3: e2(A-B), e4(B-C), e5(A-C). From C, no direct unused except via previous, but since at C after e3, unused from C: e4 (C-B), e5 (C-A). Check e4: removing e4 from unused {e2,e4,e5} keeps connected (A-B-C via e2,e5), so non-bridge; but e4 goes to B. Traverse e4 to B. Now at B, unused: e2(A-B), e5(A-C). From B, only e2 to A (non-bridge). Traverse e2 to A. Now at A, unused: e5(A-C). e5 is now a in remaining (single edge), so traverse to C. Path: A-e1-B-e3-C-e4-B-e2-A-e5-C, covering all edges.

Hierholzer's Algorithm

Hierholzer's algorithm, developed by German mathematician Carl Hierholzer and published posthumously in 1873, provides an efficient method for constructing an Eulerian circuit in a connected undirected where every has even , predating Fleury's algorithm by several years. The core idea involves decomposing the into edge-disjoint cycles and then splicing these cycles together to form a single Eulerian tour, ensuring all edges are traversed exactly once. This approach avoids explicit checks for bridges, relying instead on the 's Eulerian properties to guarantee success. The algorithm proceeds iteratively as follows: Select a starting with unused edges and traverse arbitrary unused edges to form an initial until returning to the start. Then, identify any along this that still has unused incident edges, and from that , construct a sub-cycle using the remaining edges in a similar manner. Insert this sub-cycle into the original at the chosen by splicing—effectively breaking the original at that point and combining the paths. Repeat this process recursively or iteratively until no unused edges remain, yielding the complete Eulerian . For graphs with an Eulerian path (exactly two vertices of odd degree), the algorithm adapts by starting at one odd-degree vertex; the process remains the same, but the final output is an open path ending at the other odd-degree vertex rather than a closed circuit. An efficient iterative implementation uses a stack to simulate the traversal without recursion, avoiding stack overflow in large graphs. The following pseudocode outlines the stack-based version for an undirected multigraph represented as an adjacency list, where edges are removed as they are used:
function findEulerianCircuit(graph, start):
    circuit = empty list
    stack = empty stack
    stack.push(start)
    
    while stack is not empty:
        current = stack.top()
        if graph[current] has unused edges:
            next = pick and remove an unused edge from current to some neighbor w
            stack.push(w)
        else:
            circuit.append(stack.pop())
    
    reverse the circuit
    return circuit
This implementation traverses each edge exactly once during construction and processes vertices proportional to their degrees, achieving O(E) time complexity, where E is the number of edges. To illustrate, consider a simplified Königsberg-like with four vertices A, B, C, D and seven edges forming odd degrees at all vertices (two bridges between A-B, A-C, A-D, B-D, C-D). Assuming the is checked for Eulerian properties beforehand, the algorithm would fail to cover all edges in a single tour if started arbitrarily, as sub-tours would leave residual unused edges at odd-degree vertices, confirming the absence of an Eulerian path or . In contrast, modifying the to even degrees (e.g., adding a third edge between B and C) allows the algorithm to successfully construct a full tour by finding and splicing , such as an initial A-B-D-A followed by insertions for remaining edges.

Counting Eulerian Circuits

Computational Complexity

The problem of counting the number of distinct Eulerian circuits in a given Eulerian , where circuits are considered equivalent up to choice of starting , is a fundamental task in . This count captures the structural multiplicity of edge traversals that cover every edge exactly once and return to the origin, providing insights into the 's and beyond mere existence checks. In undirected graphs, exact counting of Eulerian circuits is , even when restricted to 4-regular graphs. The hardness follows from a parsimonious reduction from the problem of counting Hamiltonian cycles in cubic graphs, combined with techniques to preserve counts primes. This result implies that no polynomial-time exists unless P = #P, underscoring the challenge of compared to the polynomial-time of existence. For directed graphs, the situation differs markedly: the number of Eulerian circuits can be computed exactly in polynomial time using the BEST theorem, which expresses the count as the product of vertex-specific factors involving indegrees and the number of arborescences (directed spanning trees) rooted at a , computable via the matrix-tree theorem. This connection to Laplacian determinants enables efficient evaluation, typically in O(n^3) time for n , highlighting a tractable case amid broader . No fully polynomial randomized approximation scheme (FPRAS) is known for counting Eulerian circuits in general undirected graphs, consistent with the #P-completeness; however, randomized algorithms exist for related problems like counting Eulerian orientations, achieving multiplicative approximations in polynomial time with high probability. For sparse graphs or those with bounded , exact counting algorithms run in polynomial time via dynamic programming over graph decompositions, offering practical bounds for restricted sparsity. Exact polynomial-time methods exist for generalized series-parallel graphs, but general approximations remain elusive without further structural assumptions.

Special Graph Cases

The BEST theorem provides an exact method for counting the number of Eulerian circuits in connected directed Eulerian graphs, where every has equal in-degree and out-degree. The theorem states that the number of such circuits, denoted ec(G), is given by ec(G) = t(G) \prod_{v \in V(G)} (\deg^+(v) - 1)! where \deg^+(v) is the out-degree of v, and t(G) is the number of spanning arborescences of G rooted at any fixed (this value is independent of the choice of root due to degree balance). The spanning arborescences can be computed using the matrix-tree theorem applied to the Laplacian of the graph. This formula derives from a decomposition of Eulerian circuits into a rooted spanning arborescence (providing the ) and cycles attached to it, with the terms accounting for the permutations of outgoing edges at each excluding the tree edge. The product over factorials captures the local ordering choices, while t(G) enumerates the global tree configurations compatible with the . For undirected Eulerian graphs, no universal closed-form formula analogous to the BEST theorem exists, as is #P-complete in general, but exact computations are feasible for specific families where structural properties simplify the evaluation, often by summing over Eulerian orientations or using recursive s. In complete graphs K_n with n odd (ensuring even degrees), explicit formulas involve recursive functions counting compatible edge orderings; for instance, the K_3 has exactly 2 Eulerian circuits, corresponding to the two possible traversals of its edges. For 4-regular graphs, exact counting remains challenging but is tractable in subclasses like those with bounded via dynamic programming. Similarly, for generalized series-parallel graphs, polynomial-time algorithms enable exact counts using decompositions, though the problem is #P-complete for general planar graphs. Counting Eulerian circuits in infinite graphs falls outside the scope of finite exact formulas like the BEST theorem, as the infinite edge set precludes a well-defined finite traversal; such cases are addressed in generalizations to infinite structures.

Variants and Generalizations

Mixed Graphs

A mixed graph is a graph that features both undirected s and directed s between vertices. An Eulerian path in a mixed graph is a that visits every and exactly once, respecting the of s while allowing undirected s to be traversed in either direction. The conditions for the existence of an Eulerian path or in mixed graphs generalize those for pure undirected and s by accounting for the flexibility in orienting undirected edges to balance degree imbalances caused by the directed arcs. A necessary and sufficient condition for a mixed to have an Eulerian , due to and Fulkerson (1962), is that every has even (counting undirected edges as contributing to degree without direction), and for every of vertices S, the between the number of directed arcs leaving S and entering S is at most the number of undirected edges incident to S. The must also be weakly connected. This ensures there exists an orientation of the undirected edges such that the resulting directed is balanced (equal in- and out-degrees at every ) and strongly connected, admitting an Eulerian . In cases where the directed subgraph has imbalances, the local conditions at each v provide a starting point: define the deficit \delta(v) = \deg^+(v) - \deg^-(v), where \deg^+(v) and \deg^-(v) are the out-degree and in-degree from directed arcs. A balancing exists locally if |\delta(v)| \leq d_u(v) (undirected ) and \delta(v) \equiv d_u(v) \pmod{2} for every v. However, global conditions like the subset balance are needed to ensure strong connectivity in the oriented graph. These can be checked using maximum flow or matching algorithms. For an Eulerian path (not necessarily closed), the conditions are analogous but allow for exactly one vertex with effective surplus +1 (start) and one with -1 (end) in the oriented degrees, with the graph weakly connected and the subset condition adjusted accordingly for semi-balance. (Digraphs: Theory, Algorithms and Applications) To construct an Eulerian path or circuit, Hierholzer's algorithm can be adapted by first computing a balancing and connectivity-preserving orientation of the undirected edges (using a flow network to model required adjustments, with undirected edges as bidirectional unit capacities). The resulting fully directed graph, being strongly connected (or weakly for paths) with balanced degrees, then admits the standard Hierholzer's algorithm: start at a vertex, perform a tour until stuck, then splice in sub-tours from unused incident arcs at visited vertices until all arcs are traversed. As an example, consider a hybrid road network where some streets are one-way (directed arcs) with imbalances adjustable by two-way streets (undirected edges), satisfying the local and global conditions; an Eulerian circuit exists, allowing a patrol route that covers every street segment exactly once.

Infinite Graphs

In infinite graphs, the concept of an Eulerian path is extended to account for non-terminating structures. An Eulerian ray is defined as a one-way infinite trail—a sequence of vertices and edges where no edge is repeated—that traverses every edge of the graph exactly once. Similarly, an Eulerian double ray is a two-way infinite trail covering all edges exactly once, analogous to an Eulerian circuit in finite graphs. These definitions apply particularly to locally finite graphs, where every vertex has finite degree, ensuring the trails can be constructed without encountering vertices of infinite degree. A fundamental result characterizing the existence of such paths in connected graphs is the theorem of Erdős, Grünwald, and Weiszfeld (1936), which generalizes for finite graphs to the case. For locally finite connected graphs, this implies that an Eulerian double exists if and only if every has even , while an Eulerian exists if and only if there is exactly one of odd (with the starting at that ). This can be viewed as an extension of Veblen's theorem on decompositions, where double rays play the role of cycles in the topological of the . If there are more than one odd-degree , no single Eulerian or double covers all edges, though the graph may admit decompositions into multiple such structures. Examples illustrate these conditions clearly. The infinite graph, consisting of vertices v_0, v_1, v_2, \dots with edges \{v_i, v_{i+1}\} for i \geq 0, has 1 at v_0 (odd) and 2 at all other vertices (even); it admits an Eulerian starting at v_0. In contrast, the infinite double (a two-way infinite path) has all 2 (even) and possesses an Eulerian double traversing the entire structure. The infinite ladder graph, however, with vertices on two parallel connected by rungs, has all vertices of 3 (odd) and thus lacks an Eulerian or double . Modern extensions since 2000 have explored Eulerian structures in more specialized infinite graphs. In graphs—those with thin triangles satisfying the δ-hyperbolicity condition—results on Eulerian maps and spaces address how boundary behavior at infinity affects existence, with applications to group actions and compactifications. For instance, Eulerian spaces on locally finite graphs incorporate the Gromov boundary to ensure trails respect without accumulating at ends. Similarly, in random infinite graphs, such as those generated by branching processes or on lattices, probabilistic methods determine the almost-sure existence of Eulerian s under degree parity conditions, linking to questions in algorithmic . These developments emphasize ray equivalence classes and end-degrees for robust generalizations.

Relation to Bridges

In undirected graphs, the presence of a bridge—an edge whose removal increases the number of connected components—forces any Eulerian path to traverse it exactly once, as bridges lie on no cycles and cannot be revisited without repeating edges. This traversal links the 2-edge-connected components on either side of the bridge, requiring the Eulerian path to complete an Eulerian tour within each component before or after crossing, effectively sequencing the graph's structure along the bridges. A key theorem establishes that a connected undirected admits an Eulerian if and only if every has even , which necessarily implies the graph is 2-edge-connected and thus bridgeless. The existence of a would contradict the circuit's requirement to return to the starting vertex, as the circuit could cross the bridge only once but would need to do so an even number of times to balance the traversal of the separated components. To analyze Eulerian paths in graphs containing bridges, one can use the bridge-block decomposition, where the is partitioned into its 2-edge-connected blocks (maximal subgraphs without bridges) connected by the bridges themselves. The resulting bridge-block treats blocks as vertices and bridges as edges between them; an Eulerian in the original exists this has at most two vertices of odd degree (corresponding to blocks with odd-degree vertices in the original ), and the in the dictates the order of traversing blocks and crossing bridges. For instance, consider a consisting of two s connected by a single bridge: no Eulerian exists due to the bridge, but an Eulerian starts in one , traverses all its edges, crosses the bridge once, and ends after traversing the second . Fleury's algorithm explicitly accounts for bridges to ensure the construction of an Eulerian remains valid. The proceeds by building the step by step, preferring non-bridge edges when possible to avoid prematurely disconnecting the remaining ; only when no alternative exists does it traverse a , guaranteeing that all edges are covered without stranding unused edges in separate components. This bridge rule is crucial for correctness in graphs with bridges, as violating it could leave untraversable subgraphs.

Applications

Route Optimization Problems

The (CPP), also known as the route inspection problem, involves finding the shortest closed walk in a connected edge-weighted that traverses every at least once. This problem is closely tied to Eulerian paths, as an optimal solution can be obtained by augmenting the graph with the minimum length of duplicate edges to render it Eulerian, after which an Eulerian circuit provides the desired tour. For undirected graphs, the CPP is solved in polynomial time using an algorithm that first identifies all vertices of odd degree. These vertices are then paired via a minimum-cost perfect matching in a complete graph where the edge weights between pairs represent the shortest-path distances in the original graph; the corresponding shortest paths are duplicated to create the augmented Eulerian graph. In the directed case, assuming the graph is strongly connected, the solution balances the in-degree and out-degree imbalances at each vertex by adding a minimum-cost set of arcs, again yielding an Eulerian digraph. Real-world applications of the in route optimization span and , including minimizing distances for postal delivery routes where mail carriers must cover all streets, efficient snow plowing to clear every road segment in urban areas, and optimizing drilling sequences for holes in printed circuit boards () to reduce machine travel time. Such uses date back to the late , particularly in industrial routing tasks like PCB production. While the undirected and directed variants of the CPP are polynomially solvable, the mixed CPP—where the graph contains both directed and undirected edges—is NP-hard, complicating exact solutions for hybrid routing scenarios.

Sequence Assembly Problems

In sequence assembly problems, particularly in bioinformatics, Eulerian paths play a central role in reconstructing long DNA sequences from short, overlapping fragments known as reads. This approach leverages de Bruijn graphs, where vertices represent k-mers (substrings of length k from the reads), and directed edges represent (k+1)-mers, connecting two k-mers that overlap by exactly k bases. An Eulerian path in this graph traverses each edge exactly once, effectively reconstructing the original sequence by starting with the initial k-mer and appending the non-overlapping base from each subsequent edge, thereby handling the overlaps inherent in shotgun sequencing data. The application of this method to emerged in the 1990s as a computationally efficient alternative to overlap-layout-consensus strategies, enabling the assembly of large by breaking them into manageable fragments and relying on random overlaps for reconstruction. A seminal formulation was proposed by Idury and Waterman in 1995, who demonstrated how de Bruijn graphs and Eulerian paths could address the fragment assembly problem, particularly for handling coverage and repeats. This technique gained prominence in subsequent assemblies using next-generation sequencing technologies, facilitating the integration of millions of short reads into contiguous sequences despite sequencing errors and gaps. For efficient computation of the Eulerian path, Hierholzer's is commonly employed, as it runs in linear time relative to the number of edges, making it scalable for massive datasets generated by high-throughput sequencing. Variants of the Eulerian path approach adapt to specific challenges, such as error-tolerant assembly for noisy data from single-cell or long-read sequencing, where tools like SPAdes construct multi-sized de Bruijn graphs to correct errors and resolve repeats before path finding. For circular genomes, such as bacterial plasmids, an Eulerian circuit (a closed path) is sought instead, ensuring complete traversal without loose ends. In modern contexts as of 2025, these methods extend to , where Eulerian paths in de Bruijn graphs assemble microbial communities from mixed-species samples, as seen in tools like metaSPAdes for scalable reconstruction. Additionally, adaptations using k-mers enable Eulerian tours for assembly in protein-related tasks, supporting predictions of protein sequences from metagenomic data.

References

  1. [1]
    9.4 Traversals: Eulerian and Hamiltonian Graphs
    An Eulerian path through a graph is a path whose edge list contains each edge of the graph exactly once. If the path is a circuit, then it is called an Eulerian ...
  2. [2]
    Graph theory glossary - Harvard Mathematics Department
    edge (n.): See graph. Euler(ian) circuit, Euler(ian) path (n.): An Euler path (a.k.a. Eulerian path) in a graph G is a path that traverses each edge of G ...
  3. [3]
    [PDF] Graph Theory
    2. 1. Graph Theory. At first, the usefulness of Euler's ideas and of “graph theory” itself was found only in solving puzzles and in analyzing games and other ...
  4. [4]
    Solutio problematis ad geometriam situs pertinentis
    Sep 25, 2018 · This is one of Euler's most famous papers: the Königsberg bridge problem. It is often cited as the earliest paper in both topology and graph theory.
  5. [5]
    Leonard Euler's Solution to the Konigsberg Bridge Problem
    Euler's Proof. On August 26, 1735, Euler presented a paper containing the solution to the Konigsberg bridge problem. He addressed both this specific problem ...
  6. [6]
    [PDF] Early Writings on Graph Theory: Euler Circuits and The Königsberg ...
    Dec 8, 2005 · If every edge of the graph is used exactly once (as desired in a bridge-crossing route), the path (circuit) is said to be a 'Euler path (circuit) ...
  7. [7]
    [PDF] Euler Paths, Planar Graphs and Hamiltonian Paths - CS@Cornell
    ● An undirected graph has an Eulerian path if and only if exactly. zero or two vertices have odd degree. Page 9. Euler Path Example. 2.Missing: definition | Show results with:definition
  8. [8]
    [PDF] Note 13 - People @EECS
    An Eulerian path is a path in a graph that uses each edge exactly once (sometimes, to emphasize that. Eulerian paths are not simple—i.e., they might go through ...
  9. [9]
    Euler Paths and Circuits - Discrete Mathematics - An Open Introduction
    An Euler path, in a graph or multigraph, is a walk through the graph which uses every edge exactly once. An Euler circuit is an Euler path which starts and ...
  10. [10]
    Euler and Hamiltonian Paths and Circuits - Lumen Learning
    An Euler path is a path that uses every edge in a graph with no repeats. Being a path, it does not have to return to the starting vertex.
  11. [11]
    Eulerian Cycle -- from Wolfram MathWorld
    An Eulerian cycle, also called an Eulerian circuit, Euler circuit, Eulerian tour, or Euler tour, is a trail which starts and ends at the same graph vertex.
  12. [12]
    [PDF] graph theory: basic definitions and theorems
    A trail is a walk with no repeated edges. A path is a walk with no repeated vertices ... A trail or circuit is Eulerian if it uses every edge in the graph.
  13. [13]
    [PDF] Infinite Graphs
    Every infinite connected graph has a vertex of in- finite degree or contains a ray. Proof. Let G be an infinite connected graph with all degrees finite. Let. ( ...
  14. [14]
    [PDF] Solutio problematis ad geometriam situs pertinentis
    Sep 25, 2018 · Recommended Citation. Euler, Leonhard, "Solutio problematis ad geometriam situs pertinentis" (1741). Euler Archive - All Works. 53. https ...
  15. [15]
    [PDF] Lecture 17: Eulerian tours and cycle decompositions
    A multigraph G has a cycle decomposition if and only if every vertex of G has an even degree. Proof. The “only if” direction is due to the fact that every cycle ...<|separator|>
  16. [16]
    Does Eulerian cycle in digraph really need strongly connected ...
    May 25, 2017 · An Eulerian cycle in a digraph requires strong connectivity, but if in- and out-degrees are equal, weak connectivity is also sufficient.Eulerian Path In Directed Graph using SCC - Math Stack ExchangeProof of weakly connected finite directed graph is strongly ...More results from math.stackexchange.com
  17. [17]
    Euler Cycle in directed cycle - Math Stack Exchange
    Aug 8, 2020 · If a directed graph D=(V,E) has a DFS tree that is spanning, and has in-degree equal out-degree, then it is Eulerian (ie, has an euler ...What are the necessary and sufficient conditions for Euler path in ...Does Eulerian cycle in digraph really need strongly connected ...More results from math.stackexchange.comMissing: theorem | Show results with:theorem
  18. [18]
    [PDF] Section 3.3. Euler Tours
    Dec 8, 2022 · Fleury's Algorithm. Input: a connected even graph G and specified vertex u of G. Output: an Euler tour W of G starting and ending at u.
  19. [19]
    [PDF] GRAPH THEORY WITH APPLICATIONS
    This book is intended as an introduction to graph theory. Our aim has been to present what we consider to be the basic material, together with a wide.
  20. [20]
    4.6 Euler Path Problems - WeBWorK
    Algorithm 4.6.1 Fleury's Algorithm · Start at any vertex if finding an Euler circuit. · Choose any edge leaving your current vertex, provided deleting that edge ...
  21. [21]
    Fleury's Algorithm for printing Eulerian Path or Circuit - GeeksforGeeks
    Jul 23, 2025 · The idea is to use Fleury's Algorithm to print an Eulerian Path or Eulerian Circuit from a graph by carefully selecting edges during traversal.
  22. [22]
    Constructing Eulerian Trails in a Graph ... - Algorithm Wiki
    Apr 28, 2023 · Fleury's algorithm + Tarjan, 1974, O ( E 2 ), O ( E ), Exact ... Time Complexity Graph. Constructing Eulerian Trails in a Graph - Time ...
  23. [23]
    [PDF] Math 160, Chapter 5, Graphs, Euler Circuits Definition 1.1. a) A ...
    Fleury's Algorithm for constructing an Euler path. 1. First identify the two vertices of odd degree, say A and B. 2. Start at A. 3.
  24. [24]
    Ueber die Möglichkeit, einen Linienzug ohne Wiederholung und ...
    Ueber die Möglichkeit, einen Linienzug ohne Wiederholung und ohne Unterbrechung zu umfahren ... Article PDF. Download to read the full article text. Use our pre ...
  25. [25]
    The Complexity of Counting Eulerian Tours in 4-regular Graphs
    Oct 22, 2010 · We prove that #ET is #P-complete even for planar 4-regular graphs. A closely related problem is that of counting A-trails (#A-trails) in graphs ...
  26. [26]
    [PDF] BEST Theorem - Graduate School of Mathematics, Nagoya University
    Jun 5, 2024 · The theorem offers a formula to determine the number of Eulerian tours in Eulerian graphs. It is rooted in an extension of Kirchhoff's matrix- ...
  27. [27]
    Surprising algorithms for counting problems
    May 4, 2011 · Also, the BEST Theorem gives a polynomial time algorithm for counting the number of Eulerian circuits in a directed graph, though part of ...<|control11|><|separator|>
  28. [28]
    [PDF] Counting the Number of Eulerian Orientations
    Mar 16, 2011 · The problem of counting Eulerian circuits is #P-complete [6]. So we desire a ( , δ)-approximation scheme. Unlike the Eulerian orientation ...
  29. [29]
    [PDF] Counting Euler Tours in Undirected Bounded Treewidth Graphs
    This gives a simple algorithm to check if a graph is Eulerian. An equally natural question is to ask for the number of distinct Euler tours in a graph. For the ...
  30. [30]
  31. [31]
    [PDF] Circuits and trees in oriented linear graphs - Pure
    Citation for published version (APA):. Aardenne-Ehrenfest, van, T., & Bruijn, de, N. G. (1951). Circuits and trees in oriented linear graphs. Simon. Stevin ...Missing: paths compound
  32. [32]
    [PDF] Counting the Number of Euler Circuits in Complete Graphs - Algana
    The calculated number of Euler circuits in Kn for values n = 1, 3, 5, 7 and 9, given by expression. (22). These are identical to the values in the table of ...
  33. [33]
    Exact counting of Euler tours for generalized series-parallel graphs
    We give a simple polynomial-time algorithm to exactly count the number of Euler tours (ETs) of any Eulerian generalized series-parallel graph.<|control11|><|separator|>
  34. [34]
    [PDF] Euler paths and ends in automatic and recursive graphs
    An Euler path of an infinite undirected graph G is an infinite path [v1,v2,...] in G that passes every edge of G exactly once, i.e., the mapping i 7→ {vi,vi+1} ...Missing: Veblen | Show results with:Veblen
  35. [35]
    [2305.17998] Infinite Eulerian paths are computable on graphs with ...
    May 29, 2023 · In this article we prove an effective version of the Erdős, Grünwald, and Weiszfeld theorem for a class of graphs where vertices of infinite degree are allowed.
  36. [36]
    INFINITE EULER GRAPHS
    It will be shown below (Theorem (2.2)) that every Euler graph is a strongly homomorphic image of a locally finite Euler graph. Thus the failure of Veblen's.
  37. [37]
    [PDF] Formulations and Algorithms for Network Design Problems with ...
    As a result, an Eulerian graph is 2-edge connected. Page 37. 2.2 Heuristics ... Proof: Suppose not. Note that each node in the digraph must have an ...<|control11|><|separator|>
  38. [38]
    [PDF] EULER'S THEOREM 1 - • If a graph has any vertices of odd degree ...
    Fleury's Algorithm shows us how to find Euler. Circuits and Euler Paths, but only on graphs where all vertices are of even degree, or if there are only two ...
  39. [39]
    Fleury's algorithm - PlanetMath
    Mar 22, 2013 · From that vertex pick an edge to traverse, considering following rule: never cross a bridge of the reduced graph unless there is no other choice.
  40. [40]
    Arc Routing Problems, Part I: The Chinese Postman Problem
    In the first of a two-part survey, the Chinese postman problem (CPP) is considered. The main algorithmic results for the CPP are reviewed in five main sections: ...
  41. [41]
    [PDF] Matching, Euler tours and the Chinese postman
    Thus, whenever every node of a connected graph is inci- dent to an even number of edges, the Chinese postman problem reduces to simply finding an Euler tour, ...
  42. [42]
    Snowplow Route Optimization Using Chinese Postman Problem ...
    The goal of this study is to generate optimal routes for snowplowing that can reduce travel distance and improve efficiency by considering operational ...
  43. [43]
    Optimal control of plotting and drilling machines: A case study
    Aug 7, 2025 · Over the recent decades, it has been extended to a wide range of real-world applications including vehicle routing [2], drilling circuit boards ...
  44. [44]
    Why are de Bruijn graphs useful for genome assembly? - PMC - NIH
    A straightforward method for assembling reads into longer contiguous sequences—and the one used for assembling the human genome in 2001 as well as for all other ...
  45. [45]
    An Eulerian path approach to DNA fragment assembly - PMC - NIH
    This paper suggests an approach to the fragment assembly problem based on the notion of the de Bruijn graph. In an informal way, one can visualize the ...
  46. [46]
    SPAdes: A New Genome Assembly Algorithm and Its Applications to ...
    When Idury and Waterman (1995) introduced de Bruijn graphs for fragment assembly, many viewed this approach as impractical due to high error rates in Sanger ...Missing: tolerant | Show results with:tolerant
  47. [47]
    Amino acid based de Bruijn graph algorithm for identifying complete ...
    Jan 18, 2019 · Here we present a protein assembler (MetaPA), based on de Bruijn graph searching on oligopeptide spaces and can be applied on both metagenomic and ...
  48. [48]
    Applications of de Bruijn graphs in microbiome research
    Mar 1, 2022 · The assembly of longer sequences is then done by finding an Eulerian cycle in the graph, a path that visits each edge (representing a k-mer) in ...Gene-Targeted Assembly · Comparison Of Omics Samples... · Querying Omics Data Sets And...<|control11|><|separator|>