Recursion Schemes for Dynamic Programming
Dynamic programming is an algorithm design technique, which allows to improve efficiency by avoiding re-computation of identical subtasks. We present a new recursion combinator, dynamorphism, which captures the dynamic programming recursion pattern with memoization and identify some simple conditions when functions defined by structured general recursion can be redefined as a dynamorphism. The applicability of the new recursion combinator is demonstrated on classical dynamic programming algorithms: Fibonacci numbers, binary partitions, edit distance and longest common subsequence.
KeywordsNatural Transformation Edit Distance Intermediate Structure Fibonacci Number Recursion Scheme
Unable to display preview. Download preview PDF.
- 2.Bird, R.S.: An introduction to the theory of lists. In: Broy, M. (ed.) Logic of Programming and Calculi of Discrete Design. NATO ASI Series F, vol. 36, pp. 3–42. Springer, Berlin (1987)Google Scholar
- 5.Fokkinga, M.: Law and Order in Algorithmics. PhD thesis. Dept. of Informatics, Univ. of Twente (1992)Google Scholar
- 7.Hagino, T.: A Categorical Programming Language. PhD thesis CST-47-87. Laboratory for Foundations of Computer Science, Dept. of Computer Science, Univ. of Edinburgh (1987)Google Scholar
- 9.Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991)Google Scholar
- 12.Vene, V.: Categorical Programming with Inductive and Coinductive Types. PhD thesis. vol. 23 of Diss. Math. Univ. Tartuensis. Dept. of Computer Science, Univ. of Tartu (2000)Google Scholar