Take 1-D knapsack problem as an example:
How to model an optimization problem
- Choose some decision variables
- Express the problem constraints in terms of these variables
- Express the objective function
In 1-D knapsack
The difficulty comes from the exponential growth of search space:
Suppose there are 50 items to pick, then we have choices. If we use 1 milisecond to check if a solution is valid, it needs 1,285,273,866 centuries.
So We have to somehow narrow the search space …