Skip to main content

Algebraic Algorithms for Variants of Subset Sum

  • Conference paper
  • First Online:
Algorithms and Discrete Applied Mathematics (CALDAM 2022)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 13179))

Included in the following conference series:

Abstract

Given \((a_1, \dots , a_n, t) \in \mathbb {Z}_{\ge 0}^{n + 1}\), the Subset Sum problem (\(\mathsf {SSUM}\)) is to decide whether there exists \(S \subseteq [n]\) such that \(\sum _{i \in S} a_i = t\). Bellman (1957) gave a pseudopolynomial time dynamic programming algorithm which solves the Subset Sum in O(nt) time and O(t) space.

In this work, we present search algorithms for variants of the Subset Sum problem. Our algorithms are parameterized by k, which is a given upper bound on the number of realisable sets (i.e. number of solutions, summing exactly t). We show that \(\mathsf {SSUM}\) with a unique solution is already \(\mathsf {NP}\)-hard, under randomized reduction. This makes the regime of parametrized algorithms, in terms of k, very interesting.

Subsequently, we present an \(\tilde{O}(k\cdot (n+t))\) time deterministic algorithm, which finds the hamming weight of all the realisable sets for a subset sum instance. We also give a \({\mathsf {poly}}(knt)\)-time and \(O(\log (knt))\)-space deterministic algorithm that finds all the realisable sets for a subset sum instance. Our algorithms use analytic and number-theoretic techniques.

The full version is available at this link.

P. Dutta—Supported by Google PhD Fellowship.

M. S. Rajasree—Supported by Prime Minister’s Research Fellowship.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Thm. 2 is not about time complexity; as long as it is pseudopolynomial time it’s ok.

  2. 2.

    In fact Vandermonde determinant and inverse computations are in \(\mathsf {TC}^0 \subset \mathsf {LOGSPACE}\), see [32].

References

  1. Lewis, H.R.: Computers and Intractability. A Guide to the Theory of NP-Completeness (1983)

    Google Scholar 

  2. Lyubashevsky, V., Palacio, A., Segev, G.: Public-key cryptographic primitives provably as secure as subset sum. In: Micciancio, D. (ed.) TCC 2010. LNCS, vol. 5978, pp. 382–400. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-11799-2_23

    Chapter  Google Scholar 

  3. Faust, S., Masny, D., Venturi, D.: Chosen-ciphertext security from subset sum. In: Cheng, C.-M., Chung, K.-M., Persiano, G., Yang, B.-Y. (eds.) PKC 2016. LNCS, vol. 9614, pp. 35–46. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49384-7_2

    Chapter  Google Scholar 

  4. Bringmann, K., Wellnitz, P.: On near-linear-time algorithms for dense subset sum. In: Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1777–1796. SIAM (2021)

    Google Scholar 

  5. Bringmann, K.: A near-linear pseudopolynomial time algorithm for subset sum. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1073–1084. SIAM (2017)

    Google Scholar 

  6. Jin, C., Wu, H.: A simple near-linear pseudopolynomial time randomized algorithm for subset sum. arXiv preprint arXiv:1807.11597 (2018)

  7. Jin, C., Vyas, N., Williams, R.: Fast low-space algorithms for subset sum. In: Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1757–1776. SIAM (2021)

    Google Scholar 

  8. Esser, A., May, A.: Low weight discrete logarithm and subset sum in 20. 65n with polynomial memory. Memory 1, 2 (2020)

    Google Scholar 

  9. Bernstein, D.J., Jeffery, S., Lange, T., Meurer, A.: Quantum algorithms for the subset-sum problem. In: Gaborit, P. (ed.) PQCrypto 2013. LNCS, vol. 7932, pp. 16–33. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38616-9_2

    Chapter  MATH  Google Scholar 

  10. Helm, A., May, A.: Subset sum quantumly in 1.17\(^{\wedge }\) n. In: 13th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2018). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018)

    Google Scholar 

  11. Li, Y., Li, H.: Improved quantum algorithm for the random subset sum problem. arXiv preprint arXiv:1912.09264 (2019)

  12. Bellman, R.E.: Dynamic Programming (1957)

    Google Scholar 

  13. Klivans, A.R., Spielman, D.: Randomness efficient identity testing of multivariate polynomials. In: Proceedings of the Thirty-Third Annual ACM Symposium on Theory of Computing, pp. 216–223 (2001)

    Google Scholar 

  14. Abboud, A., Bringmann, K., Hermelin, D., Shabtay, D.: Seth-based lower bounds for subset sum and bicriteria path. In: Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 41–57. SIAM (2019)

    Google Scholar 

  15. McKay, D.M., Williams, R.R.: Quadratic time-space lower bounds for computing natural functions with a random oracle. In: 10th Innovations in Theoretical Computer Science Conference (ITCS 2019). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018)

    Google Scholar 

  16. Kane, D.M.: Unary subset-sum is in logspace. arXiv preprint arXiv:1012.1336 (2010)

  17. Pisinger, D.: Linear time algorithms for knapsack problems with bounded weights. J. Algorithms 33(1), 1–14 (1999)

    Article  MathSciNet  Google Scholar 

  18. Koiliaris, K., Chao, X.: Faster pseudopolynomial time algorithms for subset sum. ACM Trans. Algorithms (TALG) 15(3), 1–20 (2019)

    Article  MathSciNet  Google Scholar 

  19. Koiliaris, K., Xu, C.: Subset sum made simple. arXiv preprint arXiv:1807.08248 (2018)

  20. Lokshtanov, D., Nederlof, J.: Saving space by Algebraization. In: Proceedings of the Forty-Second ACM Symposium on Theory of Computing, pp. 321–330 (2010)

    Google Scholar 

  21. Mulmuley, K., Vazirani, U.V., Vazirani, V.V.: Matching is as easy as matrix inversion. In: Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, pp. 345–354 (1987)

    Google Scholar 

  22. Von Zur Gathen, J., Gerhard, J.: Modern Computer Algebra. Cambridge University Press, Cambridge (2013)

    Google Scholar 

  23. Moree, P.: Artin’s primitive root conjecture-a survey. Integers 12(6), 1305–1416 (2012)

    Article  MathSciNet  Google Scholar 

  24. Gupta, R., Ram Murty, M.: A remark on Artin’s conjecture. Inventiones Math. 78(1), 127–130 (1984)

    Google Scholar 

  25. Erdös, P., Ram Murty, M.: On the order of a (mod p). In: CRM Proceedings and Lecture Notes, vol. 19, pp. 87–97 (1999)

    Google Scholar 

  26. Chinen, K., Murata, L.: On a distribution property of the residual order of a (mod p). J. Number Theory 105(1), 60–81 (2004)

    Article  MathSciNet  Google Scholar 

  27. Shparlinski, I.: On finding primitive roots in finite fields. Theoret. Comput. Sci. 157(2), 273–275 (1996)

    Article  MathSciNet  Google Scholar 

  28. Nagura, J.: On the interval containing at least one prime number. Proc. Jpn. Acad. 28(4), 177–181 (1952)

    MathSciNet  MATH  Google Scholar 

  29. Agrawal, M., Kayal, N., Saxena, N.: Primes is in p. Ann. Math. 160, 781–793 (2004)

    Google Scholar 

  30. Shoup, V.: On the deterministic complexity of factoring polynomials over finite fields. Inf. Process. Lett. 33(5), 261–267 (1990)

    Article  MathSciNet  Google Scholar 

  31. Bourgain, J., Konyagin, S., Shparlinski, I.: Character sums and deterministic polynomial root finding in finite fields. Math. Comput. 84(296), 2969–2977 (2015)

    Article  MathSciNet  Google Scholar 

  32. Maciel, A., Therien, D.: Threshold circuits of small majority-depth. Inf. Comput. 146(1), 55–83 (1998)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pranjal Dutta .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dutta, P., Rajasree, M.S. (2022). Algebraic Algorithms for Variants of Subset Sum. In: Balachandran, N., Inkulu, R. (eds) Algorithms and Discrete Applied Mathematics. CALDAM 2022. Lecture Notes in Computer Science(), vol 13179. Springer, Cham. https://doi.org/10.1007/978-3-030-95018-7_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-95018-7_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-95017-0

  • Online ISBN: 978-3-030-95018-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics