/KnapsackProblem

Optimizing Knapsack Problem using Gurobi

Primary LanguageJupyter NotebookMIT LicenseMIT

Knapsack Problem

In algorithmics, the knapsack problem, commonly abbreviated by KP is a combinatorial optimization problem, that is, it looks for the best solution among a finite set of possible solutions to a problem. Models a situation analogous to filling a knapsack, unable to support more than a certain weight, with all or part of a set of items, each with a specific weight and value. Items placed in the knapsack should maximize the total value without exceeding the maximum weight.

Files format

Each file contains n + 1 rows. The first row contains two integers, the first is the number of items and the second is the capacity of the knapsack, K. From the second row onwards it contains the data for each of the objects (value, weight)

For more information (in Spanish): PDF format or in Jupyter format.

To see the results obtained of the files in data: results