Two routes through the same graph can look alike and be different problems entirely. One asks whether every connection can be used exactly once; the other, whether every place can be visited exactly once. Treating them as two names for touring a graph leads to the wrong method: a quick test applied where none exists, or a long search attempted where a count would have settled the question in seconds.
An Euler trail uses every edge exactly once; an Euler circuit is an Euler trail that ends where it started. A Hamilton path visits every vertex exactly once, and a Hamilton cycle returns to its start having visited every other vertex exactly once. Euler is about edges, Hamilton about vertices. A graph can have either property, both, or neither.
The Euler question is settled by degrees
For Euler routes, the deciding facts are the degrees of the vertices — the number of edges meeting at each — and whether the graph is connected in its edges. The theorem is unusually clean. A connected graph has an Euler circuit if and only if every vertex has even degree. It has an Euler trail that is not a circuit if and only if exactly two vertices have odd degree, and then every such trail must start at one odd vertex and end at the other. Any other odd-degree count, or a graph disconnected in its edges, and no Euler trail exists.
Take a square with one diagonal. Its corners have degrees 3, 2, 3, and 2 — exactly two odd — so an Euler trail exists, from one degree-3 corner to the other, and no Euler circuit does. The degrees rule the circuit out, rule the trail in, and fix where it must begin and end. The bridges of Königsberg, the subject's founding problem, model as a graph with four vertices of degrees 3, 3, 3, and 1 — four odd — so no route crosses every bridge exactly once. Trying could never settle that, because a failed attempt does not prove the next would fail. One degree count settles it.
The Hamilton question has no degree test
Hamiltonicity offers no equivalent shortcut. No degree count, and no comparably simple condition, decides in general whether a graph has a Hamilton path or cycle; deciding it is computationally hard. On small graphs the honest work is construction and checking: exhibit a proposed cycle and verify, vertex by vertex, that it visits each one exactly once before returning, or show clearly why it fails. An edge route is constrained locally, at each vertex, by how it enters and leaves; a vertex route is constrained globally, since an early choice can strand a later vertex even when every degree looks adequate.
One small graph separates the families. Take vertices p, q, r, and s, with edges pq, qr, rs, and pr — a path of three edges with a chord. The degrees are p 2, q 2, r 3, and s 1: exactly two odd, so an Euler trail exists, from r to s. But no Hamilton cycle exists, because s has degree 1 and any cycle through s would need two distinct edges at s. Two families, two verdicts, one graph. A plain 4-cycle shows the opposite combination: all degrees 2, so it has an Euler circuit — itself — and it is also a Hamilton cycle. A star with a center joined to three leaves has degrees 3, 1, 1, and 1, four odd, so no Euler trail, and no tree has a Hamilton cycle, because a tree contains no cycles.
Coloring: what must differ from what
The concept turns from routes to conflicts. Graph coloring assigns colors to vertices so that adjacent vertices always differ. The colors rarely matter; separation does — examination slots for courses sharing students, frequencies for interfering transmitters, registers for variables live at the same time. An edge records a conflict; a proper coloring violates none.
The smallest number of colors that suffices for a graph G is its chromatic number, χ(G). A cycle needs 2 colors if its length is even and 3 if odd, because on an odd cycle alternation works around until the closing edge joins two vertices it made the same. A complete graph on n vertices needs n. A graph colorable with 2 colors is bipartite, and a graph is bipartite if and only if it contains no odd cycle — why the parity of layers in a breadth-first search tests bipartiteness.
A coloring claim is proved in two parts. An explicit coloring proves a number of colors is enough: here is the assignment, check the edges. A lower bound is proved by a structure that forces it — a clique, or an odd cycle. The greedy method, coloring vertices in some order with the smallest color unused by their colored neighbors, never uses more than Δ + 1 colors, where Δ is the maximum degree. Every planar graph can be colored with four colors — a fact stated here, its proof far beyond this course — and map coloring is its best-known face.
Connectivity: what survives a failure
Finally, connectivity measures robustness. An edge whose removal disconnects a graph is a bridge; every tree edge is one. A vertex whose removal disconnects it is a cut vertex. A graph with no bridges and no cut vertices stays connected after any single failure — the design property real networks pay for.
The discipline is to ask the deciding question for the family in front of you. For routes: what are the degrees, exactly, and is the graph connected? For conflicts: what must differ from what, what lower bound can be exhibited, and what coloring can be shown?
Experience it, don’t just read about it
An Euler trail uses every edge once while a Hamilton cycle visits every vertex once, and only the Euler question is settled by a degree count is Concept 16 of Discrete Mathematics: The Computer Scientist's Toolkit (Course No. 457), from Cognosco Learning, a learning company powered by AI. The course builds discrete mathematics for computing beyond this distinction — Graphs and Degrees — Networks as Mathematics, Trees and Traversals — Hierarchies and Systematic Visits, and Counting Basics — Sum, Product, Permutations, and Combinations — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.
Navigate your own course.
© 2026 Cognosco Learning. All rights reserved.