arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/9907015cs.DScs.NAmath.NA
收藏

线性时间近似算法:以可证明的小误差计算数值求和

Linear-Time Approximation Algorithms for Computing Numerical Summation with Provably Small Errors

Ming-Yang Kao, Jie Wang

AI总结:

本文针对浮点数集合求和问题,证明混合符号情况下达到最优误差是NP困难的,并提出首个线性时间近似算法,误差至多为最优的2倍,全同号时误差至多为对数对数倍。

摘要:

给定一个实数多重集 $X=\{x_1,..., x_n\}$,浮点数集合求和问题要求计算 $S_n=x_1+...+x_n$。设 $E^*_n$ 表示在所有可能的求值顺序中,计算 $S_n$ 的最小最坏情况误差。我们证明,如果 $X$ 同时包含正数和负数,则计算 $S_n$ 且最坏情况误差等于 $E^*_n$ 是 NP 困难的。随后,我们给出了第一个已知的多项式时间近似算法,该算法对于任意 $X$ 具有可证明的小误差。我们的算法产生的最坏情况误差至多为 $2(\mix)E^*_n$。注:本文中所有对数 $\log$ 均以 2 为底。在对 $X$ 排序后,该算法运行时间为 O(n)。对于 $X$ 全为正或全为负的情况,我们给出了另一个近似算法,其最坏情况误差至多为 $\lceil\log\log n\rceil E^*_n$。即使 $X$ 未排序,该算法也能在 O(n) 时间内运行。此前,最好的线性时间近似算法的最坏情况误差至多为 $\lceil\log n\rceil E^*_n$,而已知使用哈夫曼编码可在 $O(n \log n)$ 时间内达到 $E^*_n$。

英文摘要:

Given a multiset $X=\{x_1,..., x_n\}$ of real numbers, the {\it floating-point set summation} problem asks for $S_n=x_1+...+x_n$. Let $E^*_n$ denote the minimum worst-case error over all possible orderings of evaluating $S_n$. We prove that if $X$ has both positive and negative numbers, it is NP-hard to compute $S_n$ with the worst-case error equal to $E^*_n$. We then give the first known polynomial-time approximation algorithm that has a provably small error for arbitrary $X$. Our algorithm incurs a worst-case error at most $2(\mix)E^*_n$.\footnote{All logarithms $\log$ in this paper are base 2.} After $X$ is sorted, it runs in O(n) time. For the case where $X$ is either all positive or all negative, we give another approximation algorithm with a worst-case error at most $\lceil\log\log n\rceil E^*_n$. Even for unsorted $X$, this algorithm runs in O(n) time. Previously, the best linear-time approximation algorithm had a worst-case error at most $\lceil\log n\rceil E^*_n$, while $E^*_n$ was known to be attainable in $O(n \log n)$ time using Huffman coding.

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

↑