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 条
  • [31] Dynamic optimization for functional reactive programming using generalized algebraic data types
    Nilsson, H
    ACM SIGPLAN NOTICES, 2005, 40 (09) : 54 - 65
  • [32] Neuro-Dynamic Programming for adaptive fusion complexity control
    Ross, KN
    Chaney, RD
    SENSOR FUSION: ARCHITECTURES, ALGORITHMS, AND APPLICATIONS III, 1999, 3719 : 398 - 409
  • [33] Dynamic Tree Shortcut with Constant Degree
    Chan, T. -H. Hubert
    Wu, Xiaowei
    Zhang, Chenzi
    Zhao, Zhichao
    COMPUTING AND COMBINATORICS, 2015, 9198 : 433 - 444
  • [34] Computing abstract decorations of parse forests using dynamic programming and algebraic power series
    Tendeau, F
    THEORETICAL COMPUTER SCIENCE, 1998, 199 (1-2) : 145 - 166
  • [35] Closing the loop in sensor fusion systems: Stochastic dynamic programming approaches
    Schneider, MK
    Mealy, GL
    Pait, FM
    PROCEEDINGS OF THE 2004 AMERICAN CONTROL CONFERENCE, VOLS 1-6, 2004, : 4752 - 4757
  • [36] Research on Dynamic and Static Fusion Polymorphic Gesture Recognition Algorithm for Interactive Teaching Interface
    Feng, Zhiquan
    Xu, Tao
    Yang, Xiaohui
    Tian, Jinglan
    Yi, Jiangyan
    Zhao, Ke
    COGNITIVE SYSTEMS AND SIGNAL PROCESSING, PT II, 2019, 1006 : 104 - 115
  • [37] Programming with algebraic effects and handlers
    Bauer, Andrej
    Pretnar, Matija
    JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2015, 84 (01) : 108 - 123
  • [38] ALGEBRAIC PROGRAMMING - METHODS AND TOOLS
    KAPITONOVA, YV
    LETICHEVSKII, AA
    CYBERNETICS AND SYSTEMS ANALYSIS, 1993, 29 (03) : 307 - 312
  • [39] The algebraic degree of semidefinite programming
    Nie, Jiawang
    Ranestad, Kristian
    Sturmfels, Bernd
    MATHEMATICAL PROGRAMMING, 2010, 122 (02) : 379 - 405
  • [40] Algebraic processing of programming languages
    Rus, T
    THEORETICAL COMPUTER SCIENCE, 1998, 199 (1-2) : 105 - 143