We introduce a new algorithm for subset sum problem. For any given problem with A(1),A(2),…,A(n-1),A(n),and M, the time complexity of the algorithm is O(nlog2(M+1)+1)and the space complexity is O(n), where A(1),A(2),…,A(n-1),A(n),and M are all positive integers. This result is better than that of the two-list algorithm when M is relatively small.
参考文献
相似文献
引证文献
引用本文
姜新文,彭立宏.子集和问题的分治求解[J].国防科技大学学报,2004,26(6):103-106. JIANG Xinwen, PENG Lihong. A New Algorithm for Subset Sum Problem with Time Complexity[J]. Journal of National University of Defense Technology,2004,26(6):103-106.