Knapsack Problem

Page created by Lucas Thomas and Yingruo Liu for CS395 Spring2020

The knapsack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.



How many objects are there?

How much weight can you carry?

    



Pseudocode

Input object count and the max weight for the knapsack, or you could choose to randomize it