Question: BINARY KNAPSACK PROBLEM (easy68 simulator- assembly language) Definition The binary knapsack problem is defined as follows: Given a set of objects, O = O1, O2,

BINARY KNAPSACK PROBLEM (easy68 simulator- assembly language) Definition The binary knapsack problem is defined as follows: Given a set of objects, O = O1, O2, , On, with weights W = W1, W2, , Wn and values V = V1, V2, , Vn, and a knapsack (bag) with a maximum weight capacity K. The problem is to find the set of objects S with maximum value without exceeding a weight limit K. Project Write and test an Assembly Code for an instance of 16 objects. The code should print the set of objects, total weight and value of the best configuration. The code must be able to find the best solution for any set of 16 objects with randomly selected weights and values in the range 30 to 90, and knapsack weight limits of 400, 500 and 600. The Assembly Code should use only registers to find the solution, it is not allowed to build any data structures in the memory (Memory is used only for W, V and K parameters to be read). The code should be compact; 20 to 30 instructions only Hint: A brute force search is easy to implement with two nested loops in Assembly Language; No AI !

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!