knapsack_rational_test, a C code which calls knapsack_rational_test(), which solves the rational knapsack problem, in which a knapsack of limited weight capacity is filled with profitable items. This variation of the 0/1 knapsack problem allows a fractional part of an item to be included in the knapsack. The result is an upper bound on the maximum possible profit for the 0/1 knapsack problem.
The information on this web page is distributed under the MIT license.
knapsack_rational, a C code which solves the rational knapsack problem, in which a knapsack of limited weight capacity is filled with profitable items. This variation of the 0/1 knapsack problem allows a fractional part of an item to be included in the knapsack. The result is an upper bound on the maximum possible profit for the 0/1 knapsack problem.