2. Consider the 0 - 1 knapsack problem:
max { ̓̓_j=1^n c_j x_j : ̓̓_j=1^n a_j x_j ≤ b, x ∈ {0, 1}^n }
with a_j, c_j > 0 for j = 1, . . . , n.
(a) Show that if c_1/a_1 ≥ ≥ c_n/a_n > 0, ̓̓_j=1^{r-1} a_j ≤ b and ̓̓_j=1^r a_j > b, the solution of the LP relaxation is x_j = 1 for j = 1, . . . , r - 1, x_r = (b - ̓̓_j=1^{r-1} a_j) / a_r, and x_j = 0 for j > r.
(b) Solve the instance
max 17x_1 + 10x_2 + 25x_3 + 17x_4
5x_1 + 3x_2 + 8x_3 + 7x_4 ≤ 12
x ∈ {0, 1}^4
by branch-and-bound. Always branch first on the node with the best bound. You must number the nodes as you explore them. Name the first node as "Root". Create a table with one row for each node. At each row, indicate the value of the variables in the solution of the node, the capacity used, the profit of the solution (or indicate its infeasibility) and the status associated with the node (branched, pruned by infeasibility, pruned by integrality or pruned by quality).