Question: In the binary knapsack problem, the goal is to solve the optimization problem: [ max _{boldsymbol{x} in{0,1}^{n}} boldsymbol{p}^{top} boldsymbol{x} ] subject to the constraints [

In the binary knapsack problem, the goal is to solve the optimization problem:

\[ \max _{\boldsymbol{x} \in\{0,1\}^{n}} \boldsymbol{p}^{\top} \boldsymbol{x} \]


subject to the constraints \[ \mathbf{A} \boldsymbol{x} \leqslant \boldsymbol{c} \]
where \(\boldsymbol{p}\) and \(\boldsymbol{w}\) are \(n \times 1\) vectors of non-negative numbers, \(\mathbf{A}=\left(a_{i j}\right)\) is an \(m \times n\) matrix, and \(\boldsymbol{c}\) is an \(m \times 1\) vector. The interpretation is that \(x_{j}=1\) or 0 depending on whether item \(j\) with value \(p_{j}\) is packed into the knapsack or not, \(j=1, \ldots, n\); The variable \(a_{i j}\) represents the \(i\)-th attribute (e.g., volume, weight) of the \(j\)-th item. Associated with each attribute is a maximal capacity, e.g., \(c_{1}\) could be the maximum volume of the knapsack, \(c_{2}\) the maximum weight, etc.
Write a CE program to solve the Sento1.dat knapsack problem at http://people.brunel.ac.uk/ mastjjb/jeb/orlib/files/mknap2.txt, as described in [16].

Step by Step Solution

3.44 Rating (176 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

We provide Python code and example output for the crossentropy algo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Statistical Techniques in Business Questions!