Title: Parallel construction of Euler Cycle
1Parallel construction of Euler Cycle
An Euler cycle in a graph is a cyclic path which
traverses each edge of the graph exactly once
2Euler cycle in a directed graph
- Given graph G
- Find an Euler cycle of G
- (1) Creation of a set of edge disjoint cycles
- (2) Creation of a special biconncetd graph B
between cycles and nodes of G - (3) Parallel construction of a spanning tree T
for the graph B - (4) Construction an Euler tour C of a tree T by
replacing each edge of T by two directed
antiparallel edges - (5) Converting the cycle C into an Euler cycle
of G
3Graph G
4Step 1 Creation of a set of edge disjoint cycles
5Step 2 Creating an auxiliary graph G, nodes of
G are edge-disjoint cycles of G, and vertices of
G. Each cycle is connected to vertices which lie
on it
For our example A PART of the graph G looks as
follows
Step 3 Parallel construction of a spanning tree
T for the graph B
6Step 4 Construction an Euler tour C of a tree T
by replacing each edge of T by two directed
antiparallel edges
7Step 5 Converting the cycle C into an Euler
cycle of G
8Euler paths on arbitrary graphs
9- Euler paths on arbitrary graphs
- Complexity O(log(n))
- Sort using p processors O(log n)
- with p gt n
10Euler paths on arbitrary graphs
11Euler paths on arbitrary graphs
// input n num-nodes, m num edges // output
D each edge labeled with representative // of
each cycle // note succin(v,k)
out(k,v) par_for x 1 ... m Dex
ex // every edge is a potential
cycle-representative nextex
succex // scratch space for contraction for k
1 ... ceil(log(n)) par_for x 1 ... m
Dex min(Dex, Dnextex)
nextex nextnextex
12(No Transcript)