arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1705.00317cs.PL
收藏

递归程序的非多项式最坏情况分析

Non-polynomial Worst-Case Analysis of Recursive Programs

Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady

摘要:

我们研究开发有效方法来证明非确定性递归程序最坏情况界限的问题。秩函数是证明非递归程序的终止性和最坏情况界的可靠而完备的方法。首先,我们将排序函数应用于递归,从而得到度量函数。我们表明,测量功能提供了一个健全的和完整的方法来证明最坏情况下的非确定性递归程序的界限。我们的第二个贡献是合成的非多项式形式的测量功能。我们表明,非多项式的测量函数的对数和指数可以通过抽象的对数或指数项,法卡斯引理,和Handelman定理使用线性规划合成。虽然以前的方法获得最坏情况下的多项式边界,我们的方法可以合成的形式$\mathcal{O}(n\log n)$以及$\mathcal{O}(n^r)$,其中$r$不是一个整数的边界。我们提出的实验结果表明,我们的方法可以有效地获得经典的递归算法,如(i)合并排序,分治算法的最接近对问题,在这里我们获得$\mathcal{O}(n \log n)$最坏情况下的界限,和(ii)Karatsuba的算法多项式乘法和Strassen的算法矩阵乘法的最坏情况下的界限,其中我们获得$\mathcal{O}(n^r)$界限,使得$r$不是整数并且接近于各个算法的最佳已知界限。

英文摘要:

We study the problem of developing efficient approaches for proving worst-case bounds of non-deterministic recursive programs. Ranking functions are sound and complete for proving termination and worst-case bounds of nonrecursive programs. First, we apply ranking functions to recursion, resulting in measure functions. We show that measure functions provide a sound and complete approach to prove worst-case bounds of non-deterministic recursive programs. Our second contribution is the synthesis of measure functions in nonpolynomial forms. We show that non-polynomial measure functions with logarithm and exponentiation can be synthesized through abstraction of logarithmic or exponentiation terms, Farkas' Lemma, and Handelman's Theorem using linear programming. While previous methods obtain worst-case polynomial bounds, our approach can synthesize bounds of the form $\mathcal{O}(n\log n)$ as well as $\mathcal{O}(n^r)$ where $r$ is not an integer. We present experimental results to demonstrate that our approach can obtain efficiently worst-case bounds of classical recursive algorithms such as (i) Merge-Sort, the divide-and-conquer algorithm for the Closest-Pair problem, where we obtain $\mathcal{O}(n \log n)$ worst-case bound, and (ii) Karatsuba's algorithm for polynomial multiplication and Strassen's algorithm for matrix multiplication, where we obtain $\mathcal{O}(n^r)$ bound such that $r$ is not an integer and close to the best-known bounds for the respective algorithms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑