In another post I demonstrated how to develop a heuristic to solve the knapsack problem. We managed to solve the problem quite well and had an optimality gap of about 1%, that is, our solution was 1% away from the optimal solution. Here I’d like to demonstrate, how simple it is to solve the Knapsack… Read more Find optimal Solution to Knapsack Problem with Linear Programming in R

# Tag: Knapsack Problem

## Solve Knapsack Problem with Heuristics in R

In this post I’ll show a way how to solve the Knapsack Problem applying a simple greedy improvement heuristic and how to implement it in R. What is the Knapsack Problem? On Wikipedia, you find the following definition: “The knapsack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a… Read more Solve Knapsack Problem with Heuristics in R