Eulerian Path Calculator

Build intuition by exploring paths on custom networks. Supports multiple edges, loops, and start choices. Export results to share, verify, and learn faster now.

Choose directed for one-way edges.
Matrix uses integer counts for parallel edges.
Leave blank to auto-select when possible.
Comma or space separated labels.
Useful for teaching and verification.
Quick formats
A B
B C
C A
You may also write A->B in edge lists.
Supports loops (A A) and multiple identical lines for parallel edges.

Example data table

Graph Edge list Expected
Undirected A B, B C, C A, C D, D E, E C Eulerian circuit exists (all degrees even).
Undirected A B, B C, C D Eulerian path exists (two odd-degree vertices).
Directed A→B, B→C, C→A Eulerian circuit exists (in = out everywhere).
Directed A→B, B→C, C→B No Euler traversal (degree balance fails).

Formula used

Undirected Euler conditions

  • Ignore isolated vertices; remaining graph must be connected.
  • Eulerian circuit ⇔ every vertex has even degree.
  • Eulerian path ⇔ exactly two vertices have odd degree.
Degree is the count of incident edges; a loop adds 2.

Directed Euler conditions

  • Underlying graph (ignore directions) must be connected on nonzero-degree vertices.
  • Circuit: for every vertex, in(v) = out(v), plus strong connectivity.
  • Path: one start with out = in + 1, one end with in = out + 1.
Traversal is constructed with Hierholzer’s algorithm.

How to use this calculator

  1. Select Undirected or Directed.
  2. Choose Edge list or Adjacency matrix.
  3. Enter your graph. Use repeated lines or counts for parallel edges.
  4. Optionally set a start vertex to force a specific traversal.
  5. Click Compute. The result appears above the form.
  6. Use Download CSV or Download PDF to save the output.

Graph structure insights

Euler analysis starts with counts. In undirected mode, the calculator totals degrees by summing incidences; a loop contributes two. In directed mode, it reports in-degree and out-degree per vertex and the imbalance out−in. These values directly determine whether a traversal can exist. Parallel edges are supported by repeating lines or by using integer entries in the matrix.

Connectivity checks that matter

A graph may satisfy degree rules but still fail because edges live in separate components. The tool ignores isolated vertices and verifies that all nonzero-degree vertices are connected. For directed graphs it first checks underlying connectivity (ignoring direction), then applies a strong-connectivity test on the active subgraph. This matches the standard requirement that every used edge lies in one reachable structure.

Path versus circuit outcomes

When every undirected degree is even, the output is a circuit and the suggested start equals the end. With exactly two odd-degree vertices, it produces a path and recommends starting at one odd vertex and finishing at the other. For directed graphs, the circuit case requires in(v)=out(v) everywhere, while the path case allows exactly one +1 and one −1 imbalance.

Construction algorithm and scale

After conditions pass, the calculator builds the traversal using Hierholzer’s method. Each edge is used exactly once, so runtime grows roughly with E+V, where E is the number of edges (including parallel edges) and V is the number of vertices. Memory use is proportional to adjacency storage. If the traversal length is not E+1, the tool flags the construction as invalid.

Interpreting the Plotly chart

The degree chart summarizes why a result was “Yes” or “No.” In undirected mode it plots degree values and highlights odd vertices through visible spikes. In directed mode it overlays in and out bars; mismatched bars instantly indicate vertices that violate balance, commonly causing failure.

Practical uses and validation

Euler traversals model efficient routes: street sweeping, inspection cycles, cable testing, and puzzle generation. To validate a custom network, enter edges, compute, then compare the traversal length to E+1 vertices in the step list. Export CSV for audits or generate a PDF report for sharing. For matrix input, ensure the vertex label order matches the row and column order used in your data.

FAQs

1) What is the difference between an Eulerian path and circuit?

An Eulerian path uses every edge exactly once. A circuit is a path that also returns to the starting vertex, so the start and end are the same.

2) Do isolated vertices affect the result?

No. Vertices with degree zero do not participate in any traversal, so the calculator ignores them in connectivity checks and existence rules.

3) How are loops and parallel edges handled?

Loops are allowed; in undirected graphs they add 2 to the vertex degree. Parallel edges are supported by repeating edge lines or by using matrix counts greater than 1.

4) Why can a graph fail even if degrees look correct?

If nonzero-degree vertices split into multiple components, no single traversal can cover all edges. Directed graphs can also fail when the active subgraph is not strongly connected.

5) Can I force a specific start vertex?

Yes. Enter a start vertex to construct a traversal from that node. For an Eulerian path, starting at the recommended start improves the chance the traversal covers every edge.

6) What should the traversal length be?

If an Euler traversal exists and the graph has E edges, the vertex list should contain exactly E+1 vertices. The step table and exports help you verify this quickly.

Related Calculators

graph distance calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.