You are on page 1of 12

Integer Programming

Dedy Suryadi
Parahyangan Catholic University
2020

1
For educational purpose only.
Source: Wayne Winston, Operations Research Applications and Algorithms 4th. Edition, 2003
2
Mixed IP
• In the Mixed IP, some variables are required to
be integers while others are free. Example:

• We begin by solving the LP relaxation. We obtain:

• Then we branch on x1 (x2 is allowed to be fractional).


3
Subproblem 2
• We arbitrarily choose to
solve subproblem 2.

• It becomes a candidate
solution, next we solve
subproblem 3.
4
Subproblem 3
• We solve subproblem 3.

• It gives higher z-value,


thus we fathom
subproblem 2.

• The optimal solution for


the Mixed IP is
subproblem 3.

5
6
Knapsack Problem
• A knapsack problem is an IP with a single constraint.

ci = benefit if item i is chosen

b = amount of available resource

ai = amount of resource used by item i

7
0-1 IP
• If each variable must equal 0 or 1,
branching on xi will yield xi=0 and xi=1.

• The LP relaxation (and other subproblems) may


be solved by:
→ sort the items from the highest ci/ai
→ put the item into the knapsack based on the order

* perform branch and bound if there’s non-integer variable

8
Example: Knapsack

• Subproblem 1: LP Relaxation
x7=1 → remaining space = 70
x2=1 → remaining space = 20
x4=1 → remaining space = 10
x1=1/4 → remaining space = 0

→ Next we branch on x1 9
Subproblem 1
z = 160
x7=1
x2=1
x4=1
x1=1/4

x1=0 x1=1

Subproblem 2 Subproblem 3
x1=0 → remaining space = 100 x1=1→ remaining space = 60

10
Exercise: Stockco

11
12

You might also like