Journal of Computational Geometry (Apr 2016)
Finding shortest non-trivial cycles in directed graphs on surfaces
Abstract
Let $D$ be a weighted directed graph cellularly embedded in a surface of genus $g$, orientable or not, possibly with boundary. We describe algorithms to compute shortest non-contractible and shortest surface non-separating cycles in $D$, generalizing previous results that dealt with undirected graphs.Our first algorithm computes such cycles in $O(n^2\log n)$ time, where $n$ is the total number of vertices and edges of $D$, thus matching the complexity of the best general algorithm in the undirected case. It revisits and extends Thomassen's 3-path condition; the technique applies to other families of cycles as well.We also provide more efficient algorithms in special cases, such as graphs with small genus or bounded treewidth, using a divide-and-conquer technique that simplifies the graph while preserving the topological properties of its cycles. Finally, we give an efficient output-sensitive algorithm, whose running time depends on the length of the shortest non-contractible or non-separating cycle.