Hamiltonian Path Checker — Find a Path That Visits Every Node Exactly Once
Our Hamiltonian Path Checker searches for a path through a graph that visits every node exactly once, trying each possible starting node and backtracking through possible routes, given your graph as a simple text edge list (e.g. A-B, B-C, C-D).
Quick Answer
Enter your graph as an edge list (up to 10 nodes) to instantly search for a Hamiltonian path — a route visiting every node exactly once — via backtracking.
Enter edges as NodeA-NodeB, e.g. A-B, B-C, C-D. Maximum 10 nodes.
How to Use the Hamiltonian Path Checker — Visit Every Node Once Online
- 1
Enter your graph as a comma-separated edge list, e.g. A-B, B-C, C-D.
- 2
Click 'Calculate' to search for a Hamiltonian path.
- 3
Review the path found, or confirmation that none exists.
Why Use Hamiltonian Path Checker — Visit Every Node Once Online?
A Hamiltonian path visits every vertex in a graph exactly once — unlike an Eulerian path, which is about visiting every edge, this is about visiting every node. Determining whether one exists is NP-complete in general, meaning there's no known algorithm dramatically faster than trying out possibilities systematically, so this calculator uses backtracking search: build a path one node at a time, and backtrack whenever a dead end is reached, trying every possible starting node. Because the search space grows factorially with graph size, this calculator is deliberately scoped to at most 10 nodes, where exhaustive backtracking still completes instantly.
Frequently Asked Questions
Related Tools
Traveling Salesman Solver — Exact Held-Karp DP Online
Find the exact shortest round-trip route visiting every city exactly once, using the Held-Karp dynamic programming algorithm. Free calculator, up to 12 cities.
Topological Sort Calculator — Kahn's Algorithm Online
Find a valid topological order for a directed graph using Kahn's algorithm, or detect that no order exists because of a cycle. Free calculator with a simple edge-list input.
Minimum Spanning Tree Calculator — Kruskal's Algorithm Online
Find the minimum spanning tree of a weighted graph using Kruskal's algorithm. Free calculator with a simple edge-list input and union-find cycle detection.