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)$。该算法也可作为固定参数可处理算法,用于计算层级为$\ell$的系统发育网络(一种用于描述物种间进化关系的DAG),其复杂度为$O(2^{4 \ell - 1} \cdot \ell \cdot n + n^2)$。我们的算法在实践中表现良好,能在500秒内计算出具有30个网状结构和100个叶节点的合成网络的扫描宽度。此外,我们提出了一种启发式方法,在这些网络上实现了平均1.5的实际近似比。虽然我们证明了扫描宽度的下界由其底层无向图的树宽所限定,但实验表明在网络实践中这两个参数值较为接近。