...

/

Integer Linear Programming (ILP)

Integer Linear Programming (ILP)

Learn what is integer linear programming (ILP) and how dynamic programming (DP) can be used to solve it.

Integer linear programming (ILP) is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers. It’s a special case of LP, where the solution space is the set of integers. ILPs are used in optimization, resource allocation, etc.

Formulation of an ILP

When both the objective function and constraints are linear, but the search space is restricted to the integers Z\Z, the optimization problem is said to be an ILP. The general form of an ILP is given as follows:

where cRdc \in \R^d, ARm×dA \in \R^{m \times d} , and bRmb \in \R^m.

As an example, consider the knapsack problem, where the task is to pack a set of NN items with different weights and values into a sack with a limited capacity CC so that the total value of the packed items is maximized. The objective for the knapsack problem can be written as follows:

where xi{0,1}x_i \in \{0,1\} is a binary variable representing whether the ithi^{th} item is selected or not, vi={1,5,10,3,8,5}v_i=\{1,5,10,3,8,5\} ...