I have knowledge of the necessary and sufficient condition for an undirected graph contains a Hamiltonian cycle and an Eulerian circuit, but is there a necessary and sufficient condition for directed graphs?
common sense tells me that the degree of input minus output degree of each vertex must be zero, but do not know if I'm right (this is for the euler circuit)
Best Answer
If you can find Hamiltonian cycles in an undirected graph, you can find them in directed graphs too by replacing each vertex by a linear sequence of three vertices
*---*---*
and connect all incoming edges to one of the end nodes and all the outgoing edges to the other end node. After that you don't need to remember the direction of the edges.For an Eulerian circuit, you need that every vertex has equal indegree and outdegree, and also that the graph is finite and connected and has at least one edge. Then you should be able to show that