Interactive laboratory · ES / EN
The bridges of Königsberg
A bilingual lab for experimenting with bridges, vertex degrees and Eulerian trails.
Cross each bridge exactly once
Study guide
A city, a mathematical idea.
Euler’s criterion
In an undirected graph, all non-isolated vertices must belong to the same connected component. Under that condition, an Eulerian circuit exists when all degrees are even, and an open Eulerian trail exists when exactly two vertices have odd degree. Original Königsberg has four odd-degree vertices: no trail can use every bridge exactly once.
Eulerian trails and Hamiltonian paths
An Eulerian trail uses each edge exactly once and may revisit vertices. A Hamiltonian path visits each vertex exactly once. They are different problems. Here we work with edges, and parallel bridges remain distinct edges.
How the solution is constructed
The automatic solver checks connectivity and parity, then uses Hierholzer’s algorithm to construct the trail. It does not add bridges during the search: it only uses the edges in the selected scenario.