当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Easily solving dynamic programming problems in Haskell by memoization of hylomorphisms
Software: Practice and Experience ( IF 3.5 ) Pub Date : 2020-09-17 , DOI: 10.1002/spe.2887
David Llorens 1 , Juan Miguel Vilar 1
Affiliation  

Dynamic programming is a well‐known algorithmic technique that solves problems by a combination of dividing a problem into subproblems and using memoization to avoid an exponential growth of the costs. We show how to implement dynamic programming in Haskell using a variation of hylomorphisms that includes memoization. Our implementation uses polymorphism so the same function can return the best score or the solution to the problem based on the type of the returned value.

中文翻译:

通过记忆hylomorphisms轻松解决Haskell中的动态规划问题

动态规划是一种众所周知的算法技术,它通过将问题分解为子问题并使用记忆化来避免成本的指数增长来解决问题。我们展示了如何使用包含记忆化的 hylomorphisms 的变体在 Haskell 中实现动态编程。我们的实现使用了多态性,因此相同的函数可以根据返回值的类型返回最佳分数或问题的解决方案。
更新日期:2020-09-17
down
wechat
bug