Space-Efficient Approximations for Subset Sum

A. Gál, Jing-Tang Jang, N. Limaye, M. Mahajan, Karteek Sreenivasaiah
{"title":"Space-Efficient Approximations for Subset Sum","authors":"A. Gál, Jing-Tang Jang, N. Limaye, M. Mahajan, Karteek Sreenivasaiah","doi":"10.1145/2894843","DOIUrl":null,"url":null,"abstract":"SubsetSum is a well-known NP-complete problem: given t ∈ Z+ and a set S of m positive integers, output YES if and only if there is a subset S′⊆S such that the sum of all numbers in S′ equals t. The problem and its search and optimization versions are known to be solvable in pseudopolynomial time in general. We develop a one-pass deterministic streaming algorithm that uses space O(log t / ε) and decides if some subset of the input stream adds up to a value in the range {(1 ± ϵ)t}. Using this algorithm, we design space-efficient fully polynomial-time approximation schemes (FPTAS) solving the search and optimization versions of SubsetSum. Our algorithms run in O(1 / ϵ m2) time and O(1 / ϵ) space on unit-cost RAMs, where 1 + ϵ is the approximation factor. This implies constant space quadratic time FPTAS on unit-cost RAMs when ϵ is a constant. Previous FPTAS used space linear in m. In addition, we show that on certain inputs, when a solution is located within a short prefix of the input sequence, our algorithms may run in sublinear time. We apply our techniques to the problem of finding balanced separators, and we extend our results to some other variants of the more general knapsack problem. When the input numbers are encoded in unary, the decision version has been known to be in log space. We give streaming space lower and upper bounds for unary SubsetSum (USS). If the input length is N when the numbers are encoded in unary, we show that randomized s-pass streaming algorithms for exact SubsetSum need space Ω (√N/s) and give a simple deterministic two-pass streaming algorithm using O(√N log N) space. Finally, we formulate an encoding under which USS is monotone and show that the exact and approximate versions in this formulation have monotone O(log2t) depth Boolean circuits. We also show that any circuit using ε-approximator gates for SubsetSum under this encoding needs Ω(n/logn) gates to compute the disjointness function.","PeriodicalId":198744,"journal":{"name":"ACM Transactions on Computation Theory (TOCT)","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-06-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Computation Theory (TOCT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2894843","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

SubsetSum is a well-known NP-complete problem: given t ∈ Z+ and a set S of m positive integers, output YES if and only if there is a subset S′⊆S such that the sum of all numbers in S′ equals t. The problem and its search and optimization versions are known to be solvable in pseudopolynomial time in general. We develop a one-pass deterministic streaming algorithm that uses space O(log t / ε) and decides if some subset of the input stream adds up to a value in the range {(1 ± ϵ)t}. Using this algorithm, we design space-efficient fully polynomial-time approximation schemes (FPTAS) solving the search and optimization versions of SubsetSum. Our algorithms run in O(1 / ϵ m2) time and O(1 / ϵ) space on unit-cost RAMs, where 1 + ϵ is the approximation factor. This implies constant space quadratic time FPTAS on unit-cost RAMs when ϵ is a constant. Previous FPTAS used space linear in m. In addition, we show that on certain inputs, when a solution is located within a short prefix of the input sequence, our algorithms may run in sublinear time. We apply our techniques to the problem of finding balanced separators, and we extend our results to some other variants of the more general knapsack problem. When the input numbers are encoded in unary, the decision version has been known to be in log space. We give streaming space lower and upper bounds for unary SubsetSum (USS). If the input length is N when the numbers are encoded in unary, we show that randomized s-pass streaming algorithms for exact SubsetSum need space Ω (√N/s) and give a simple deterministic two-pass streaming algorithm using O(√N log N) space. Finally, we formulate an encoding under which USS is monotone and show that the exact and approximate versions in this formulation have monotone O(log2t) depth Boolean circuits. We also show that any circuit using ε-approximator gates for SubsetSum under this encoding needs Ω(n/logn) gates to compute the disjointness function.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
子集和的空间效率逼近
SubsetSum是一个著名的np完全问题:给定t∈Z+,有一个m个正整数的集合S,当且仅当存在一个子集S’≥t且S’中所有数的和等于t时,输出YES。该问题及其搜索优化版本已知在一般伪多项式时间内可解。我们开发了一种单遍确定性流算法,它使用空间O(log t / ε),并决定输入流的某个子集是否加起来等于{(1±λ)t}范围内的值。利用该算法,我们设计了空间高效的全多项式时间近似方案(FPTAS)来解决SubsetSum的搜索和优化版本。我们的算法在单位成本ram上运行在O(1 /御柱m2)时间和O(1 /御柱)空间中,其中1 +御柱是近似因子。这意味着当λ为常数时,单位成本ram上的常数空间二次时间FPTAS。以前的FPTAS在m中使用空间线性。此外,我们表明,在某些输入上,当一个解位于输入序列的短前缀内时,我们的算法可能在亚线性时间内运行。我们将我们的技术应用于寻找平衡分隔符的问题,并将我们的结果扩展到更一般的背包问题的一些其他变体。当输入数字以一元编码时,决策版本已知在日志空间中。我们给出一元SubsetSum (USS)的流空间下界和上界。如果输入长度为N,当数字以一元编码时,我们证明了精确SubsetSum的随机s-pass流算法需要Ω(√N/s)空间,并给出了一个简单的确定性两通道流算法,使用O(√N log N)空间。最后,我们给出了USS为单调的编码,并证明了该编码的精确和近似版本具有单调的O(log2t)深度布尔电路。我们还证明,在这种编码下,任何对SubsetSum使用ε-近似门的电路都需要Ω(n/logn)门来计算不相交函数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A Polynomial Degree Bound on Equations for Non-rigid Matrices and Small Linear Circuits Optimal Distribution-Free Sample-Based Testing of Subsequence-Freeness with One-Sided Error Approximate Degree, Weight, and Indistinguishability The (Coarse) Fine-Grained Structure of NP-Hard SAT and CSP Problems Multiplicative Parameterization Above a Guarantee
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1