Abstract

The subset sum problem (SSP) can be briefly stated as: given a target integer E and a set A containing n positive integer a j , find a subset of A summing to E. The density d of an SSP instance is defined by the ratio of n to m, where m is the logarithm of the largest integer within A. Based on the structural and statistical properties of subset sums, we present an improved enumeration scheme for SSP, and implement it as a complete and exact algorithm (EnumPlus). The algorithm always equivalently reduces an instance to be low-density, and then solve it by enumeration. Through this approach, we show the possibility to design a sole algorithm that can efficiently solve arbitrary density instance in a uniform way. Furthermore, our algorithm has considerable performance advantage over previous algorithms. Firstly, it extends the density scope, in which SSP can be solved in expected polynomial time. Specifically, It solves SSP in expected O(nlogn) time when density \(d \geq c\cdot \sqrt{n}/\log{n}\), while the previously best density scope is d ≥ c·n/(logn)2. In addition, the overall expected time and space requirement in the average case are proven to be O(n 5logn) and O(n 5) respectively. Secondly, in the worst case, it slightly improves the previously best time complexity of exact algorithms for SSP. The worst-case time complexity of our algorithm is proved to be O(n·2n/2 − c·2n/2 + n), while the previously best result is O(n·2n/2).KeywordsKnapsack ProblemExact AlgorithmBlock BoundLattice ReductionOriginal InstanceThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call