You are on page 1of 4

Eulerian path In graph theory, an Eulerian path is a path in a graph which visits each edge exactly once.

Similarly, an Eulerian circuit is an Eulerian path which starts and ends on the same vertex. They were first discussed by Leonhard Euler while solving the famous Seven Bridges of Königsberg problem in 1736. Mathematically the problem can be stated like this: Given the graph on the right, is it possible to construct a path (or a cycle, i.e. a path starting and ending on the same vertex) which visits each edge exactly once? Graphs which allow the construction of so called Eulerian circuits are called Eulerian graphs. Euler observed that a necessary condition for the existence of Eulerian circuits is that all vertices in the graph have an even degree, and that for an Eulerian path either all, or all but two (i.e., the two endpoint) vertices have an even degree; this means the Königsberg graph is not Eulerian. Sometimes a graph that has an Eulerian path, but not an Eulerian circuit (in other words, it is an open path, and does not start and end at the same vertex) is called semi-Eulerian. Carl Hierholzer published the first complete characterization of Eulerian graphs in 1873, by proving that in fact the Eulerian graphs are exactly the graphs which are connected and where every vertex has an even degree. Definition An Eulerian path, Eulerian trail or Euler walk in an undirected graph is a path that uses each edge exactly once. If such a path exists, the graph is called traversable or semi-eulerian. An Eulerian cycle, Eulerian circuit or Euler tour in an undirected graph is a cycle that uses each edge exactly once. If such a cycle exists, the graph is called Eulerian or unicursal. The cycle starts and ends at the same vertex. For directed graphs path has to be replaced with directed path and cycle with directed cycle. The definition and properties of Eulerian paths, cycles and graphs are valid for multigraphs as well Properties

A connected undirected graph is Eulerian if every graph vertex has an even degree.

A graph that contains a Hamiltonian path is called a traceable graph. Hamilton solved this problem using the Icosian Calculus. vertex tour or graph cycle is a cycle that visits each vertex exactly once (except the vertex which is both the start and end. an algebraic structure based on roots of unity with many similarities to the quaternions (also invented by Hamilton). now also known as Hamilton's puzzle. Determining whether such paths and cycles exist in graphs is the Hamiltonian path problem which is NP-complete. this solution does not generalize to arbitrary graphs. A directed graph is Eulerian if it is connected and can be decomposed into edgedisjoint directed cycles. a Hamiltonian path is a path in an undirected graph which visits each vertex exactly once. An undirected graph is traversable if it is connected and at most two vertices in the graph are of odd degree. Definitions A Hamiltonian path or traceable path is a path that visits each vertex exactly once. Hamiltonian path In the mathematical field of graph theory. and so is visited twice). Similar notions may be defined for directed graphs. A graph that contains a Hamiltonian cycle is called a Hamiltonian graph. Hamiltonian paths and cycles are named after William Rowan Hamilton who invented the Icosian Game. A directed graph is Eulerian if it is connected and every vertex has equal in degree and out degree. Unfortunately.e. If an undirected graph G is Eulerian then its line graph L(G) is Eulerian too. where each edge (arc) of a path or cycle can only be traced in a single direction (i. .. the vertices are connected with arrows and the edges traced "tail-to-head"). A graph is Hamiltonconnected if for every pair of vertices there is a Hamiltonian path between the two vertices.• • • • • An undirected graph is Eulerian if it is connected and can be decomposed into edge-disjoint cycles. A Hamiltonian cycle. Hamiltonian circuit. A Hamiltonian cycle (or Hamiltonian circuit) is a cycle in an undirected graph which visits each vertex exactly once and also returns to the starting vertex. which involves finding a Hamiltonian cycle in the edge graph of the dodecahedron.

The line graph of an Eulerian graph is Hamiltonian. is Hamiltonian Properties Any Hamiltonian cycle can be converted to a Hamiltonian path by removing one of its edges. In what order should he visit them to minimise the distance travelled? . but a Hamiltonian path can be extended to Hamiltonian cycle only if its endpoints are adjacent. considered as a graph. The line graph of a Hamiltonian graph is Hamiltonian. It can be stated very simply: A salesman spends his time visiting n cities (or nodes) cyclically. The Travelling Salesman Problem (TSP) is a deceptively simple combinatorial problem. A Hamiltonian cycle may be used as the basis of a zero-knowledge proof. A tournament (with more than 2 vertices) is Hamiltonian if and only if it is strongly connected. In one tour he visits each city just once. and finishes up where he started.A Hamiltonian decomposition is an edge decomposition of a graph into Hamiltonian circuits Examples • • • • a complete graph with more than two vertices is Hamiltonian every cycle graph is Hamiltonian every tournament has an odd number of Hamiltonian paths every platonic solid.

They are also known to be more or less equivalent to each other. for example. then a thousand-fold increase in computing power will only allow you to add another 10 nodes. since quite a lot of practical applications can be put in this form. say. In either case the number of solutions becomes extremely large for large n. . pick any city as the first .Many TSP's are symmetric . If all links are present then there are (n-1)! different tours for an n city asymmetric TSP. For the symmetric case a 3 city TSP is also trivial. more or less independently of computing power. but you cannot say just how far it is from being optimal. so that an exhaustive search is impractible. So an algorithm that peters out at 50 cites now will probably never get you to 100 nodes. then doubling n multiplies the solution time by 4 for large n. n-2 choices for the third. Alternatively there are algorithms that seem to come up with a good solution quite quickly.that is. however.(n-1)!/2 for an n city TSP. It also has a theoretical importance in complexity theory. since only one tour is possible. for any two cities A and B.so there is no need to distinguish between a tour and its reverse. For the symmetric case there are half as many distinct solutions .then there are n-1 choices for the second city visited. whatever happens to hardware technology. If you could find a method whose solution time varies like a quadratic expression. is to solve it in a time that varies exponentially with n. and you can leave off the arrows on the tour diagram. Such algorithms run out of puff at a certain level of n. since the TSP is one of the class of "NP Complete" combinatorial problems. The problem has some direct importance. NP Complete problems have intractable in the sense that no one has found any really efficient way of solving them for large n. The best that people have been able to do. If computation varies as 2^n. In this case you will get exactly the same tour length if you reverse the order in which they are visited . If there are only 2 cities then the problem is trivial. if you knew how to solve one kind of NP Complete problem you could solve the lot. To see why this is so. and so on. the distance from A to B is the same as that from B to A. The holy grail is to find a solution algorithm that gives an optimal solution in a time that has a polynomial variation with the size n of the problem.