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生态系统中主要算法贡献的具体实现相结合。