Linear-Time Approximation Algorithms for Computing Numerical Summation with Provably Small Errors
Abstract
Given a multiset X=\x1,..., xn\ of real numbers, the floating-point set summation problem asks for Sn=x1+...+xn. Let E*n denote the minimum worst-case error over all possible orderings of evaluating Sn. We prove that if X has both positive and negative numbers, it is NP-hard to compute Sn 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()E*n.All logarithms 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 n 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 n E*n, while E*n was known to be attainable in O(n n) time using Huffman coding.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.