HackerPapers

arXiv:1807.08248cs.DS

Subset Sum Made Simple

Konstantinos Koiliaris, Chao Xu

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Subset Sum is a classical optimization problem taught to undergraduates as an example of an NP-hard problem, which is amenable to dynamic programming, yielding polynomial running time if the input numbers are relatively small. Formally, given a set $S$ of $n$ positive integers and a target integer $t$, the Subset Sum problem is to decide if there is a subset of $S$ that sums up to $t$. Dynamic programming yields an algorithm with running time $O(nt)$. Recently, the authors [SODA '17] improved the running time to $\tilde{O}\bigl(\sqrt{n}t\bigr)$, and it was further improved to $\tilde{O}\bigl(n+t\bigr)$ by a somewhat involved randomized algorithm by Bringmann [SODA '17], where $\tilde{O}$ hides polylogarithmic factors. Here, we present a new and significantly simpler algorithm with running time $\tilde{O}\bigl(\sqrt{n}t\bigr)$. While not the fastest, we believe the new algorithm and analysis are simple enough to be presented in an algorithms class, as a striking example of a divide-and-conquer algorithm that uses FFT to a problem that seems (at first) unrelated. In particular, the algorithm and its analysis can be described in full detail in two pages (see pages 3-5).

arXiv comments
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Oct 2018 to Oct 2018. Found in 1 HN submission from Jul 2018 to Jul 2018. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Karger's randomized contraction algorithm for finding a min-cut. It's a common algorithm to introduce students into the world of randomized algorithms. Also a shameless plug. My friend and I came up with this pseudo-polynomial time algorithm for subset sum that can be taught in…

      chaoxuView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.