Safety in $s$-$t$ Paths, Trails and Walks
Abstract
Given a directed graph and a pair of nodes and , an \emph{- bridge} of is an edge whose removal breaks all - paths of (and thus appears in all - paths). Computing all - bridges of is a basic graph problem, solvable in linear time. In this paper, we consider a natural generalisation of this problem, with the notion of "safety" from bioinformatics. We say that a walk is \emph{safe} with respect to a set of - walks, if is a subwalk of all walks in . We start by considering the maximal safe walks when consists of: all - paths, all - trails, or all - walks of . We show that the first two problems are immediate linear-time generalisations of finding all - bridges, while the third problem is more involved. In particular, we show that there exists a compact representation computable in linear time, that allows outputting all maximal safe walks in time linear in their length. We further generalise these problems, by assuming that safety is defined only with respect to a subset of \emph{visible} edges. Here we prove a dichotomy between the - paths and - trails cases, and the - walks case: the former two are NP-hard, while the latter is solvable with the same complexity as when all edges are visible. We also show that the same complexity results hold for the analogous generalisations of \emph{- articulation points} (nodes appearing in all - paths). We thus obtain the best possible results for natural "safety"-generalisations of these two fundamental graph problems. Moreover, our algorithms are simple and do not employ any complex data structures, making them ideal for use in practice.
Cite
@article{arxiv.2007.04726,
title = {Safety in $s$-$t$ Paths, Trails and Walks},
author = {Massimo Cairo and Shahbaz Khan and Romeo Rizzi and Sebastian Schmidt and Alexandru I. Tomescu},
journal= {arXiv preprint arXiv:2007.04726},
year = {2021}
}