# Necessary and sufficient condition for a directed graph be Eulerian circuit and Hamilton cycle

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)

• The graph has a finite set of vertices – franvergara66 Nov 13 '11 at 5:18

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

• a non-edge-reusing walk of maximal length must be a circuit (and thus that such circuits exist), and
• a non-edge-reusing circuit that doesn't use all edges can always be extended, and thus that such a circuit of maximal length must necessarily contain all edges.
• Sorry to nitpick, but doesn't a finite connected digraph always contain at least one edge? (Unless it has a single vertex, in which case it does technically have an Eulerian circuit.) – jwg Aug 22 '14 at 20:37
• @jwg: Hmm, yes. – Henning Makholm Aug 24 '14 at 4:26