Abstract
Given positive integers \(a_1, \ldots , a_n\) and a target integer t, the \(\mathsf {Subset~Product}\) problem asks to determine whether there exists a subset \(S \subseteq [n]\) such that \(\prod _{i \in S} a_i=t\). It differs from the Subset Sum problem where the multiplication operation is replaced by addition. There is a pseudopolynomial-time dynamic programming algorithm which solves the \(\mathsf {Subset~Product}\) in O(nt) time and \(\varOmega (t)\) space.
In this paper, we present a simple and elegant randomized algorithm for \(\mathsf {Subset~Product}\) in \(\tilde{O}(n + t^{o(1)})\) expected-time. Moreover, we also present a \(\textsf{poly}(nt)\) time and \(O(\log ^2 (nt))\) space deterministic algorithm.
In fact, we solve a more general problem called the \(\textsf{SimulSubsetSum}\). This problem was introduced by Kane 2010. Given k instances of Subset Sum, it asks to decide whether there is a ‘common’ solution to all the instances. Kane gave a logspace algorithm for this problem. We show a polynomial-time reduction from \(\mathsf {Subset~Product}\) to \(\textsf{SimulSubsetSum}\) and also give efficient algorithm for the latter. Our algorithms use multivariate FFT, power series and number-theoretic techniques, introduced by Jin and Wu (SOSA 2019) and Kane (2010).
The full version is available at https://drive.google.com/file/d/1xUX29eVZ_2J1zv062dH4V8Yc8NhqwV1X/view?usp=share_link.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Expected time complexity is \(\exp (O(\sqrt{\log t \log \log t}))\), which is smaller than \(t^{O(1/\sqrt{\log \log t})} =t^{o(1)}\), which will be the time taken in the next step. Moreover, we are interested in randomized algorithms, hence expected run-time is.
References
Bazgan, C., Hugot, H., Vanderpooten, D.: Solving efficiently the 0–1 multi-objective knapsack problem. Comput. Oper. Res. 36(1), 260–279 (2009)
Bellman, R.E.: Dynamic programming (1957)
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
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)
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)
Contini, S., Lenstra, A.K., Steinfeld, R.: VSH, an efficient and provable collision-resistant hash function. In: Vaudenay, S. (ed.) EUROCRYPT 2006. LNCS, vol. 4004, pp. 165–182. Springer, Heidelberg (2006). https://doi.org/10.1007/11761679_11
Draziotis, K.A., Martidis, V., Tiganourias, S.: Product subset problem: applications to number theory and cryptography. arXiv preprint arXiv:2002.07095 (2020)
Dutta, P., Rajasree, M.S.: Algebraic algorithms for variants of subset sum. In: Balachandran, N., Inkulu, R. (eds.) CALDAM 2022. LNCS, vol. 13179, pp. 237–251. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-95018-7_19
Esser, A., May, A.: Low weight discrete logarithm and subset sum in 20. 65n with polynomial memory. memory 1, 2 (2020)
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
Garey, M.R., Johnson, D.S.: Computers and Intractability, vol. 174. Freeman, San Francisco (1979)
Helm, A., May, A.: Subset sum quantumly in 1.17\(\hat{\,}\) n. In: 13th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2018). pp. 1–15. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018)
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)
Jin, C., Wu, H.: A simple near-linear pseudopolynomial time randomized algorithm for subset sum. arXiv preprint arXiv:1807.11597 (2018)
Kane, D.M.: Unary subset-sum is in logspace. arXiv preprint arXiv:1012.1336 (2010)
Kovalyov, M.Y., Pesch, E.: A generic approach to proving np-hardness of partition type problems. Discret. Appl. Math. 158(17), 1908–1912 (2010)
Lenstra, H.W., Pomerance, C.: A rigorous time bound for factoring integers. J. Am. Math. Soc. 5(3), 483–516 (1992)
Lewis, H.R.: Computers and Intractability. A Guide to the Theory of NP-Completeness, Freeman, San Francisco (1983)
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
Nagura, J.: On the interval containing at least one prime number. Proc. Jpn. Acad. 28(4), 177–181 (1952)
Pferschy, U., Schauer, J., Thielen, C.: Approximating the product knapsack problem. Optim. Lett. 15, 2529–2540 (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Dutta, P., Rajasree, M.S. (2023). Efficient Reductions and Algorithms for Subset Product. In: Bagchi, A., Muthu, R. (eds) Algorithms and Discrete Applied Mathematics. CALDAM 2023. Lecture Notes in Computer Science, vol 13947. Springer, Cham. https://doi.org/10.1007/978-3-031-25211-2_1
Download citation
DOI: https://doi.org/10.1007/978-3-031-25211-2_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-25210-5
Online ISBN: 978-3-031-25211-2
eBook Packages: Computer ScienceComputer Science (R0)