Polymorphic dynamic programming by algebraic shortcut fusion

被引:0
|
作者
Little, Max A. [1 ]
He, Xi [1 ]
Kayas, Ugur [1 ]
机构
[1] Univ Birmingham, Comp Sci, Birmingham, W Midlands, England
关键词
Dynamic programming; combinatorial optimisation; shortcut fusion; semiring;
D O I
10.1145/3664828
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Dynamic programming (DP) is a broadly applicable algorithmic design paradigm for the efficient, exact solution of otherwise intractable, combinatorial problems. However, the design of such algorithms is often presented informally in an ad-hoc manner. It is sometimes difficult to justify the correctness of these DP algorithms. To address this issue, this article presents a rigorous algebraic formalism for systematically deriving DP algorithms, based on semiring polymorphism. We start with a specification, construct a ( brute-force) 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, primarily 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 and through semiring lifting, show how these constraints can also be fused with the derived algorithm. This article furthermore demonstrates how existing DP algorithms for a given combinatorial problem can be abstracted from their original context and re-purposed to solve other combinatorial problems. This approach can be applied to the full scope of combinatorial problems expressible in terms of semirings. This includes, for example: optimisation, optimal probability and Viterbi decoding, probabilistic marginalization, logical inference, fuzzy sets, differentiable softmax, and relational and provenance queries. The approach, building on many ideas from the existing literature on constructive algorithmics, exploits generic properties of (semiring) polymorphic functions, tupling and formal sums (lifting), 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.
引用
下载
收藏
页数:32
相关论文
共 50 条
  • [1] Pareto optimization in algebraic dynamic programming
    Cédric Saule
    Robert Giegerich
    Algorithms for Molecular Biology, 10
  • [2] Pareto optimization in algebraic dynamic programming
    Saule, Cedric
    Giegerich, Robert
    ALGORITHMS FOR MOLECULAR BIOLOGY, 2015, 10
  • [3] GPU Parallelization of Algebraic Dynamic Programming
    Steflen, Peter
    Giegerich, Robert
    Giraud, Mathieu
    PARALLEL PROCESSING AND APPLIED MATHEMATICS, PART II, 2010, 6068 : 290 - +
  • [4] Dynamic typing for distributed programming in polymorphic languages
    Duggan, D
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1999, 21 (01): : 11 - 45
  • [5] Implementing algebraic dynamic programming in the functional and the imperative programming paradigm
    Giegerich, R
    Steffen, P
    MATHEMATICS OF PROGRAM CONSTRUCTION, 2002, 2386 : 1 - 20
  • [6] A general framework for lazy functional logic programming with algebraic polymorphic types
    Arenas-Sánchez, P
    Rodríguez-Artalejo, M
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2001, 1 : 185 - 245
  • [7] A lazy narrowing calculus for functional logic programming with algebraic polymorphic types
    ArenasSanchez, P
    RodriguezArtalejo, M
    LOGIC PROGRAMMING - PROCEEDINGS OF THE 1997 INTERNATIONAL SYMPOSIUM, 1997, : 53 - 67
  • [9] Algebraic Dynamic Programming over general data structures
    Siederdissen, Christian Hoener Zu
    Prohaska, Sonja J.
    Stadler, Peter F.
    BMC BIOINFORMATICS, 2015, 16
  • [10] DYNAMIC-PROGRAMMING AS GRAPH SEARCHING - AN ALGEBRAIC APPROACH
    GNESI, S
    MONTANARI, U
    MARTELLI, A
    JOURNAL OF THE ACM, 1981, 28 (04) : 737 - 751