Subset Sum

Given a set SS of integers and a target sum tt, determine whether there is a subset of SS that sum to tt.

Parameters

  • SS: the set of integers
  • nn: the number of integers in the set
  • nn': the number of distinct elements in the set
  • tt: the target sum
  • σ\sigma: sum of elements in the set

Filters

Computational Model

Randomization

Approximation

Algorithms Table

Displaying 14 of 14 algorithms

See more
Koiliaris and Xu2019O~(min(nt,t5/4,σ))\tilde{O}(\min(\sqrt{n'}t, t^{5/4}, \sigma))O(t)O(t)
Bringman2017O~(nt1+ϵ)\tilde{O}(nt^{1+\epsilon})O~(ntϵ)\tilde{O}(nt^{\epsilon})
Serang2015O~(nmax(S))\tilde{O}(n \max(S))O(tlogt)O(t\log t)
Serang2014O~(nmax(S))\tilde{O}(n \max(S))O(tlogt)O(t\log t)
Lokshtanov2010O~(n3t)\tilde{O}(n^3 t)O(n2)O(n^2)
Pisinger2003O(nt/logt)O(nt/\log t)O(t/logt)O(t/\log t)
Pferschy1999O(nt)O(n' t)O(t)O(t)
Klinz1999O(σ3/2)O(\sigma^{3/2})O(t)O(t)
Psinger1999O(nmax(S))O(n \max(S))O(t)O(t)
Eppstein1997O~(nmax(S))\tilde{O}(n \max(S))O(tlogt)O(t\log t)
Horowitz and Sahni1974O(2(n/2)n)O(2^{(n/2)} n)O(2n/2)O(2^{n/2})
Faaland1973O(nt)O(n' t)O(t)O(t)
Bellman dynamic programming algorithm1956O(nt)O(nt)O(t)O(t)
Naive algorithm1940O(n2n)O(n 2^n)O(n)O(n)

Reductions Table

Displaying 1 of 1 reductions

Other relevant algorithms

Insuffient Data to display table