基于多态半环代数捷径融合的动态规划
Dynamic programming by polymorphic semiring algebraic shortcut fusion
AI总结:
针对动态规划算法设计特设性强、正确性难证明的问题,提出基于半环多态性的严格代数形式体系,通过捷径融合推导高效正确的DP算法,可应用于多类组合问题并已实现Python工具。
摘要:
动态规划(DP)是一种用于高效精确求解原本难以处理的组合问题的算法设计范式。然而,DP算法设计通常以特设方式呈现,有时难以证明算法的正确性。为解决这一问题,本文提出了一种基于半环多态性的严格代数形式体系,用于系统推导DP算法。我们从一个规范出发,构建一种计算所需解的算法,该算法的正确性是不证自明的,因为它穷举生成并评估了所有满足该规范的可能解。随后,我们通过捷径融合推导出该算法的一种既高效又正确的实现。我们还展示了如何借助半环提升,用组合约束增强规范,并说明这些约束如何能与算法融合。此外,我们还演示了如何将针对给定组合问题的现有DP算法从其原始语境中抽象出来并重新利用。\n该方法可应用于所有能用半环表示的组合问题。例如,这包括:最优概率与Viterbi解码、概率边缘化、逻辑推理、模糊集、可微softmax、关系查询与溯源查询。该方法借鉴了现有构造算法学文献中的思想,利用了多态函数、元组化、形式和的通用性质,以及由约束代数产生的代数简化。我们通过信号处理、生物信息学和可靠性工程中的一些示例应用,证明了该形式体系的有效性。实现这些算法的Python软件可从以下网址下载:http://www.maxlittle.net/software/dppolyalg.zip。
英文摘要:
Dynamic programming (DP) is an algorithmic design paradigm for the efficient, exact solution of otherwise intractable, combinatorial problems. However, DP algorithm design is often presented in an ad-hoc manner. It is sometimes difficult to justify algorithm correctness. To address this issue, this paper presents a rigorous algebraic formalism for systematically deriving DP algorithms, based on semiring polymorphism. We start with a specification, construct an algorithm to compute the required solution which is self-evidently correct because it exhaustively generates and evaluates all possible solutions meeting the specification. We then derive, through the use of shortcut fusion, an implementation of this algorithm which is both efficient and correct. We also demonstrate how, with the use of semiring lifting, the specification can be augmented with combinatorial constraints, showing how these constraints can be fused with the algorithm. We furthermore demonstrate how existing DP algorithms for a given combinatorial problem can be abstracted from their original context and re-purposed. This approach can be applied to the full scope of combinatorial problems expressible in terms of semirings. This includes, for example: optimal probability and Viterbi decoding, probabilistic marginalization, logical inference, fuzzy sets, differentiable softmax, relational and provenance queries. The approach, building on ideas from the existing literature on constructive algorithmics, exploits generic properties of polymorphic functions, tupling and formal sums and algebraic simplifications arising from constraint algebras. We demonstrate the effectiveness of this formalism for some example applications arising in signal processing, bioinformatics and reliability engineering. Python software implementing these algorithms can be downloaded from: http://www.maxlittle.net/software/dppolyalg.zip.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。