



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Input: Input: A digraph G that is an orientation of a connected graph
A digraph G that is an orientation of a connected graph
and has d and has d
++
(u) = d (u) = d
−−
(u) for all (u) for all
uu
Step1: Step1: Choose a vertex
Choose a vertex
v v
. Let G . Let G
be the digraphbe the digraph
obtained from G by reversing direction on each edge. obtained from G by reversing direction on each edge.
Search G Search G
to construct Tto construct T
consisting of paths from consisting of paths from
v v
to allto all
other vertices. other vertices.
Step2: Step2: Let T be the reversal of T
Let T be the reversal of T
. T contains a . T contains a
u,v u,v-
path in G for path in G for
each each
u u
. Specify an arbitrary ordering of the edges . Specify an arbitrary ordering of the edges
that leave each vertex that leave each vertex
u, u,
except that forexcept that for
u u
v, v,
the edge the edge
leaving leaving
uu
in T must come last. in T must come last.
Step3: Step3: Construct an
Construct an Eulerian
Eulerian circuit from
circuit from
v v
as follows. as follows.
Whenever Whenever
u u
is the current vertex, exit along the next is the current vertex, exit along the next
unused edge in the ordering specified for edges leaving unused edge in the ordering specified for edges leaving
u.u.
Docsity.com