64 research outputs found

    Improved Bounds for 3SUM, kk-SUM, and Linear Degeneracy

    Get PDF
    Given a set of nn real numbers, the 3SUM problem is to decide whether there are three of them that sum to zero. Until a recent breakthrough by Gr{\o}nlund and Pettie [FOCS'14], a simple Θ(n2)\Theta(n^2)-time deterministic algorithm for this problem was conjectured to be optimal. Over the years many algorithmic problems have been shown to be reducible from the 3SUM problem or its variants, including the more generalized forms of the problem, such as kk-SUM and kk-variate linear degeneracy testing (kk-LDT). The conjectured hardness of these problems have become extremely popular for basing conditional lower bounds for numerous algorithmic problems in P. In this paper, we show that the randomized 44-linear decision tree complexity of 3SUM is O(n3/2)O(n^{3/2}), and that the randomized (2k2)(2k-2)-linear decision tree complexity of kk-SUM and kk-LDT is O(nk/2)O(n^{k/2}), for any odd k3k\ge 3. These bounds improve (albeit randomized) the corresponding O(n3/2logn)O(n^{3/2}\sqrt{\log n}) and O(nk/2logn)O(n^{k/2}\sqrt{\log n}) decision tree bounds obtained by Gr{\o}nlund and Pettie. Our technique includes a specialized randomized variant of fractional cascading data structure. Additionally, we give another deterministic algorithm for 3SUM that runs in O(n2loglogn/logn)O(n^2 \log\log n / \log n ) time. The latter bound matches a recent independent bound by Freund [Algorithmica 2017], but our algorithm is somewhat simpler, due to a better use of word-RAM model

    Threesomes, Degenerates, and Love Triangles

    Full text link
    The 3SUM problem is to decide, given a set of nn real numbers, whether any three sum to zero. It is widely conjectured that a trivial O(n2)O(n^2)-time algorithm is optimal and over the years the consequences of this conjecture have been revealed. This 3SUM conjecture implies Ω(n2)\Omega(n^2) lower bounds on numerous problems in computational geometry and a variant of the conjecture implies strong lower bounds on triangle enumeration, dynamic graph algorithms, and string matching data structures. In this paper we refute the 3SUM conjecture. We prove that the decision tree complexity of 3SUM is O(n3/2logn)O(n^{3/2}\sqrt{\log n}) and give two subquadratic 3SUM algorithms, a deterministic one running in O(n2/(logn/loglogn)2/3)O(n^2 / (\log n/\log\log n)^{2/3}) time and a randomized one running in O(n2(loglogn)2/logn)O(n^2 (\log\log n)^2 / \log n) time with high probability. Our results lead directly to improved bounds for kk-variate linear degeneracy testing for all odd k3k\ge 3. The problem is to decide, given a linear function f(x1,,xk)=α0+1ikαixif(x_1,\ldots,x_k) = \alpha_0 + \sum_{1\le i\le k} \alpha_i x_i and a set ARA \subset \mathbb{R}, whether 0f(Ak)0\in f(A^k). We show the decision tree complexity of this problem is O(nk/2logn)O(n^{k/2}\sqrt{\log n}). Finally, we give a subcubic algorithm for a generalization of the (min,+)(\min,+)-product over real-valued matrices and apply it to the problem of finding zero-weight triangles in weighted graphs. We give a depth-O(n5/2logn)O(n^{5/2}\sqrt{\log n}) decision tree for this problem, as well as an algorithm running in time O(n3(loglogn)2/logn)O(n^3 (\log\log n)^2/\log n)

    Solving kk-SUM using few linear queries

    Full text link
    The kk-SUM problem is given nn input real numbers to determine whether any kk of them sum to zero. The problem is of tremendous importance in the emerging field of complexity theory within PP, and it is in particular open whether it admits an algorithm of complexity O(nc)O(n^c) with c<k2c<\lceil \frac{k}{2} \rceil. Inspired by an algorithm due to Meiser (1993), we show that there exist linear decision trees and algebraic computation trees of depth O(n3log3n)O(n^3\log^3 n) solving kk-SUM. Furthermore, we show that there exists a randomized algorithm that runs in O~(nk2+8)\tilde{O}(n^{\lceil \frac{k}{2} \rceil+8}) time, and performs O(n3log3n)O(n^3\log^3 n) linear queries on the input. Thus, we show that it is possible to have an algorithm with a runtime almost identical (up to the +8+8) to the best known algorithm but for the first time also with the number of queries on the input a polynomial that is independent of kk. The O(n3log3n)O(n^3\log^3 n) bound on the number of linear queries is also a tighter bound than any known algorithm solving kk-SUM, even allowing unlimited total time outside of the queries. By simultaneously achieving few queries to the input without significantly sacrificing runtime vis-\`{a}-vis known algorithms, we deepen the understanding of this canonical problem which is a cornerstone of complexity-within-PP. We also consider a range of tradeoffs between the number of terms involved in the queries and the depth of the decision tree. In particular, we prove that there exist o(n)o(n)-linear decision trees of depth o(n4)o(n^4)

    Improved Algebraic Degeneracy Testing

    Get PDF

    All non-trivial variants of 3-LDT are equivalent

    Full text link
    The popular 3-SUM conjecture states that there is no strongly subquadratic time algorithm for checking if a given set of integers contains three distinct elements that sum up to zero. A closely related problem is to check if a given set of integers contains distinct x1,x2,x3x_1, x_2, x_3 such that x1+x2=2x3x_1+x_2=2x_3. This can be reduced to 3-SUM in almost-linear time, but surprisingly a reverse reduction establishing 3-SUM hardness was not known. We provide such a reduction, thus resolving an open question of Erickson. In fact, we consider a more general problem called 3-LDT parameterized by integer parameters α1,α2,α3\alpha_1, \alpha_2, \alpha_3 and tt. In this problem, we need to check if a given set of integers contains distinct elements x1,x2,x3x_1, x_2, x_3 such that α1x1+α2x2+α3x3=t\alpha_1 x_1+\alpha_2 x_2 +\alpha_3 x_3 = t. For some combinations of the parameters, every instance of this problem is a NO-instance or there exists a simple almost-linear time algorithm. We call such variants trivial. We prove that all non-trivial variants of 3-LDT are equivalent under subquadratic reductions. Our main technical contribution is an efficient deterministic procedure based on the famous Behrend's construction that partitions a given set of integers into few subsets that avoid a chosen linear equation

    Solving k-SUM Using Few Linear Queries

    Get PDF
    The k-SUM problem is given n input real numbers to determine whether any k of them sum to zero. The problem is of tremendous importance in the emerging field of complexity theory within P, and it is in particular open whether it admits an algorithm of complexity O(n^c) with c<d where d is the ceiling of k/2. Inspired by an algorithm due to Meiser (1993), we show that there exist linear decision trees and algebraic computation trees of depth O(n^3 log^2 n) solving k-SUM. Furthermore, we show that there exists a randomized algorithm that runs in ~O(n^{d+8}) time, and performs O(n^3 log^2 n) linear queries on the input. Thus, we show that it is possible to have an algorithm with a runtime almost identical (up to the +8) to the best known algorithm but for the first time also with the number of queries on the input a polynomial that is independent of k. The O(n^3 log^2 n) bound on the number of linear queries is also a tighter bound than any known algorithm solving k-SUM, even allowing unlimited total time outside of the queries. By simultaneously achieving few queries to the input without significantly sacrificing runtime vis-a-vis known algorithms, we deepen the understanding of this canonical problem which is a cornerstone of complexity-within-P. We also consider a range of tradeoffs between the number of terms involved in the queries and the depth of the decision tree. In particular, we prove that there exist o(n)-linear decision trees of depth ~O(n^3) for the k-SUM problem
    corecore