INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
INTEGER PROGRAMMING
1. Integer Programming
In Integer programming, the values of some variables must be integer numbers. For example, if the
variable represents for an action such as opening or non-opening a facility, it can take only value of 0 or
1.
The integer programming problem cannot be solved by rounding the solution of the linear problem to
the nearest integer values. There are 2 shortages of this approach. Firstly, the rounding solution does
not ensure that the solution is a feasible solution. Secondly, even the rounding solution is feasible, it
does not ensure that, it is the optimal solution.
The following example illustrates two problems of rounding approach.
Linear Programming Integer Programming
Max 3x1 + 2x2 Max 3x1 + 2x2
s.t. 3x1 + x2 < 9 s.t. 3x1 + x2 < 9
x1 + 3x2 < 7 x1 + 3x2 < 7
-x1 + x2 < 1 -x1 + x2 < 1
x1, x2 > 0 x1, x2 > 0
x1, x2 > 0 and integer
Graphical Presentation
x
23 Z= 3x1 +
2 Optimal
2x2 (2.5, 1.5)
1
1 2 3x
1
If the optimal solution for the LP problem is: x1 = 2.5, x2 = 1.5. The objective value function is Z=
10.5
Integer Programming 1
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
x
23 Z= 3x1 +
2 2xInfeasible
2 solution (3, 2)
Optimal (2.5, 1.5)
1 Not optimal solution (2, 1)
1 2 3x
1
For the IP problem the optimal solution is at x1 = 3, x2 = 0 and Z=9. Round up or round down the
solution of the LP problem cannot lead to the optimal solution.
2. Branch and Bound Algorithm for IP
Theorem 1
Give an LP problem under the standard form
Linear Programming Integer Programming
Maximize ZL= Maximize ZI=
Subject to Subject to
and and , some xi are integer
By adding some integer constraint on the variable xi the optimal objective function value of IP is
always equal or worse than the LP
Theorem 2
By adding one or more constraints to the a LP problem, the optimal objective function value of the
revision LP problem is always equal or worse than the original LP problem
Integer Programming 2
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Branch and Bound Algorithm for IP
The idea of Branch & Bound Algorithm is try to find a solution that satisfies all constrains, including
integer constraints. The objective function value corresponding to this solution is set as the BOUND of
the problem.
When the feasible solution has not found, the bound is set as Infinity (-∞ for the maximizing problem)
(+∞ for the minimizing problem)
During the process of exploring sub problems,
if the sub problem GIVES a feasible solution with better objective function value, the BOUND
will be UPDATED. (Scenario 1)
if the sub problem CAN GIVE a better objective function value, it will be continued exploring,
i.e., dividing into 2 sub problems. (Scenario 2)
If the sub problem CANNOT GIVE a better objective function value, the sub problem will be
discarded. (Scenario 3)
Example 1
Max Z = 9x1 + 5x2 + 6x3 + 4x4
Subject to:
6x1 + 3x2 + 5x3 + 2x4 ≤ 10
x3 + x4 ≤ 1
-x1 + x3 ≤ 0
-x2 + x4 ≤ 0
xi ≤ 1, xi ≥ 0, xi integer
At initial, no feasible solution is known the Bound, i.e. Z*, is set as -∞, the optimal solution X* is
empty.The process of branch and bound for the above example is given in the following tree:
Integer Programming 3
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Integer Programming 4
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Example 2
Max Z = 4x1 - 2x2 + 7x3 - x4
Subject to:
x1 + 5x3 ≤ 10 (1)
x1 + x2 - x3 ≤ 1 (2)
6x1 + 5x2 ≤ 0 (3)
-x1 + 2x3 – 2x4 ≤ 3 (4)
xi ≥ 0, xi integer x1, x2, x3, x4 (5)
Sometimes preprocessing the constraints can make the problem become easier for solving. For the
above example:
From constraints (3) and (5) => x1 = x2 = 0
From constraints (1) => x3 ≤ 2
So after simplifying
Max Z = 4x1 - 2x2 + 7x3 - x4
Subject to:
x3 ≤ 2
2x3 – 2x4 ≤ 3
x1 = x2 = 0
xi ≥ 0, xi integer x1, x2, x3,(5)
At initial, no feasible solution is known the Bound, i.e. Z*, is set as -∞, the optimal solution X* is
empty.The process of branch and bound for the above example is given in the following tree:
Integer Programming 5
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Integer Programming 6
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Assignment
Question 1: Suppose that a mathematical model fits linear programming except for the restrictions that
At least one of the following two inequalities holds:
x1 + x2 + x3 + x4 ≤ 4
3x1 - x2 - x3 + x4 ≤ 3.
At least two of the following four inequalities holds:
5x1 + 3x2 + 3x3 - x4 ≤ 10
2x1 + 5x2 - x3 + 3x4 ≤ 10
-x1 + 3x2 + 5x3 + 3x4 ≤ 10
3x1 - x2 + 3x3 + 5x4 ≤ 10.
Show how to reformulate these restrictions to fit an MIP model
Question 2: Use the BIP branch-and-bound algorithm presented in Sec. 12.6 to solve the following
problem interactively.
Minimize Z = 5x1 + 6x2 + 7x3 + 8x4 + 9x5,
subject to
3x1 - x2 + x3 + x4 - 2x5 ≥ 2
x1 + 3x2 - x3 - 2x4 + x5 ≥ 0
-x1 - x2 + 3x3 + x4 + x5 ≥ 1
and xj is binary, for j = 1, 2, . . . , 5.
Question 3: Use the IP branch-and-bound algorithm solve the following problem interactively.
Maximize Z = 220x1 + 80x2,
subject to
5x1 + 2x2 ≤ 16
2x1 - x2 ≤ 4
-x1 + 2x2 ≤ 4 and
x1 ≥ 0, x2 ≥ 0 x1, x2 are integers
Integer Programming 7
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Question 4: Use the MIP branch-and-bound algorithm to solve the following MIP problem
interactively.
Maximize Z = 5x1 + 4x2 + 4x3 + 2x4,
subject to
x1 + 3x2 + 2x3 + x4 ≤ 10
5x1 + x2 + 3x3 + 2x4 ≤ 15
x1 + x2 + x3 + x4 ≤ 6
and xj ≥ 0, for j = 1, 2, 3, 4 xj is integer, for j = 1, 2, 3.
Question 5: Use the MIP branch-and-bound algorithm to solve the following MIP problem
interactively.
Maximize Z = 3x1 + 4x2 + 2x3 + x4 + 2x5,
subject to
2x1 + x2 + x3 + x4 + x5 ≤ 3
-x1 + 3x2 + x3 - x4 - 2x5 ≤ 2
2x1 + x2 - x3 + x4 + 3x5 ≤ 1
and xj ≥ 0, for j = 1, 2, 3, 4, 5 xj is binary, for j = 1, 2, 3.
Question 6: Use the MIP branch-and-bound algorithm to solve the following MIP problem
interactively.
Minimize Z = 5x1 + x2 + x3 + 2x4 + 3x5,
subject to
x2 - 5x3 + x4 + 2x5 ≥ -2
5x1 - x2 + x5 ≥ 7
x1 + x2 + 6x3 + x4 ≥ 4
and xj ≥ 0, for j = 1, 2, 3, 4, 5 xj is integer, for j = 1, 2, 3.
Integer Programming 8
INTERNATIONAL UNIVERSITY (IU) Deterministic Models in Operation Research
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
Integer Programming 9