Solving k-SUM Using Few Linear Queries

Authors Jean Cardinal, John Iacono, Aurélien Ooms

Thumbnail PDF


  • Filesize: 0.55 MB
  • 17 pages

Document Identifiers

Author Details

Jean Cardinal
John Iacono
Aurélien Ooms

Cite AsGet BibTex

Jean Cardinal, John Iacono, and Aurélien Ooms. Solving k-SUM Using Few Linear Queries. In 24th Annual European Symposium on Algorithms (ESA 2016). Leibniz International Proceedings in Informatics (LIPIcs), Volume 57, pp. 25:1-25:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)


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.
  • k-SUM problem
  • linear decision trees
  • point location
  • $varepsilon$-nets


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Amir Abboud, Kevin Lewi, and Ryan Williams. Losing weight by gaining edges. In European Symposium on Algorithms (ESA 2014), pages 1-12. Springer, 2014. Google Scholar
  2. Amir Abboud, Virginia Vassilevska Williams, and Oren Weimann. Consequences of faster alignment of sequences. In International Colloquium on Automata, Languages, and Programming (ICALP 2014), volume 8572 of Lecture Notes in Computer Science, pages 39-51. Springer, 2014. Google Scholar
  3. Amir Abboud, Virginia Vassilevska Williams, and Huacheng Yu. Matching triangles and basing hardness on an extremely popular conjecture. In Symposium on Theory of Computing (STOC 2015), pages 41-50, 2015. Google Scholar
  4. Nir Ailon and Bernard Chazelle. Lower bounds for linear degeneracy testing. J. ACM, 52(2):157-171, 2005. Google Scholar
  5. Amihood Amir, Timothy M. Chan, Moshe Lewenstein, and Noa Lewenstein. On hardness of jumbled indexing. In International Colloquium on Automata, Languages, and Programming (ICALP 2014), volume 8572 of Lecture Notes in Computer Science, pages 114-125. Springer, 2014. Google Scholar
  6. Ilya Baran, Erik D. Demaine, and Mihai Patrascu. Subquadratic algorithms for 3SUM. Algorithmica, 50(4):584-596, 2008. Google Scholar
  7. Gill Barequet and Sariel Har-Peled. Polygon-containment and translational min-hausdorff-distance between segment sets are 3SUM-hard. In Symposium on Discrete Algorithms (SODA 1999), pages 862-863, 1999. Google Scholar
  8. Anselm Blumer, Andrzej Ehrenfeucht, David Haussler, and Manfred K. Warmuth. Learnability and the vapnik-chervonenkis dimension. J. ACM, 36(4):929-965, 1989. Google Scholar
  9. Peter Bürgisser, Michael Clausen, and Mohammad Amin Shokrollahi. Algebraic complexity theory, volume 315 of Grundlehren der mathematischen Wissenschaften. Springer, 1997. Google Scholar
  10. Jean Cardinal, Samuel Fiorini, Gwenaël Joret, Raphaël M Jungers, and J Ian Munro. An efficient algorithm for partial order production. SIAM journal on computing, 39(7):2927-2940, 2010. Google Scholar
  11. Jean Cardinal, Samuel Fiorini, Gwenaël Joret, Raphaël M Jungers, and J Ian Munro. Sorting under partial information (without the ellipsoid algorithm). Combinatorica, 33(6):655-697, 2013. Google Scholar
  12. Marco Carmosino, Jiawei Gao, Russell Impagliazzo, Ivan Mikhailin, Ramamohan Paturi, and Stefan Schneider. Nondeterministic extensions of the strong exponential time hypothesis and consequences for non-reducibility. Electronic Colloquium on Computational Complexity (ECCC 2015), 22:148, 2015. Google Scholar
  13. Timothy M. Chan and Moshe Lewenstein. Clustered integer 3SUM via additive combinatorics. In Rocco A. Servedio and Ronitt Rubinfeld, editors, Symposium on Theory of Computing (STOC 2015), pages 31-40. ACM, 2015. Google Scholar
  14. Kenneth L. Clarkson. A randomized algorithm for closest-point queries. SIAM J. Comput., 17(4):830-847, 1988. Google Scholar
  15. David P. Dobkin and Richard J. Lipton. On some generalizations of binary search. In Symposium on Theory of Computing (STOC 1974), pages 310-316, 1974. Google Scholar
  16. David P. Dobkin and Richard J. Lipton. A lower bound of the 1/2 n² on linear search programs for the knapsack problem. J. Comput. Syst. Sci., 16(3):413-417, 1978. Google Scholar
  17. Jeff Erickson. Lower bounds for linear satisfiability problems. Chicago Journal of Theoretical Computer Science, 1999. Google Scholar
  18. Hervé Fournier. Complexité et expressibilité sur les réels. PhD thesis, École normale supérieure de Lyon, 2001. Google Scholar
  19. Ari Freund. Improved subquadratic 3SUM. Algorithmica, 2015. To appear. Google Scholar
  20. Anka Gajentaan and Mark H. Overmars. On a class of O(n²) problems in computational geometry. Comput. Geom., 5:165-185, 1995. Google Scholar
  21. O. Gold and M. Sharir. Improved bounds for 3SUM, k-SUM, and linear degeneracy. ArXiv e-prints, 2015. URL:
  22. Jacob E. Goodman and Joseph O'Rourke, editors. Handbook of Discrete and Computational Geometry, Second Edition. Chapman and Hall/CRC, 2004. Google Scholar
  23. Allan Grønlund and Seth Pettie. Threesomes, degenerates, and love triangles. In Foundations of Computer Science (FOCS 2014), pages 621-630. IEEE, 2014. Google Scholar
  24. David Haussler and Emo Welzl. ε-nets and simplex range queries. Discrete &Computational Geometry, 2(1):127-151, 1987. Google Scholar
  25. T. Kopelowitz, S. Pettie, and E. Porat. Higher lower bounds from the 3SUM conjecture. ArXiv e-prints, 2014. URL:
  26. S. Meiser. Point location in arrangements of hyperplanes. Information and Computation, 106(2):286-303, 1993. Google Scholar
  27. Friedhelm Meyer auf der Heide. A polynomial linear search algorithm for the n-dimensional knapsack problem. J. ACM, 31(3):668-676, 1984. Google Scholar
  28. Joseph S. B. Mitchell and Joseph O'Rourke. Computational geometry column 42. Int. J. Comput. Geometry Appl., 11(5):573-582, 2001. Google Scholar
  29. Mihai Patrascu. Towards polynomial lower bounds for dynamic problems. In Symposium on Theory of Computing (STOC 2010), pages 603-610, 2010. Google Scholar
  30. Mihai Patrascu and Ryan Williams. On the possibility of faster SAT algorithms. In Symposium on Discrete Algorithms (SODA 2010), pages 1065-1075, 2010. Google Scholar
  31. William L. Steiger and Ileana Streinu. A pseudo-algorithmic separation of lines from pseudo-lines. Information Processing Letters, 53(5):295-299, 1995. Google Scholar
  32. Andrew Chi-Chih Yao. On parallel computation for the knapsack problem. J. ACM, 29(3):898-903, 1982. Google Scholar