A Knapsack problem is to select among n types of items of various values and weights to fill a knapsack of weight-carrying capacity b. The problem is NP-complete and has a dynamic programming algorithm of time complexity O(n b). If the given b is large, the optimum solution is periodic with its period equals to the weight of the best item. We introduce a new O(n 2 w 1 log (n w1)) algorithm that solves all instances b of the problem for a given set of items, where w1 is the weight of the best item and is usually much smaller than b. We conjecture that there are many other NP-complete number problems whose optimum solutions also become periodic for large instances and hence can be solved by similar algorithms. Keywords: Knapsack, dynamic programming, shortest-path, NP, pseudo-polynomial
The authors of these documents have submitted their reports to this technical report series for the purpose of non-commercial dissemination of scientific work. The reports are copyrighted by the authors, and their existence in electronic format does not imply that the authors have relinquished any rights. You may copy a report for scholarly, non-commercial purposes, such as research or instruction, provided that you agree to respect the author's copyright. For information concerning the use of this document for other than research or instructional purposes, contact the authors. Other information concerning this technical report series can be obtained from the Computer Science and Engineering Department at the University of California at San Diego, email@example.com.
[ Search ]