Algorithmicists are well-aware that fast dynamic programming algorithms are very often the correct choice when computing on compositional (or even recursive) graphs. Here we initiate the study of how to generalize this folklore intuition to mathematical structures writ large. We achieve this horizontal generality by adopting a categorial perspective which allows us to show that: (1) structured decompositions (a recent, abstract generalization of many graph decompositions) define Grothendieck topologies on categories of data (adhesive categories) and that (2) any computational problem which can be represented as a sheaf with respect to these topologies can be decided in linear time on classes of inputs which admit decompositions of bounded width and whose decomposition shapes have bounded feedback vertex number. This immediately leads to algorithms on objects of any C-set category; these include -- to name but a few examples -- structures such as: symmetric graphs, directed graphs, directed multigraphs, hypergraphs, directed hypergraphs, databases, simplicial complexes, circular port graphs and half-edge graphs. Thus we initiate the bridging of tools from sheaf theory, structural graph theory and parameterized complexity theory; we believe this to be a very fruitful approach for a general, algebraic theory of dynamic programming algorithms. Finally we pair our theoretical results with concrete implementations of our main algorithmic contribution in the AlgebraicJulia ecosystem.
翻译:算法研究者深知,在处理组合图(甚至递归图)的计算问题时,快速动态规划算法往往是正确之选。本文旨在系统性地探究如何将这一直觉性原则推广至更广泛的数学结构。通过采用范畴论视角,我们实现了这种横向通用性,并证明:(1)结构化分解(近期提出的多种图分解的抽象泛化)在数据范畴(粘合范畴)上定义了格罗滕迪克拓扑;(2)任何可表示为关于这些拓扑的层的计算问题,在允许有界宽度分解且分解形状具有有界反馈顶点数的输入类上,均可在线性时间内判定。这直接催生了任意C-集范畴对象上的算法——仅举数例,包括对称图、有向图、有向多重图、超图、有向超图、数据库、单纯复形、圆形端口图和半边图等结构。由此,我们开启了层论、结构图论和参数化复杂度理论工具的桥梁搭建工作;我们相信这是构建动态规划算法通用代数理论的一条极具前景的路径。最后,我们在AlgebraicJulia生态系统中将理论成果与主要算法贡献的具体实现相结合。