Mathematics of knapsack problems
Defined $I={1,2,…,N}$ is the set of goods. When the weight of each item $i in I$ is $w_i$ value and the upper limit of the total weight of $ v_i$ item is $W$, the following is called the knapsack problem. $$max ∑{i in I}v_iw_i s.t. ∑{i in I}v_iw_ile Wxin mathbb{N}(forall in I)$$ where $x_i$ represents…