Abstract
SubsetSum is a well-known NP-complete problem: given t ∈ Z+ and a set S of m positive integers, output YES if and only if there is a subset S′⊆S such that the sum of all numbers in S′ equals t. The problem and its search and optimization versions are known to be solvable in pseudopolynomial time in general.
We develop a one-pass deterministic streaming algorithm that uses space O(log t / ε) and decides if some subset of the input stream adds up to a value in the range {(1 ± ϵ)t}. Using this algorithm, we design space-efficient fully polynomial-time approximation schemes (FPTAS) solving the search and optimization versions of SubsetSum. Our algorithms run in O(1 / ϵ m2) time and O(1 / ϵ) space on unit-cost RAMs, where 1 + ϵ is the approximation factor. This implies constant space quadratic time FPTAS on unit-cost RAMs when ϵ is a constant. Previous FPTAS used space linear in m.
In addition, we show that on certain inputs, when a solution is located within a short prefix of the input sequence, our algorithms may run in sublinear time. We apply our techniques to the problem of finding balanced separators, and we extend our results to some other variants of the more general knapsack problem.
When the input numbers are encoded in unary, the decision version has been known to be in log space. We give streaming space lower and upper bounds for unary SubsetSum (USS). If the input length is N when the numbers are encoded in unary, we show that randomized s-pass streaming algorithms for exact SubsetSum need space Ω (√N/s) and give a simple deterministic two-pass streaming algorithm using O(√N log N) space.
Finally, we formulate an encoding under which USS is monotone and show that the exact and approximate versions in this formulation have monotone O(log2t) depth Boolean circuits. We also show that any circuit using ε-approximator gates for SubsetSum under this encoding needs Ω(n/logn) gates to compute the disjointness function.
- Anna Adamaszek and Michal Adamaszek. 2010. Combinatorics of the change-making problem. European Journal of Combinatorics, 47--63. Google Scholar
Digital Library
- Noga Alon, Yossi Matias, and Mario Szegedy. 1999. The space complexity of approximating the frequency moments. Journal of Computer and System Sciences 58, 1, 137--147. Google Scholar
Digital Library
- Noga Alon, Paul D. Seymour, and Robin Thomas. 1990. A separator theorem for graphs with an excluded minor and its applications. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing. 293--299. DOI:http://dx.doi.org/10.1145/100216.100254 Google Scholar
Digital Library
- Sanjeev Arora and Boaz Barak. 2009. Computational Complexity: A Modern Approach. Cambridge University Press. Google Scholar
Cross Ref
- Z. Bar-Yossef, T. S. Jayram, R. Kumar, and D. Sivakumar. 2002. Information theory methods in communication complexity. In Proceedings of the 17th Annual IEEE Conference on Computational Complexity. 93--102. Google Scholar
Digital Library
- Z. Bar-Yossef, T. S. Jayram, R. Kumar, and D. Sivakumar. 2004. An information statistics approach to data stream and communication complexity. Journal of Computer and System Sciences 68, 4, 702--732. Google Scholar
Digital Library
- Cristina Bazgan, Miklos Santha, and Zsolt Tuza. 2002. Efficient approximation algorithms for the SUBSET-SUMS EQUALITY problem. Journal of Computer and System Sciences 64, 2, 160--170. DOI:http://dx.doi.org/10.1006/jcss.2001.1784 Google Scholar
Digital Library
- Richard Bellman. 1957. Dynamic Programming. Princeton University Press, Princeton, NJ.Google Scholar
Digital Library
- T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. 2009. Introduction to Algorithms (3rd ed.). MIT Press, Cambridge, MA. Google Scholar
Digital Library
- George Dantzig. 1957. Discrete-variable extremum problems. Operations Research 5, 266--277. Google Scholar
Digital Library
- Michael Elberfeld, Andreas Jakoby, and Till Tantau. 2010. Logspace versions of the theorems of Bodlaender and Courcelle. In Proceedings of the 2010 51st Annual IEEE Symposium on Foundations of Computer Science (FOCS’10). 143--152. Google Scholar
Digital Library
- Michael Elberfeld, Andreas Jakoby, and Till Tantau. 2012. Algorithmic meta theorems for circuit classes of constant and logarithmic depth. In Proceedings of the Symposium on Theoretical Aspects of ComputerScience (STACS’12). 66--77.Google Scholar
- M. R. Garey and D. S. Johnson. 1979. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, San Francisco, CA. Google Scholar
Digital Library
- George Gens and Eugene Levner. 1980. Complexity of approximation algorithms for combinatorial problems: A survey. ACM SIGACT News 12, 3, 52--65. Google Scholar
Digital Library
- George Gens and Eugene Levner. 1979. Computational complexity of approximation algorithms for combinatorial problems. In Proceedings of the 8th Symposium of the Mathematical Foundations of Computer Science. 292--300. DOI:http://dx.doi.org/10.1007/3-540-09526-8_26Google Scholar
Cross Ref
- A. C. Gilbert, Y. Kotidis, S. Muthukrishnan, and M. Strauss. 2001. Surfing wavelets on streams: One-pass summaries for approximate aggregate queries. In Proceedings of 27th International Conference on Very Large Data Bases (VLDB’01). 79--88. http://www.vldb.org/conf/2001/P079.pdf. Google Scholar
Digital Library
- Laurent Hyafil and Ronald L. Rivest. 1973. Graph Partitioning and Constructing Optimal Decision Trees are Polynomial Complete Problems. Technical Report Rapport de Recherche no. 33. IRIA: Laboratoire de Recherche en Informatique et Automatique.Google Scholar
- Oscar H. Ibarra and Chul E. Kim. 1975. Fast approximation algorithms for the knapsack and sum of subset problems. Journal of the ACM 22, 4, 463--468. DOI:http://dx.doi.org/10.1145/321906.321909 Google Scholar
Digital Library
- T. Imai, K. Nakagawa, A. Pavan, N. V. Vinodchandran, and O. Watanabe. 2013. An O(n1/2 + ε) space and polynomial-time algorithm for directed planar reachability. In Proceedings of the IEEE Conference on Computational Complexity. IEEE, Los Alamitos, CA, 277--286.Google Scholar
- Bala Kalyanasundaram and Georg Schnitger. 1992. The probabilistic communication complexity of set intersection. SIAM Journal on Discrete Mathematics 5, 4, 545--557. Google Scholar
Digital Library
- Daniel M. Kane. 2010. Unary Subset-Sum is in logspace. arXiv:10102.1336.Google Scholar
- Richard M. Karp. 1972. Reducibility among combinatorial problems. In Complexity of Computer Computations. IBM Research Symposia Series. Springer, 85--103.Google Scholar
- Hans Kellerer, Renata Mansini, Ulrich Pferschy, and Maria Grazia Speranza. 2003. An efficient fully polynomial approximation scheme for the subset-sum problem. Journal of Computer and System Sciences 66, 2, 349--370. DOI:http://dx.doi.org/10.1016/S0022-0000(03)00006-0 Google Scholar
Digital Library
- Hans Kellerer, Ulrich Pferschy, and David Pisinger. 2004. Knapsack Problems. Springer.Google Scholar
- Dexter Kozen and Shmuel Zaks. 1994. Optimal bounds for the change-making problem. Theoretical Computer Science 123, 2, 377--388. DOI:http://dx.doi.org/10.1016/0304-3975(94)90134-1 Google Scholar
Digital Library
- Ilan Kremer, Noam Nisan, and Dana Ron. 1995. On randomized one-round communication complexity. Computational Complexity 8, 596--605. Google Scholar
Digital Library
- Nutan Limaye, Meena Mahajan, and Karteek Sreenivasaiah. 2012. The complexity of unary Subset Sum. In Computing and Combinatorics. Lecture Notes in Computer Science, Vol. 7434. Springer, 458--469.Google Scholar
- Richard J. Lipton and Robert Endre Tarjan. 1979. A separator theorem for planar graphs. SIAM Journal on Applied Mathematics 36, 177--189. DOI:http://dx.doi.org/10.1137/0209046Google Scholar
Digital Library
- Richard J. Lipton and Robert Endre Tarjan. 1980. Applications of a planar separator theorem. SIAM Journal on Computing 9, 3, 615--627. DOI:http://dx.doi.org/10.1137/0209046Google Scholar
Digital Library
- Daniel Lokshtanov and Jesper Nederlof. 2010. Saving space by algebraization. In Proceedings of the 42nd ACM Symposium on Theory of Computing (STOC’10). 321--330. DOI:http://dx.doi.org/10.1145/1806689.1806735 Google Scholar
Digital Library
- George Lueker. 1975. Two NP-Complete Problems in Nonnegative Integer Programming. Technical Report 178. Computer Science Laboratory, Princeton University, Princeton, NJ.Google Scholar
- Silvano Martello and Paolo Toth. 1990. Knapsack Problems: Algorithms and Computer Implementations. Wiley. Google Scholar
Digital Library
- Gary L. Miller. 1986. Finding small simple cycle separators for 2-connected planar graphs. Journal of Computer and System Sciences 32, 3, 265--279. DOI:http://dx.doi.org/10.1016/0022-0000(86)90030-9 Google Scholar
Digital Library
- B. Monien and I. H. Sudborough. 1980. The interface between language theory and complexity theory. In Formal Language Theory, R.V. Book (Ed.). Academic Press, 287--324.Google Scholar
- S. Muthukrishnan. 2005. Data streams: Algorithms and applications. Foundations and Trends in Theoretical Computer Science 1, 2, 117--236. DOI:http://dx.doi.org/10.1561/0400000002 Google Scholar
Digital Library
- Noam Nisan. 1994. The communication complexity of threshold gates. In Proceedings of Combinatorics, Paul Erdos Is Eighty. 301--315.Google Scholar
- Alexander A. Razborov. 1992. On the distributional complexity of disjointness. Theoretical Computer Science 106, 2, 385--390. Google Scholar
Digital Library
- Omer Reingold. 2008. Undirected connectivity in log-space. Journal of the ACM 55, 4, Article No. 17. Google Scholar
Digital Library
- W. Savitch. 1970. Relationships between nondeterministic and deterministic tape complexities. Journal of Computer and System Sciences 4, 2, 177--192. Google Scholar
Digital Library
- Rocco A. Servedio. 2004. Monotone Boolean formulas can approximate monotone linear threshold functions. Discrete Applied Mathematics 142, 1--3, 181--187.Google Scholar
Cross Ref
- Jeffrey D. Ullman. 1984. Computational Aspects of VLSI. Computer Science Press, Rockville, MD. Google Scholar
Digital Library
- L. G. Valiant. 1984. Short monotone formulae for the majority function. Journal of Algorithms 5, 3, 363--366.Google Scholar
Cross Ref
- Vijay V. Vazirani. 2001. Approximation Algorithms. Springer. Google Scholar
Digital Library
- Gerhard J. Woeginger and Zhongliang Yu. 1992. On the equal-subset-sum problem. Information Processing Letters 42, 6, 299--302. DOI:http://dx.doi.org/10.1016/0020-0190(92)90226-L Google Scholar
Digital Library
- A. C. Yao. 1989. Circuits and local computation. In Proceedings of the 21st Annual ACM Symposium on Theory of Computing (STOC’89). ACM, New York, NY, 186--196. Google Scholar
Digital Library
Index Terms
Space-Efficient Approximations for Subset Sum
Recommendations
Hardness of Approximation for Knapsack Problems
We show various hardness results for knapsack and related problems; in particular we will show that unless the Exponential-Time Hypothesis is false, subset-sum cannot be approximated any better than with an FPTAS. We also provide new unconditional lower ...
SETH-based lower bounds for subset sum and bicriteria path
SODA '19: Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete AlgorithmsSUBSET SUM and k-SAT are two of the most extensively studied problems in computer science, and conjectures about their hardness are among the cornerstones of fine-grained complexity. An important open problem in this area is to base the hardness of one ...
Space-efficient informational redundancy
We study the relation of autoreducibility and mitoticity for polylog-space many-one reductions and log-space many-one reductions. For polylog-space these notions coincide, while proving the same for log-space is out of reach. More precisely, we show the ...






Comments