Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time complexity of Fleury's Algorithm

Could you please help me find out the time complexity of the Fleury' algorithm (which is used to get the Eulerian circuit)?

like image 650
Kevin Avatar asked Mar 09 '10 00:03

Kevin


People also ask

What is Fleury's Algorithm?

Fleury's Algorithm is used to display the Euler path or Euler circuit from a given graph. In this algorithm, starting from one edge, it tries to move other adjacent vertices by removing the previous vertices. Using this trick, the graph becomes simpler in each step to find the Euler path or circuit.

How do you use Fleury's Algorithm to find an Euler circuit?

FLEURY'S ALGORITHM If Euler's Theorem indicates the existence of an Euler path or Euler circuit, one can be found using the following procedure: If the graph has exactly two odd vertices choose one of these odd vertices as the starting point of an Euler path. If the graph has no odd vertices it has an Euler circuit.

When using Fleury's Algorithm with a graph that has 0 odd vertices at which vertex must you start?

If there are 0 odd vertices, start anywhere. If there are 2 odd vertices, start at one of them.

How many odd vertices can a graph have in order to use Fleury's Algorithm?

Fleury's Algorithm shows us how to find Euler Circuits and Euler Paths, but only on graphs where all vertices are of even degree, or if there are only two vertices of odd degree.


2 Answers

Fleury's algorithm isn't really complete until you specify how the bridge edges are identified. Tarjan gave a linear-time algorithm for identifying all bridges (see http://en.wikipedia.org/wiki/Bridge_(graph_theory) ), so a naive implementation that reran Tarjan's algorithm after each deleted edge would be O(E^2). There are probably better ways to recompute the set of bridges, but there is also a better O(E) algorithm. (See http://www.algorithmist.com/index.php/Euler_tour#Fleury.27s_algorithm ; not my site :))

like image 82
user287792 Avatar answered Oct 01 '22 22:10

user287792


Here: http://roticv.rantx.com/book/Eulerianpathandcircuit.pdf you can read among other things, that it is O(E), linear edge count.

like image 30
Gabriel Ščerbák Avatar answered Oct 01 '22 23:10

Gabriel Ščerbák