Eulerian Path & Circuit Checker

every edge exactly once

CalculatorsFreeNo Signup
4.5(870 reviews)
All Tools

Loading tool...

About Eulerian Path & Circuit Checker

An Eulerian path/circuit checker using Euler's theorem: circuit exists iff connected and all degrees even. Path exists iff connected and exactly 0 or 2 odd-degree vertices. Hierholzer's algorithm constructs in O(m). Client-side.

Eulerian Path & Circuit Checker Features

  • Euler path?
  • Euler circuit?
  • Odd degrees
  • Hierholzer
  • Königsberg
Euler (1736): Seven Bridges of Königsberg. Eulerian circuit: traverse every edge once, return to start. Exists iff connected and all degrees even. Eulerian path: traverse every edge once. Exists iff connected and 0 or 2 odd-degree vertices.

How to Use

Select graph:

  • Circuit: All even degrees
  • Path: 0 or 2 odd
  • Neither: >2 odd

Seven Bridges

Euler (1736) proved the Königsberg bridge problem has no solution: the graph has 4 odd-degree vertices, so no Eulerian path exists. This founded graph theory! The first theorem in the field.

Hierholzer's Algorithm

Find Eulerian circuit in O(m): (1) Start at any vertex, follow edges until returning. (2) If unused edges remain at a visited vertex, start a new circuit there. (3) Splice circuits together. Efficient and elegant.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Count odd degrees.
  3. 3Classify Euler.
  4. 4Find path/circuit.
  5. 5Verify traversal.

Eulerian Path & Circuit Checker — Frequently Asked Questions

What's the difference from Hamiltonian?+

Eulerian: every EDGE once. Hamiltonian: every VERTEX once. Eulerian is easy (polynomial) to check and find. Hamiltonian is NP-complete. Despite similar-sounding definitions, they have vastly different computational complexity.

How is the Chinese Postman related?+

Chinese Postman Problem: traverse every edge at least once with minimum total weight. If Eulerian circuit exists, that's optimal. Otherwise, duplicate edges to make all degrees even. Polynomial-time solvable.

Do directed graphs have Euler paths?+

Yes! Directed Eulerian circuit: every vertex has in-degree = out-degree, and graph is strongly connected. Directed Eulerian path: at most one vertex with out-in=1, at most one with in-out=1. Also polynomial.

Share this tool: