Fast Modular Subset Sum using Linear Sketching

Given n positive integers, the Modular Subset Sum problem asks if a subset adds up to a given target t modulo a given integer m. This is a natural generalization of the Subset Sum problem (where m=+\infty) with ties to additive combinatorics and cryptography. Recently, in [Bringmann, SODA'17] and [Koiliaris and Xu, SODA'17], efficient algorithms have been developed for the non-modular case, running in near-linear pseudo-polynomial time. For the modular case, however, the best known algorithm by Koiliaris and Xu [Koiliaris and Xu, SODA'17] runs in time O~(m^{5/4}). In this paper, we present an algorithm running in time O~(m), which matches a recent conditional lower bound of [Abboud et al.'17] based on the Strong Exponential Time Hypothesis. Interestingly, in contrast to most previous results on Subset Sum, our algorithm does not use the Fast Fourier Transform. Instead, it is able to simulate the "textbook" Dynamic Programming algorithm much faster, using ideas from linear sketching. This is one of the first applications of sketching-based techniques to obtain fast algorithms for combinatorial problems in an offline setting.

[1]  John E. Olson,et al.  An addition theorem modulo p , 1968 .

[2]  Daniel Lokshtanov,et al.  Saving space by algebraization , 2010, STOC '10.

[3]  Shachar Lovett,et al.  Near-optimal Linear Decision Trees for k-SUM and Related Problems , 2019, J. ACM.

[4]  David Pisinger,et al.  Linear Time Algorithms for Knapsack Problems with Bounded Weights , 1999, J. Algorithms.

[5]  Marco Treiber Dynamic Programming (DP) , 2013 .

[6]  Dvir Shabtay,et al.  SETH-based Lower Bounds for Subset Sum and Bicriteria Path , 2017, SODA.

[7]  Yahya Ould Hamidoune,et al.  On complete subsets of the cyclic group , 2007, J. Comb. Theory, Ser. A.

[8]  Ulrich Pferschy,et al.  Dynamic Programming Revisited: Improving Knapsack Algorithms , 1999, Computing.

[9]  Friedrich Eisenbrand,et al.  Proximity Results and Faster Algorithms for Integer Programming Using the Steinitz Lemma , 2020, ACM Trans. Algorithms.

[10]  John E. Olson,et al.  Sums of sets of group elements , 1975 .

[11]  Endre Szemerédi,et al.  On a conjecture of Erdös and Heilbronn , 1970 .

[12]  F. Heide A polynomial linear search algorithm for the n-dimensional knapsack problem , 1983, STOC.

[13]  Micha Sharir,et al.  The Decision Tree Complexity for k-SUM is at most Nearly Quadratic , 2016, ArXiv.

[14]  Ryan Williams,et al.  Losing Weight by Gaining Edges , 2013, ESA.

[15]  David Pisinger,et al.  Dynamic Programming on the Word RAM , 2003, Algorithmica.

[16]  A. Ziv,et al.  Theorem in the Additive Number Theory , 2022 .

[17]  Alexandr Andoni,et al.  Parallel algorithms for geometric graph problems , 2013, STOC.

[18]  Richard Ryan Williams,et al.  Strong ETH Breaks With Merlin and Arthur: Short Non-Interactive Proofs of Batch Evaluation , 2016, CCC.

[19]  Mohammad Taghi Hajiaghayi,et al.  Fast algorithms for knapsack via convolution and prediction , 2018, STOC.

[20]  Sudipto Guha,et al.  Analyzing graph structure via linear measurements , 2012, SODA.

[21]  Bruce M. Kapron,et al.  Dynamic graph connectivity in polylogarithmic worst case time , 2013, SODA.

[22]  Russell Impagliazzo,et al.  Nondeterministic Extensions of the Strong Exponential Time Hypothesis and Consequences for Non-reducibility , 2016, Electron. Colloquium Comput. Complex..

[23]  Yoshio Okamoto,et al.  On Problems as Hard as CNF-SAT , 2011, 2012 IEEE 27th Conference on Computational Complexity.

[24]  Karl Bringmann,et al.  A Near-Linear Pseudopolynomial Time Algorithm for Subset Sum , 2016, SODA.

[25]  Christos Tzamos,et al.  Capacitated Dynamic Programming: Faster Knapsack and Graph Algorithms , 2018, ICALP.

[26]  David P. Woodru Sketching as a Tool for Numerical Linear Algebra , 2014 .

[27]  Rusins Freivalds,et al.  Probabilistic Machines Can Use Less Running Time , 1977, IFIP Congress.

[28]  Van Vu,et al.  A Structural Approach to Subset-Sum Problems , 2008, 0804.3211.

[29]  Jean Cardinal,et al.  Solving k-SUM Using Few Linear Queries , 2015, ESA.