AI 中文总结
该研究提出一种线性时间空间高效算法,可在只读模型下输出无向多重图的欧拉回路,解决了相关未决问题,完善了该领域的研究框架。
AI 中文摘要
我们提出了一种简单的线性时间算法,若存在欧拉回路,可在O(m)时间内、使用O(n)字的工作内存,输出含n个顶点、m条边的无向多重图的欧拉回路。输入以只读邻接表形式给出,输出按遍历顺序写入仅追加流。该算法先寻找稀疏生成回路(骨架),再逐步遍历该回路,反复输出以当前顶点为根的其他回路。此成果解决了Ismaili Alaoui、Plump和Wild(SOSA 2026)留下的未决问题:他们的空间高效Hierholzer算法变体可处理一般有向多重图,但尚不清楚如何将其推广到一般无向多重图。我们的结果完善了只读模型下空间高效输出欧拉回路的相关研究。
英文摘要
We present a simple linear-time algorithm that outputs an Eulerian tour of an undirected multigraph with $n$ vertices and $m$ edges, if one exists, in $O(m)$ time and using $O(n)$ words of working memory. The input is given as read-only adjacency lists, and the output is written to an append-only stream in traversal order. Our algorithm first finds a sparse spanning circuit (a skeleton), then traverses the circuit step-by-step, repeatedly outputting further circuits rooted at the current vertex. This solves a problem left open by Ismaili Alaoui, Plump, and Wild (SOSA 2026): their space-efficient variant of Hierholzer's algorithm handles general directed multigraphs, but it is unclear how to generalize it to general undirected multigraphs. Our result completes the picture in the read-only model for space-efficient output of Eulerian tours.