当前位置: X-MOL 学术ACM Trans. Program. Lang. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Non-polynomial Worst-Case Analysis of Recursive Programs
ACM Transactions on Programming Languages and Systems ( IF 1.3 ) Pub Date : 2019-10-15 , DOI: 10.1145/3339984
Krishnendu Chatterjee 1 , Hongfei Fu 2 , Amir Kafshdar Goharshady 3
Affiliation  

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 non-recursive 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 non-polynomial 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 polynomial worst-case bounds, our approach can synthesize bounds of various forms including O( n log n ) and O( n r ), where r is not an integer. We present experimental results to demonstrate that our approach can efficiently obtain worst-case bounds of classical recursive algorithms such as (i) Merge sort, Heap sort, and the divide-and-conquer algorithm for the Closest Pair problem, where we obtain O( n log n ) worst-case bound, and (ii) Karatsuba’s algorithm for polynomial multiplication and Strassen’s algorithm for matrix multiplication, for which we obtain O( n r ) bounds such that r is not an integer and is close to the best-known bound for the respective algorithm. Besides the ability to synthesize non-polynomial bounds, we also show that our approach is equally capable of obtaining polynomial worst-case bounds for classical programs such as Quick sort and the dynamic programming algorithm for computing Fibonacci numbers.

中文翻译:

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

我们研究了开发有效方法来证明非确定性递归程序的最坏情况界限的问题。排序函数对于证明非递归程序的终止和最坏情况边界是健全和完整的。首先,我们将排名函数应用于递归,从而产生度量函数。我们表明,测量函数提供了一种完善且完整的方法来证明非确定性递归程序的最坏情况界限。我们的第二个贡献是非多项式形式的测度函数的综合。我们表明,具有对数和指数的非多项式测量函数可以通过使用线性规划的对数或指数项、法卡斯引理和汉德曼定理的抽象来合成。虽然以前的方法获得多项式最坏情况界限,n日志n) 和 O(n r ), 在哪里r不是整数。我们提供实验结果以证明我们的方法可以有效地获得经典递归算法的最坏情况界限,例如 (i) 合并排序、堆排序和最近对问题的分治算法,其中我们获得 O(n日志n) 最坏情况界限,以及 (ii) Karatsuba 的多项式乘法算法和 Strassen 的矩阵乘法算法,我们得到 O(n r ) 边界使得r不是整数,并且接近于各自算法的最广为人知的界限。除了合成非多项式边界的能力外,我们还表明,我们的方法同样能够为经典程序(例如快速排序和计算斐波那契数的动态规划算法)获得多项式最坏情况边界。
更新日期:2019-10-15
down
wechat
bug