HackerPapers

arXiv:1507.02318cs.DS

A Faster Pseudopolynomial Time Algorithm for Subset Sum

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

Given a multiset $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$. We present a new divide-and-conquer algorithm that computes all the realizable subset sums up to an integer $u$ in $\widetilde{O}\!\left(\min\{\sqrt{n}u,u^{4/3},σ\}\right)$, where $σ$ is the sum of all elements in $S$ and $\widetilde{O}$ hides polylogarithmic factors. This result improves upon the standard dynamic programming algorithm that runs in $O(nu)$ time. To the best of our knowledge, the new algorithm is the fastest general algorithm for this problem. We also present a modified algorithm for cyclic groups, which computes all the realizable subset sums within the group in $\widetilde{O}\!\left(\min\{\sqrt{n}m,m^{5/4}\}\right)$ time, where $m$ is the order of the group.

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

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Nov 2017 to Nov 2017. Found in 2 HN submissions from Jul 2015 to Feb 2019. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Yes, you're right. NP-complete. My mistake This arXiv paper shows the STOA from 2015: https://arxiv.org/pdf/1507.02318.pdf It works in pseudopolynomial time. I read that it's quite an important problem, related to graphs and encryption.

      visargaView on HNParent context

Submitted to Hacker News

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