Papers
Topics
Authors
Recent
Search
2000 character limit reached

An Explicit and Efficient $O(n^2)$-Time Algorithm for Sorting Sumsets

Published 23 Apr 2025 in cs.DS and cs.DM | (2504.16393v1)

Abstract: We present the first explicit comparison-based algorithm that sorts the sumset $X + Y = {x_i + y_j,\ \forall 0 \le i, j < n}$, where $X$ and $Y$ are sorted arrays of real numbers, in optimal $O(n2)$ time and comparisons. While Fredman (1976) proved the theoretical existence of such an algorithm, a concrete construction has remained open for nearly five decades. Our algorithm exploits the structured monotonicity of the sumset matrix to perform amortized constant-comparisons and insertions, eliminating the $\log(n)$ overhead typical of comparison-based sorting. We prove correctness and optimality in the standard comparison model, extend the method to $k$-fold sumsets with $O(nk)$ performance, and outline potential support for dynamic updates. Experimental benchmarks show significant speedups over classical algorithms such as MergeSort and QuickSort when applied to sumsets. These results resolve a longstanding open problem in sorting theory and contribute novel techniques for exploiting input structure in algorithm design.

Authors (1)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 3881 likes about this paper.