A graph G is called Eulerian if it is connected and the degree of every vertex is an even number. It is known that such graphs aways have a tour (a cycle that may not be simple) that goes through every edge of the graph exactly once. Such a tour (sometimes called a circuit) is called an Euler tour. If the graph is connected, and it has exactly 2 nodes of odd degree, then it has an Euler Path connecting these two nodes, that includes all the edges of the graph exactly once. In this project, a code that finds an Euler tour or an Euler Path in a given graph is written.
- EulerTrail.java
- Vertex.java
- Edge.java
- Graph.java
- Driver.java
EulerTrail.java contains the implementation of FindEulerTour method. Vertex.java, Edge.java, Graph.java define the structure of Graph. Driver.java is used to run the program.