0% found this document useful (0 votes)
14 views

2.2 Examples of Integer Linear Programming Problems (1-7) - Pages-1-9

The document provides examples of integer programming problems to explain what integer programming is. It introduces five examples: 1) The assignment problem of assigning n workers to n jobs to minimize costs. 2) The 0-1 knapsack problem of selecting items to pack in a knapsack to maximize value within weight limits. 3) The integer knapsack problem which allows multiple copies of items. 4) The set covering problem of locating fire stations to serve all neighborhoods at minimum cost. 5) The traveling salesman problem to find the shortest route visiting n cities once each.

Uploaded by

MHM N PERERA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

2.2 Examples of Integer Linear Programming Problems (1-7) - Pages-1-9

The document provides examples of integer programming problems to explain what integer programming is. It introduces five examples: 1) The assignment problem of assigning n workers to n jobs to minimize costs. 2) The 0-1 knapsack problem of selecting items to pack in a knapsack to maximize value within weight limits. 3) The integer knapsack problem which allows multiple copies of items. 4) The set covering problem of locating fire stations to serve all neighborhoods at minimum cost. 5) The traveling salesman problem to find the shortest route visiting n cities once each.

Uploaded by

MHM N PERERA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

INTEGER PROGRAMMING NOTES

OXFORD MATHEMATICAL INSTITUTE

PROF. RAPHAEL HAUSER∗

1. Examples of Integer Programming Problems. To explain what integer


programming problems are, it is best to start with a few illustrative examples.

Example 1.1 (The Assignment Problem). A team of n people have to carry out
n jobs, each person carrying out exactly one job. If person i is assigned to job j, a
cost cij is incurred. Which assignment minimises the total cost?

To formulate this problem mathematically, we introduce decision variables, con-


straints, and an objective function:
• Decision variables: For (i, j ∈ [1, n] := {1, . . . , n}), we set
(
1 if person i carries out job j,
xij =
0 otherwise.

• Constraints:
– Each person does exactly one job, that is,
n
X
xij = 1 (i ∈ [1, n])
j=1

– Each job is done by exactly one person,


n
X
xij = 1 (j ∈ [1, n])
i=1

– The decision variables are binary,


xij ∈ B := {0, 1}, (i, j ∈ [1, n]).
Pn Pn
• Objective function: The total cost is i=1 j=1 cij xij .
Thus, the assignment problem can be modelled as follows:
n X
X n
min cij xij
x
i=1 j=1
n
X
s.t. xij = 1 for i = 1, . . . , n,
j=1
Xn
xij = 1 for j = 1, . . . , n,
i=1
xij ∈ B for i, j = 1, . . . , n.
∗ Email: [email protected]
1
Fig. 1.1. How to assign workers to vehicles?

More general integer programs are mathematical problems of the following form:
Integer Programs:

max cT x
x
s.t. Ax ≤ b, (componentwise)
x ≥ 0, (componentwise)
x ∈ Zn ,

where A is a matrix and b, c are vectors with rational coefficients, and where inequal-
ities such as Ax ≤ b are to be understood as componentwise inequalities.
Binary Integer Programs:

max cT x
x
s.t. Ax ≤ b
x ∈ Bn

Mixed Integer Programs:

max cT x + hT y
x,y

s.t. Ax + Gy ≤ b
x, y ≥ 0,
y ∈ Zp ,

where G is a matrix and h a vector with rational coefficients.


Example 1.2 (The 0-1 Knapsack Problem). A knapsack of volume b has to be
packed with a selection of n items, where item i has volume ai and value ci . How
should one pack the knapsack so as to maximise the total value of items in it?

2
Fig. 1.2. Which items should we pack into the bag?

This situation can be modelled as follows,


n
X
max ci xi
i=1
n
X
s.t. ai xi ≤ b,
i=1
x ∈ Bn ,

where the variables are defined as follows,


(
1 if item i is selected,
xi =
0 otherwise.

Example 1.3 (The Integer Knapsack Problem). The setup is the same as in
Example 1.2, but multiple copies of each type of item are available.

In this case the decision variables are no longer binary but arbitrary nonnegative
integers, so that the model becomes
n
X
max ci xi
i=1
n
X
s.t. ai xi ≤ b,
i=1
x ≥ 0,
x ∈ Zn .

A generalisation of this problem in which more than one knapsack occur is called
the Cutting Stock Problem. This kind of problem plays an important role in the pa-
per industry. Another close relative is the Bin Packing Problem that occurs in the
3
2× 3× 7×

Fig. 1.3. How to cut this paper roll so as to minimise waste for the given size orders?

considered location

considered location

fire station built


fire station built

considered location

considered location

Fig. 1.4. Where to build fire stations so that every neighbourhood is reachable within a given
target time?

shipping industry.

Example 1.4 (The Set Covering Problem). In a city with m neighbourhoods


[1, m] := {1, . . . , m}, n potential locations [1, n] := {1, . . . , n} for fire stations have
been identified. Let Sj ⊆ [1, m] is the set of neighbourhoods that can be served from
location j, and let us assume that establishing a fire station at location j incurs a cost
cj . Where should one set up fire stations so as to minimise total set-up costs, and so
that every neighbourhood can be served from at least one fire station.

4
Fig. 1.5. Graph representation of the set covering problem from Figure 1.4.

It is tempting to formulate this situation as a combinatorial optimisation problem,


 
X [ 
min cj : Sj = [1, m] .
T ⊆[1,n]  
j∈T j∈T

However, this form of the problem does not lend itself to being approached by the
algorithmic methods we will develop. We therefore reformulate the problem as a binary
integer programme:
 
Let the incidence matrix A = aij be defined by
(
1 if i ∈ Sj ,
aij =
0 otherwise.

We introduce indicator variables xj (j ∈ [1, n]) as follows,


(
1 if location j is selected,
xj =
0 otherwise

The covering constraint needs to be satisfied: At least one fire station must service
neighbourhood i for each i,
n
X
aij xj ≥ 1, for each i ∈ [1, m].
j=1

Thus, Set Covering can be modelled as the following IP,


n
X
min cj xj ,
x
j=1
n
X
s.t. aij xj ≥ 1, (i ∈ [1, m]),
j=1

x ∈ Bn .

5
Fig. 1.6. A travelling salesman problem.

Example 1.5 (The Travelling Salesman Problem (TSP)). A travelling salesman


has to visit each of n cities exactly once and then return to the starting point. For
each pair of cities i, j ∈ [1, n] there is a direct air link from i to j. The directed graph
(digraph) G = (V, E) in which the vertices are the cities and the directed edges are the
air links between them is assumed to be a complete graph. It takes cij hours to travel
along edge ij from city i to city j. In which order should our salesman visit the cities
so as to minimise the total travelling time?

Note that it may be the case that cij 6= cji . If cij = cji for all i, j ∈ [1, n], then we
speak of the symmetric travelling salesman problem (STSP), and (V, E) is considered
an undirected graph.
Formulation as a BIP:
• Decision variables: For all i, j ∈ [1, n],
(
1 if the tour contains edge ij,
xij =
0 otherwise.
• Constraints:
– The salesman leaves city i exactly once
X
xij = 1 (i = 1, . . . , n).
j:j6=i

– She arrives in city j exactly once


X
xij = 1 (j = 1, . . . , n).
i:i6=j
6
c
S

Fig. 1.7. Subtours that don’t visit all nodes need to be disallowed.

– To eliminate solutions with subtours (see Figure 1.7), we introduce cut-


set constraints:
XX
xij ≥ 1 ∀ S ⊂ V, S 6= ∅.
i∈S j ∈S
/

Thus, the TSP can be modelled as follows,


n X
X n
min cij xij
x
i=1 j=1
X
s.t. xij = 1 (i ∈ [1, n]),
j:j6=i
X
xij = 1 (j ∈ [1, n]),
i:i6=j
XX
xij ≥ 1 (S ⊂ V, S 6= ∅, V ),
i∈S j ∈S
/

x ∈ Bn×n .

Example 1.6 (Uncapacitated Facility Location (UFL)). A set of potential de-


pot locationsN = {1, . . . , n} has been identified. A set of clients M = {1, . . . , m} is
known, each of which buys products that could be delivered from one or several of the
depot locations. The transportation costs for satisfying all of client i’s orders from
depot j is cij . If depot j is in use, a fixed cost fj > 0 is incurred. Decide which depots
to open and what proportion of the demand of client i to satisfy from depot j so as to
minimise the total costs.

Modelling UFL as a mixed integer program (MIP):


• Decision variables:
7
Fig. 1.8. A facility location problem.

– For each pair (i, j) ∈ M × N let xij ∈ [0, 1] be the proportion of the
demand of of client i satisfied from depot j.
– To incorporate the fixed costs: For each j ∈ N , we let yj = 1 if depot j
is used, and yj = 0 otherwise.
• Objective function: The total cost
XX X
cij xij + fj yj .
i∈M j∈N j∈N

• Constraints:
– 100% of client i’s demand must be satisfied
n
X
xij = 1 for i = 1, . . . , m.
j=1

– The xij are proportions, and hence,


0 ≤ xij ≤ 1 ∀ ij.
Note that the constraints xij ≤ 1 are superfluous, as they are implied by
P n
j=1 xij = 1.
– If any notrivial demand is being satisfied from a depot, the depot must
be open, i.e., yj ∈ B, with yj = 1 if ∃ i ∈ M s.t. xij > 0. Note that
this condition is not in the form required for the purposes of integer
programming. Luckily, there exists an equivalent formulation1 ,
m
X
xij ≤ myj for j = 1, . . . , n.
i=1

1 Please study this condition in detail, as this type of constraint occurs often in integer program-

ming! It is called a big M formulation.


8
x

Fig. 1.9. A lot-sizing problem.

]
Thus, we find the following MIP model for UFL:
XX X
min cij xij + fj yj
(x,y)∈Rm×n+n
i∈M j∈N j∈N
X
s.t. xij = 1 (i ∈ M ),
j∈N
X
xij ≤ myj (j ∈ N ),
i∈M
x ≥ 0,
y ∈ Bn .

Example 1.7 (Uncapacitated Lot-Sizing (ULS)). A factory produces a single


type of product in periods 1, . . . , n. Production in period t incurs a fixed cost ft > 0
for switching the production line on, as well as a production cost pt per unit. Earlier
production can be kept in storage for later sale at a cost of ht per unit during period
t. Initial storage is empty. The client demand in period t is dt . How should one plan
the production so as to satisfy all demands and minimise the total costs?

• Decision variables:
– xt is the amount produced in period t (allowed to be fractional).
– yt = 1 if production occurs in period t, and yt = 0 otherwise.
– st is the amount of product held in storage during period t.
• Objective function:
n
X
(pt xt + ft yt + ht st ).
t=1

• Constraints:
– No product is ever thrown away,
st−1 + xt = dt + st , ∀ t.
9

You might also like