We present a first algorithm for finding Euler tours in undirected graphs in the StrSort model. This model is a relaxation of the semi streaming model. The graph is given as a stream of its edges and can only be read sequentially, but while doing a pass over the stream we are allowed to write out another stream which will be the input for the next pass. In addition, items in the stream are sorted between passes. This model was introduced by Aggarwal et al. in 2004. Here we apply this model to the problem of finding an Euler tour in a graph (or to decide that the graph does not admit an Euler tour). The algorithm works in two steps. In the first step, a single pass is conducted while a linear (in the number of vertices $n$) amount of RAM is required. In the second step, $\mathcal O(\log(n))$ passes are conducted while only $\mathcal O(\log(n))$ RAM is required.
We use an alteration of the algorithm of Atallah and Vishkin from 1984 for finding Euler tours in parallel. It finds a partition of edge-disjoint circuits and arranges them in a tree expressing their connectivity. Then the circuits are merged according to this tree. In order to minimize the needed amount of RAM, we evade the need to store the entire tree and use techniques suggested by Aggarwal et al. to exchange information concerning the merging of circuits.
[1]
Matthias Ruhl,et al.
Efficient algorithms for new computational models
,
2003
.
[2]
Edward F. Grove,et al.
External-memory graph algorithms
,
1995,
SODA '95.
[3]
Mayur Datar,et al.
On the streaming model augmented with a sorting primitive
,
2004,
45th Annual IEEE Symposium on Foundations of Computer Science.
[4]
Jayme Luiz Szwarcfiter,et al.
On Finding Euler Tours in Parallel
,
1993,
Parallel Process. Lett..
[5]
Sartaj Sahni,et al.
Handbook Of Data Structures And Applications (Chapman & Hall/Crc Computer and Information Science Series.)
,
2004
.
[6]
Sartaj Sahni,et al.
Handbook of Data Structures and Applications
,
2004
.
[7]
Camil Demetrescu,et al.
Adapting parallel algorithms to the W-Stream model, with applications to graph problems
,
2007,
Theor. Comput. Sci..
[8]
Camil Demetrescu,et al.
Trading off space for passes in graph streaming problems
,
2009,
SODA '06.