To measure the tree-likeness of a directed acyclic graph (DAG), a new width parameter that considers the directions of the arcs was recently introduced: scanwidth. We present the first algorithm that efficiently computes the exact scanwidth of general DAGs. For DAGs with one root and scanwidth $k$ it runs in $O(k \cdot n^k \cdot m)$ time. The algorithm also functions as an FPT algorithm with complexity $O(2^{4 \ell - 1} \cdot \ell \cdot n + n^2)$ for phylogenetic networks of level-$\ell$, a type of DAG used to depict evolutionary relationships among species. Our algorithm performs well in practice, being able to compute the scanwidth of synthetic networks up to 30 reticulations and 100 leaves within 500 seconds. Furthermore, we propose a heuristic that obtains an average practical approximation ratio of 1.5 on these networks. While we prove that the scanwidth is bounded from below by the treewidth of the underlying undirected graph, experiments suggest that for networks the parameters are close in practice.
翻译:为了衡量有向无环图(DAG)的树状程度,近期引入了一种考虑弧方向的新宽度参数:扫描宽度。我们提出了首个能够高效计算一般DAG精确扫描宽度的算法。对于具有一个根节点且扫描宽度为$k$的DAG,该算法的时间复杂度为$O(k \cdot n^k \cdot m)$。该算法亦可作为固定参数易处理(FPT)算法运行,对于$\ell$级系统发育网络(一种用于描绘物种间进化关系的DAG),复杂度为$O(2^{4 \ell - 1} \cdot \ell \cdot n + n^2)$。我们的算法在实践中表现良好,能够在500秒内计算包含30个网状节点和100个叶节点的合成网络的扫描宽度。此外,我们提出了一种启发式算法,在这些网络上获得了平均实际近似比为1.5的效果。虽然我们证明了扫描宽度受底层无向图树宽的下界约束,但实验表明,对于网络而言,这两个参数在实践中非常接近。