Cycle without using edges twice

# Computing Eulerian cycles

Being a postman, you would like to know the best route to distribute your letters without visiting a street twice? This problem of finding a cycle that visits every edge of a graph only once is called the Eulerian cycle problem. It is named after the mathematician Leonhard Euler, who solved the famous Seven Bridges of Königsberg problem in 1736.

## Legend

 Node Undirected edge

## Which graph do you want to execute the algorithm on?

### Modify it to your desire:

• To create a node, make a double-click in the drawing area.
• To create an edge, first click on the output node and then click on the destination node.
• Right-clicking deletes edges and nodes.

A occured when reading from file: the contents:

## Legend

 Node Undirected edge

## Algorithm status

### Hierholzer's algorithm

Click on nextto start the algorithm.

BEGIN

IF graph infeasible THEN END

start ← suitable node

tour ← {start}

REPEAT

current = start ← node in tour with
unvisited edge

subtour ← {start}

DO

{current, u} ← take unvisited edge

subtour ← subtour ∪ {u}

current ← u

WHILE start ≠ current

Integrate subtour in tour

UNTIL tour is Eulerian path/cycle

END

### Variable status:

start current subtour tour
- -

## If you switch tabs, the execution will be terminated.

You can open another browser window to read the description in parallel.