Description: 0_1 knapsack problem, backtracking the backpacking problem
0-l knapsack problem is a subset selection problem. In general, the 0-1 knapsack problem is NP hard. 0-1 knapsack
The solution space for the problem can be represented by a subset of trees. Unpack the backtracking of 0-1 knapsack problem and the backtracking method of loading problem
Be like. When searching for a solution space tree, the search goes into its left child tree as long as the left child node is a viable node. when
The right subtree is likely to contain the optimal solution before entering the right subtree search. Otherwise, cut the right subtree. Let's say r is the current surplus
The total value of the goods; Cp is the current value; Bestp is the current optimal value. When cp+r is less than or equal to bestp, it can be cut to the right
The subtree. The better way to compute the upper bound of the solution in the right subtree is to sort the remaining items in terms of the weight of their units, and then
Load the item in turn until it is loaded
To Search:
File list (Check if you may need any files):