arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2011.03819cs.DS
收藏

子集和的快速低空间算法

Fast Low-Space Algorithms for Subset Sum

Ce Jin, Nikhil Vyas, Ryan Williams

摘要:

我们考虑规范子集和问题:给定一个正整数列表$a_1,\ldots,a_n$和一个目标整数$t$,其中$t > a_i$对所有$i$,确定是否存在一个$S \subseteq [n]$,使得$\sum_{i \in S} a_i = t$。著名的伪多项式时间动态规划算法[Bellman,1957]在$O(nt)$时间内求解子集和,同时需要$Ω(t)$空间。在本文中,我们提出的算法子集和$\tilde O(nt)$运行时间和更低的空间要求比贝尔曼的算法,以及以前的工作。我们表明,子集和可以解决在$\tilde O(nt)$时间和$O(\log(nt))$空间与访问$O(\log n \log \log n+\log t)$随机位。这显著改进了Bringmann的$\tilde O(n t^{1+\varepsilon})$-时间、$\tilde O(n\log t)$-空间算法(SODA 2017)。我们还给出了一个$\tilde O(n^{1+\varepsilon}t)$-时间,$O(\log(nt))$-空间随机算法,改进了Elberfeld,Jakoby和Tantau(FOCS 2010)和Kane(2010)的$(nt)^{O(1)}$-时间$O(\log(nt))$-空间算法。此外,我们还给出了一个$\mathrm{poly} \log(nt)$-空间,$\tilde O(n^2 t)$-时间的确定性算法.我们还研究了子集和的时空权衡。对于参数$1\le k\le \min\{n,t\}$,我们提出了一个随机算法,运行在$\tilde O((n+t)\cdot k)$时间和$O((t/k) \mathrm{polylog} (nt))$空间。作为结果的应用,我们给出了子集和的"弱" $\varepsilon$-逼近的$\tilde{O}(\min\{n^2/\varepsilon, n/\varepsilon^2\})$-时间和$\mathrm{polylog}(nt)$-空间算法.

英文摘要:

We consider the canonical Subset Sum problem: given a list of positive integers $a_1,\ldots,a_n$ and a target integer $t$ with $t > a_i$ for all $i$, determine if there is an $S \subseteq [n]$ such that $\sum_{i \in S} a_i = t$. The well-known pseudopolynomial-time dynamic programming algorithm [Bellman, 1957] solves Subset Sum in $O(nt)$ time, while requiring $Ω(t)$ space. In this paper we present algorithms for Subset Sum with $\tilde O(nt)$ running time and much lower space requirements than Bellman's algorithm, as well as that of prior work. We show that Subset Sum can be solved in $\tilde O(nt)$ time and $O(\log(nt))$ space with access to $O(\log n \log \log n+\log t)$ random bits. This significantly improves upon the $\tilde O(n t^{1+\varepsilon})$-time, $\tilde O(n\log t)$-space algorithm of Bringmann (SODA 2017). We also give an $\tilde O(n^{1+\varepsilon}t)$-time, $O(\log(nt))$-space randomized algorithm, improving upon previous $(nt)^{O(1)}$-time $O(\log(nt))$-space algorithms by Elberfeld, Jakoby, and Tantau (FOCS 2010), and Kane (2010). In addition, we also give a $\mathrm{poly} \log(nt)$-space, $\tilde O(n^2 t)$-time deterministic algorithm. We also study time-space trade-offs for Subset Sum. For parameter $1\le k\le \min\{n,t\}$, we present a randomized algorithm running in $\tilde O((n+t)\cdot k)$ time and $O((t/k) \mathrm{polylog} (nt))$ space. As an application of our results, we give an $\tilde{O}(\min\{n^2/\varepsilon, n/\varepsilon^2\})$-time and $\mathrm{polylog}(nt)$-space algorithm for "weak" $\varepsilon$-approximations of Subset Sum.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑