We are given a knapsack of capacity m and a set of n objects numbered 1,2,…,n. Each object i has weight wi and profit pi.
Let x = [x1, x2,…, xn] be a solution vector in which xi = 0 if object i is not in the knapsack, and xi = 1 if it is in the knapsack.
The goal is to find a subset of objects to put into the knapsack so that the capacity is not exceeded.