Build a solution for the 0-1 Knapsack problem using backtracking algorithm. We have 5 items with price and weight:
1. $50 20
2. $30 5
3. $40 10
4. $10 5
5. $20 4
Limitation on the weight is: W = 21
Find the bound for the root node, find a solution node using backtracking algorithm.
Print all visited prior to solution nodes.
Use the following notation for each node: first digit it the row number, second digit is a position of that node in the row from the very left. Example: the root is (0), the right child of the root is (1.2), the very right (last) node on the third from the root level row is (3.8) and so on.
Note: For the solution node just type in a bound value, name and all computed parameters.