- Related Questions & Answers
- Hamiltonian Graphs
- Eulerian Graphs
- Planar straight line graphs (PSLGs) in Data Structure
- Euler and Hamiltonian Paths
- Eulerian Path and Circuit
- Difference between data type and data structure
- Hamiltonian Cycle
- Rectangle Data in Data Structure
- Huffman Codes and Entropy in Data Structure
- Adaptive Merging and Sorting in Data Structure
- Compressed Quadtrees and Octrees in Data Structure
- Time and Space Complexity in Data Structure
- Prefix and Postfix Expressions in Data Structure
- Halfedge data structure
- Differences between stack and queue data structure

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In this section we will see the Eulerian and Hamiltonian Graphs. But before diving into that, at first we have to see what are trails in graph. Suppose we have one graph like below −

The trail is a path, which is a sequence of edges (v1, v2), (v2, v3), …, (vk - 1, vk) in which all vertices (v1, v2, … , vk) may not be distinct, but all edges are distinct. In this example one trail is {(B, A), (A, C), (C, D), (D, A), (A, F)} This is a trail. But this will not be considered as simple path as vertex A is visited twice. If the first and the last vertices are same, then that will be a closed trail.

The Eulerian Trail in a graph G(V, E) is a trail, that includes every edge exactly once. If G has closed Eulerian Trail, then that graph is called Eulerian Graph. In other words, we can say that a graph G will be Eulerian graph, if starting from one vertex, we can traverse every edge exactly once and return to the starting vertex. Euler proved that a graph is called the Eulerian graph if and only if the degree of its every vertex is even.

One cycle is called as Hamiltonian cycle if it passes through every vertex of the graph G. There are many different theorems that give sufficient conditions for a graph to be Hamiltonian. However, the problem determining if an arbitrary graph is Hamiltonian is NPComplete problem.

Advertisements