论文标题
自动化稀疏定理:合成有效的动态编程算法
Automating Thinning Theorem: Synthesizing Efficient Dynamic Programming Algorithms
论文作者
论文摘要
动态编程是一项重要的优化技术,但是对于专业程序员来说,设计有效的动态编程算法也很难。 Thinning是一种用于系统地得出有效的动态编程算法的技术,由于其对大量问题的有效性,因此在研究中引起了很多关注。尽管从理论上讲取得了成功,但其实际用法仍然受到限制,因为(1)应用稀疏需要数学和算法背景,并且(2)仅应用稀疏可能不足以生成像人类专家提出的那样有效的算法。 在本文中,我们提出了两种方法,即甲基和甲基+,以解决这两个问题。首先,甲基通过程序合成自动化稀疏的应用,从而消除了用户施加稀疏的负担。其次,甲基+将三个规则整合到甲基中,该规则在动态编程算法的时间复杂性上优化了三个重要因素,这些因素被稀疏忽略,从而使其能够自动在许多任务上生成专家级的动态编程算法。 我们评估了37项与16个优化问题有关的方法,从算法介绍(一本流行的算法课程教科书)中收集的16个任务。结果表明,甲基+实现了97.3%的任务的指数加速,平均时间成本少于一分钟。此外,甲基+生成的算法与人类专家在70.3%的任务中提供的参考计划一样有效。
Dynamic programming is an important optimization technique, but designing efficient dynamic programming algorithms can be difficult for even professional programmers. Thinning, a technique developed for systematically deriving efficient dynamic programming algorithms, has received much attention in studies because of its effectiveness for a large class of problems. Despite the success of thinning in theory, its practical usage is still limited because (1) applying thinning requires mathematical and algorithmic background, and (2) applying thinning solely may not be enough to generate algorithms as efficient as proposed by human experts. In this paper, we propose two approaches, MetHyl and MetHyl+, to resolve both problems. First, MetHyl automates the application of thinning via program synthesis and thus eliminates the burden to the user for applying thinning. Second, MetHyl+ integrates three rules into MetHyl that optimize three important factors on the time complexity of dynamic programming algorithms that are ignored by thinning, and thus make it able to automatically generate expert-level dynamic programming algorithms on many tasks. We evaluate our approaches on 37 tasks related to 16 optimization problems collected from Introduction to Algorithm, a popular textbook for algorithm courses. The results show that MetHyl+ achieves exponential speed-ups on 97.3% of tasks with an average time cost of less than one minute. Moreover, MetHyl+ generates algorithms that are as efficient as the reference programs provided by human experts on 70.3% of tasks.