The Complexity of Unary Subset Sum

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7434)


Given a stream of n numbers and a number B, the subset sum problem deals with checking whether there exists a subset of the stream that adds to exactly B. The unary subset sum problem, USS, is the same problem when the input is encoded in unary. We prove that any p-pass randomized algorithm computing USS with error at most 1/3 must use space \(\Omega(\frac{B}{p})\). For p ≤ B, we give a randomized p-pass algorithm that computes USS with error at most 1/3 using space \(\tilde{O}(\frac{nB}{p})\). We give a deterministic one-pass algorithm which given an input stream and two parameters B, ε, decides whether there exist a subset of the input stream that adds to a value in the range \(\left[(1-\epsilon)B,(1+\epsilon)B\right]\) using space \(O\left(\frac{\log B}{\epsilon}\right)\). We observe that USS is monotone (under a suitable encoding) and give a monotone NC2 circuit for USS. We also show that any circuit using ε-approximator gates for USS under this encoding needs Ω(n/logn) gates to compute the Disjointness function.


Communication Complexity Input Stream Polynomial Time Approximation Scheme Monotone Formula Unary Subset 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AB09]
    Arora, S., Barak, B.: Computational Complexity - A Modern Approach. Cambridge University Press (2009)Google Scholar
  2. [AMS99]
    Alon, N., Matias, Y., Szegedy, M.: The space complexity of approximating the frequency moments. Journal of Computer and System Sciences 58(1), 137–147 (1999)MathSciNetzbMATHCrossRefGoogle Scholar
  3. [BYJKS02]
    Bar-Yossef, Z., Jayram, T.S., Kumar, R., Sivakumar, D.: Information theory methods in communication complexity. In: Proceedings of the 17th Annual IEEE Conference on Computational Complexity, pp. 93–102 (2002)Google Scholar
  4. [BYJKS04]
    Bar-Yossef, Z., Jayram, T.S., Kumar, R., Sivakumar, D.: An information statistics approach to data stream and communication complexity. Journal of Computer and System Sciences 68(4), 702–732 (2004); (preliminary verion in FOCS 2002) MathSciNetzbMATHCrossRefGoogle Scholar
  5. [CLRS09]
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press (2009)Google Scholar
  6. [EJT10]
    Elberfeld, M., Jakoby, A., Tantau, T.: Logspace versions of the theorems of Bodlaender and Courcelle. In: FOCS, pp. 143–152, (2010); ECCC TR 62 (2010)Google Scholar
  7. [EJT12]
    Elberfeld, M., Jakoby, A., Tantau, T.: Algorithmic meta theorems for circuit classes of constant and logarithmic depth. In: 29th STACS: Leibniz International Proceedings in Informatics (LIPIcs), vol. 14, pp. 66–77 (2012); See also ECCC TR 128 (2011)Google Scholar
  8. [GJ79]
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman (1979)Google Scholar
  9. [Kan10]
    Kane, D.M.: Unary subset-sum is in logspace. CoRR (arxiv), abs/1012.1336 (2010)Google Scholar
  10. [KNR95]
    Kremer, I., Nisan, N., Ron, D.: On randomized one-round communication complexity. Computational Complexity 8, 596–605 (1995)MathSciNetGoogle Scholar
  11. [KS92]
    Kalyanasundaram, B., Schnitger, G.: The probabilistic communication complexity of set intersection. SIAM Journal on Discrete Mathematics 5(4), 545–557 (1992)MathSciNetzbMATHCrossRefGoogle Scholar
  12. [MS80]
    Monien, B., Sudborough, I.H.: The interface between language theory and complexity theory. In: Book, R.V. (ed.) Formal Language Theory. Academic Press (1980)Google Scholar
  13. [Nis94]
    Nisan, N.: The communication complexity of threshold gates. In: Proceedings of Combinatorics, Paul Erdos is Eighty, pp. 301–315 (1994)Google Scholar
  14. [Raz92]
    Razborov, A.A.: On the distributional complexity of disjointness. Theoretical Computer Science 106(2), 385–390 (1992)MathSciNetzbMATHCrossRefGoogle Scholar
  15. [Sav70]
    Savitch, W.: Relationships between nondeterministic and deterministic tape complexities. Journal of Computer and System Sciences 4(2), 177–192 (1970)MathSciNetzbMATHCrossRefGoogle Scholar
  16. [Ser04]
    Servedio, R.A.: Monotone boolean formulas can approximate monotone linear threshold functions. Discrete Applied Mathematics 142(1-3), 181–187 (2004)MathSciNetzbMATHCrossRefGoogle Scholar
  17. [Val84]
    Valiant, L.G.: Short monotone formulae for the majority function. Journal of Algorithms 5(3), 363–366 (1984)MathSciNetzbMATHCrossRefGoogle Scholar
  18. [Yao89]
    Yao, A.C.: Circuits and local computation. In: Proceedings of the Twenty-First Annual ACM Symposium on Theory of Computing, STOC, pp. 186–196. ACM, NY (1989)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  1. 1.Indian Institute of TechnologyBombayIndia
  2. 2.The Institute of Mathematical SciencesChennaiIndia

Personalised recommendations