An algorithm for the computation of knapsack functions
暂无分享,去创建一个
Knapsack problems have been studied in [l]-[4]. See these references for physical applications. Modified dynamic programming algorithms are given in [3] and [4]. The algorithm in [3], presented in a complicated theoretical context, is difficult to conceptualize. The algorithm in [4] is presented in a network context of considerable complexity. Both algorithms compute the knapsack function for all arguments. From the work presented here it is evident that the problem can be solved as a relatively simple enumeration with a very simple algorithm. We define the knapsack function in terms of an equality constraint, without the use of a slack variable. An enumeration is then made for only feasible arguments of the knapsack function. A major computational advantage is thereby gained. Our algorithm has another computational advantage by being a single pass algorithm. Backtracking is optional. Equality constraint problems can be solved without restrictions on the constants using our algorithm. The method in [4] requires a unity coefficient in the constraint. Thus we obtain greater generality. The algorithm presented here should be thought of as replacing the basic algorithms in [3] and [4]. The important theoretical work developed in [3] and [4] should be used to calculate the knapsack function for large arguments. The knapsack problem is defined as: find xi , j = l,..., n that
[1] Ralph E. Gomory,et al. The Theory and Computation of Knapsack Functions , 1966, Oper. Res..
[2] Jeremy F. Shapiro,et al. A Finite Renewal Algorithm for the Knapsack and Turnpike Models , 1967, Oper. Res..
[3] R. Gomory,et al. A Linear Programming Approach to the Cutting-Stock Problem , 1961 .
[4] Ralph E. Gomory,et al. A Linear Programming Approach to the Cutting Stock Problem---Part II , 1963 .