You are on page 1of 83

Integer Linear

Programming

DR. MUKESH KUMAR


M E H L AW AT
Introduction
What is Integer Linear programming and why do we use
it?
• We have seen numerous examples and diverse applications of linear programming. One
key limitations of this problem is the assumption of divisibility. This limits the scope of
more applications of linear programming.

• In many problems, decision variables make sense only if they have integer values. For
example, how many trucks to dispatch from a plant to a warehouse, number of people,
number of machines, how many aircrafts to purchase, and so on.

• Integer linear programming is a special type of linear programming problem with the
additional constraint that some or all the decision variables are restricted to take only
integer values.

• If only some of the variables are required to take integer values, the model is referred to
as the Mixed Integer programming (MIP) problem. If all the variables are required to take
integer values, the model is referred to as the Pure Integer programming (PIP) problem.
Zero One Programming / Binary Integer Programming
A special class of integer programs
Each variable can take only two possible values: 0 or 1
Binary variables Binary Integer Program (BIP).
What does such a variable represent?
◦ Yes/No decisions x=1 (yes), x=0 (no)
◦ Whether to locate a plant in Lucknow or not
◦ Whether to invest in a particular stock or not

Is rounding a reasonable approach here?


It will lead to gross errors, producing a meaningless solution.
Dangers of Rounding
IP optimum
X2
Rounding up
LP optimum

Rounding down

X1
A prototype example

The CALIFORNIA MANUFACTURING COMPANY is considering expansion by building a new factory in


either Los Angeles or San Francisco, or perhaps even in both cities. It also is considering building
at most one new warehouse, but the choice of location is restricted to a city where a new factory
is being built. The net present value (total profitability considering the time value of money) of
each of these alternatives is shown in the fourth column of the table (next slide). The rightmost
column gives the capital required (already included in the net present value) for the respective
investments, where the total capital available is $10 million. The objective is to find the feasible
combination of alternatives that maximizes the total net present value.
Decision Number Yes-or-No question Decision Variable Net Present Value Capital required

1 Build factory in 𝑥𝑥1 $9 million $6 million


Los Angeles?

2 Build factory in 𝑥𝑥2 $5 million $3 million


San Francisco?

3 Build Warehouse 𝑥𝑥3 $6 million $5 million


in Los Angeles?

4 Build Warehouse 𝑥𝑥4 $4 million $2 million


in San Francisco?

Capital available: $10 million


Formulation
Although this problem is exceedingly simple and can be solved very quickly by inspection, it is a
good learning exercise on the formulation of an Integer programming problem. Let us define the
decision variables as,

1, if decision j is yes,
𝑥𝑥𝑗𝑗 = � , 𝑗𝑗 = 1,2,3,4
0, if decision j is no.

Let,

𝑍𝑍 = total net present value of these decisions.

If the investment is made to build a particular facility (so that the corresponding decision variable
has a value of 1), the estimated net present value from that investment is given in the fourth
column of the table. If the investment is not made (so the decision variable equals 0), the net
present value is 0. Therefore, using units of millions of dollars,
◦ 𝑍𝑍 = 9𝑥𝑥1 + 5𝑥𝑥2 + 6𝑥𝑥3 + 4𝑥𝑥4
Formulation (contd.)
The rightmost column of the table indicates that the amount of capital expended on the four
facilities cannot exceed $10 million. Consequently, continuing to use units of millions of dollars,
one constraint in the model is,

6𝑥𝑥1 + 3𝑥𝑥2 + 5𝑥𝑥3 + 2𝑥𝑥4 ≤ 10.

Because the last two decisions represent mutually exclusive alternatives (the company wants at
most one new warehouse), we also need the constraint,

𝑥𝑥3 + 𝑥𝑥4 ≤ 1.

Furthermore, decisions 3 and 4 are contingent decisions, because they are contingent on
decisions 1 and 2, respectively (the company would consider building a warehouse in a city only if
a new factory also were going there). Thus, in the case of decision 3, we require that 𝑥𝑥3 = 0, if
𝑥𝑥1 = 0. This restriction on 𝑥𝑥3 (when 𝑥𝑥1 = 0) is imposed by adding the constraint,

𝑥𝑥3 ≤ 𝑥𝑥1 .
Formulation (contd.)
Similarly, the requirement that 𝑥𝑥4 = 0, if 𝑥𝑥2 = 0 is imposed by adding the constraint,
𝑥𝑥4 ≤ 𝑥𝑥2 .

•Note that the decision variables 𝑥𝑥𝑗𝑗 are allowed to take values only 0 or 1. This type of variables are
called binary variables. The integer programming problems involving binary variables are called
Binary Integer programming problems (BIP).
•Except for its small size, this example is typical of many real applications of integer programming
where the basic decisions to be made are of the yes-or-no type. Like the second pair of decisions
for this example, groups of yes-or-no decisions often constitute groups of mutually exclusive
alternatives such that only one decision in the group can be yes.
•Occasionally, decisions of the yes-or-no type are contingent decisions (Constraint 3 and 4), i.e.,
decisions that depend upon previous decisions. For example, one decision is said to be contingent
on another decision if it is allowed to be yes only if the other is yes. This situation occurs when the
contingent decision involves a follow-up action that would become irrelevant, or even impossible,
if the other decision were no.
Complete model
Maximize 𝑍𝑍 = 9𝑥𝑥1 + 5𝑥𝑥2 + 6𝑥𝑥3 + 4𝑥𝑥4

Subject to,

6𝑥𝑥1 + 3𝑥𝑥2 + 5𝑥𝑥3 + 2𝑥𝑥4 ≤ 10

𝑥𝑥3 + 𝑥𝑥4 ≤ 1

𝑥𝑥3 ≤ 𝑥𝑥1

𝑥𝑥4 ≤ 𝑥𝑥2

𝑥𝑥𝑗𝑗 ∈ 0,1 , for all 𝑗𝑗 = 1,2,3,4

Here, the last constraints restricts each 𝑥𝑥𝑗𝑗 to be a binary variable.


Some BIP applications
Capital budgeting with fixed investment proposals.
◦ Linear programming sometimes is used to make capital budgeting decisions about how much
to invest in various projects. However, as the California Manufacturing Co. example
demonstrates, some capital budgeting decisions do not involve how much to invest, but rather,
whether to invest a fixed amount. Specifically, the four decisions in the example were whether
to invest the fixed amount of capital required to build a certain kind of facility (factory or
warehouse) in a certain location (Los Angeles or San Francisco).

◦ Management often must face decisions about whether to make fixed investments (those where
the amount of capital required has been fixed in advance). Should we acquire a certain
subsidiary being spun off by another company? Should we purchase a certain source of raw
materials? Should we add a new production line to produce a certain input item ourselves
rather than continuing to obtain it from a supplier?
Some BIP applications
Site Selection
◦ In this global economy, many corporations are opening up new plants in various
parts of the world to take advantage of lower labour costs, etc.

◦ Before selecting a site for a new plant, many potential sites may need to be
analysed and compared.

◦ In many cases, the objective is to select the sites so as to minimize the total cost
of the new facilities that will provide the required output.
Some BIP Applications
Designing a production and distribution network
◦ Manufacturers today face great competitive pressure to get their products to market more
quickly as well as to reduce their production and distribution costs. Therefore, any corporation
that distributes its products over a wide geographical area (or even worldwide) must pay
continuing attention to the design of its production and distribution network.

◦ This design involves addressing the following kinds of yes-or-no decisions: Should a certain
plant remain open? Should a certain site be selected for a new plant? Should a certain
distribution centre remain open? Should a certain site be selected for a new distribution
centre?

◦ If each market area is to be served by a single distribution centre, then we also have another
kind of yes-or-no decision for each combination of a market area and a distribution centre.
Some BIP Applications
Scheduling Interrelated Activities
◦ We all schedule interrelated activities in our everyday lives, even if it is just scheduling when to
begin our various homework assignments. So too, managers must schedule various kinds of
interrelated activities.
◦ When should we begin production for various new orders? When should we begin marketing
various new products? When should we make various capital investments to expand our
production capacity?
◦ For any such activity, the decision about when to begin can be expressed in terms of a series of
yes-or-no decisions.
◦ Since a particular activity can begin in only one time period, the choice of the various time
periods provides a group of mutually exclusive alternatives, so the decision variable for only
one time period can have a value of 1.
Some BIP Applications
Airline Applications
◦ The airline industry is an especially heavy user of OR throughout its operations. We will mention
here just two of the applications which specifically use BIP.
◦ One is the fleet assignment problem. Given several different types of airplanes available, the
problem is to assign a specific type to each flight leg in the schedule so as to maximize the
total profit from meeting the schedule.
◦ The basic trade-off is that if the airline uses an airplane that is too small on a particular flight
leg, it will leave potential customers behind, while if it uses an airplane that is too large, it will
suffer the greater expense of the larger airplane to fly empty seats.
◦ Another similar application is the crew scheduling problem. Here, rather than assigning
airplane types to flight legs, we are instead assigning sequences of flight legs to crews of pilots
and flight attendants.
Innovative uses of binary variables in model formulation
We have just seen a number of examples where the basic decisions of the problem are of the yes-
or-no type, so that binary variables are introduced to represent these decisions.

This kind of situation arises when the original formulation of the problem fits either an IP or a
linear programming format except for minor disparities involving combinatorial relationships in the
model.

By expressing these combinatorial relationships in terms of questions that must be answered yes
or no, auxiliary binary variables can be introduced to the model to represent these yes-or-no
decisions.
Innovative uses of binary variables in model formulation
Either-Or Constraints
◦ Consider the important case where a choice can be made between two constraints, so that
only one (either one) must hold (whereas the other one can hold but is not required to do so).
◦ For example, there may be a choice as to which of two resources to use for a certain purpose,
so that it is necessary for only one of the two resource availability constraints to hold
mathematically.
◦ Suppose that one of the requirements in the overall problem is that, either 3𝑥𝑥1 + 2𝑥𝑥2 ≤ 18 or
𝑥𝑥1 + 4𝑥𝑥2 ≤ 16. i.e., at least one of these two inequalities must hold.
◦ Let 𝑦𝑦 be an auxiliary variable that can only take values 0 and 1. Let 𝑀𝑀 be a vary large positive
number. Then the above constraint can be formulated as,
3𝑥𝑥1 + 2𝑥𝑥2 ≤ 18 + 𝑀𝑀𝑀𝑀.
𝑥𝑥1 + 4𝑥𝑥2 ≤ 16 + 𝑀𝑀 1 − 𝑦𝑦 .
Innovative uses of binary variables in model formulation
Either-Or Constraints
◦ Because the auxiliary variable 𝑦𝑦 must be either 0 or 1, this formulation guarantees that one of
the original constraints must hold while the other is, in effect, eliminated. This new set of
constraints would then be appended to the other constraints in the overall model to give a pure
or mixed IP problem.

◦ If 𝑦𝑦 = 0, then the first constraint is selected for the problem. The second constraint will have no
impact on the feasible region for the problem as it will hold for each value of 𝑦𝑦. As 𝑀𝑀 is a very
large positive number, the second constraint will always be satisfied.

◦ If 𝑦𝑦 = 1, then the second constraint is selected for the problem. The first constraint will have no
impact on the feasible region for the problem as it will hold for each value of 𝑦𝑦. As 𝑀𝑀 is a very
large positive number, the first constraint will always be satisfied.
Innovative uses of binary variables in model formulation
𝑲𝑲 out of 𝑵𝑵 constraints must hold
◦ Consider the case where the overall model includes a set of 𝑁𝑁 possible constraints such that
only some 𝐾𝐾 of these constraints must hold. (Assume that 𝐾𝐾 < 𝑁𝑁.) Part of the optimization
process is to choose the combination of 𝐾𝐾 constraints that permits the objective function to
reach its best possible value. The 𝑁𝑁 − 𝐾𝐾 constraints not chosen are, in effect, eliminated from
the problem.
◦ This case is a direct generalization of the preceding case, which had 𝐾𝐾 = 1 and 𝑁𝑁 = 2.
◦ Denote the 𝑁𝑁 possible constraints as,
𝑓𝑓1 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑1
𝑓𝑓2 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑2


𝑓𝑓𝑁𝑁 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑𝑁𝑁
Innovative uses of binary variables in model formulation
𝑲𝑲 out of 𝑵𝑵 constraints must hold
◦ Applying the same logic as for the preceding case, we find that an equivalent formulation of the
requirement that some 𝐾𝐾 of these constraints must hold is

𝑓𝑓1 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑1 + 𝑀𝑀𝑦𝑦1


𝑓𝑓2 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑2 + 𝑀𝑀𝑦𝑦2


𝑓𝑓𝑁𝑁 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≤ 𝑑𝑑𝑁𝑁 + 𝑀𝑀𝑀𝑀𝑁𝑁
𝑁𝑁

� 𝑦𝑦𝑖𝑖 = 𝑁𝑁 − 𝐾𝐾 .
𝑖𝑖=1
where 𝑦𝑦𝑖𝑖 ∈ 0,1 , is an auxiliary variable for 𝑖𝑖 = 1,2, … … , 𝑁𝑁, and 𝑀𝑀 is a very positive number. The
choice of which 𝐾𝐾 constraints should be retained is made by applying the appropriate algorithm
to the overall problem so it finds an optimal solution for all the variables simultaneously.
Innovative uses of binary variables in model formulation
Functions with 𝑵𝑵 possible values
◦ Consider the situation where a given function is required to take on any one of 𝑁𝑁 given values.
Denote this requirement by,
𝑓𝑓 𝑥𝑥1 , 𝑥𝑥2 , … , … , 𝑥𝑥𝑛𝑛 = 𝑑𝑑1 or 𝑑𝑑2 , … , … , or 𝑑𝑑𝑁𝑁 .
◦ The equivalent IP formulation of this requirement is the following:
𝑁𝑁

𝑓𝑓 𝑥𝑥1 , 𝑥𝑥2 , … , … , 𝑥𝑥𝑛𝑛 = � 𝑑𝑑𝑖𝑖 𝑦𝑦𝑖𝑖 .


𝑖𝑖=1
𝑁𝑁

� 𝑦𝑦𝑖𝑖 = 1 ,
𝑖𝑖=1
where 𝑦𝑦𝑖𝑖 ∈ {0,1} is an auxiliary variable for all 𝑖𝑖 = 1,2, … , … , 𝑁𝑁.
◦ This set of constraints provides an equivalent formulation because exactly one 𝑦𝑦𝑖𝑖 must equal 1
and the others must equal 0, so exactly one 𝑑𝑑𝑖𝑖 is being chosen as the value of the function.
ILP formulation
examples
Ques. The board of directors of General wheels Co. is considering seven large capital investments. Each investment
can be made only once. These investment differ in the estimated long-run profit (net present value) that they will
generate as well as in the amount of capital required, as shown by the following table (in unit of millions of dollars):

Investment Opportunity
1 2 3 4 5 6 7
Estimated profit 17 10 15 19 7 13 9
Capital required 43 28 34 48 17 32 23

The total amount of capital available for these investment is $100 million. Investment opportunities 1 and 2 are
mutually exclusive, and so are 3 and 4 . Furthermore, neither 3 nor 4 can be undertaken unless one of the first two
opportunities is undertaken. There are no such restriction on investment opportunities 5, 6, and 7. The objective is to
select the combination of capital investments that will maximize the total estimated long-run profit (net present value).
Formulate a BIP model for this problem.
Maximize 17x1+10x2+15x3…+9x7

43x1+28x2+34x3…+23x7 ≤ 100

x1+x2 ≤ 1

x3+x4 ≤ 1

x3 ≤ x1+x2

x4 ≤ x1+x2

xi =0,1
Making choices when decision variables are
continuous
The Research and Development Division of the GOOD PRODUCTS COMPANY has developed three
possible new products. However, to avoid undue diversification of the company’s product line,
management has imposed the following restriction.

Restriction 1: From the three possible new products, at most two should be chosen to be
produced.

Restriction 2: Just one of the two plants should be chosen to be the sole producer of the new
products.

The production cost per unit of each product would be essentially the same in the two plants.
However, because of differences in their production facilities, the number of hours of production
time needed per unit of each product might differ between the two plants. The relevant data has
been given in the following table. The objective is to choose the products, the plant, and the
production rates of the chosen products so as to maximize total profit.
Making choices when decision variables are
continuous
Production time used for each unit produced Production time available per
week
Product 1 Product 2 Product 3

Plant 1 3 hours 4 hours 2 hours 30 hours

Plant 2 4 hours 6 hours 2 hours 40 hours

Unit profit 5 7 3 (Thousands of dollars)

Sales potential 7 5 9 (Units per week)


Making choices when decision variables are
continuous
To deal with restriction 1, we introduce three auxiliary binary variables (𝑦𝑦1 , 𝑦𝑦2 , 𝑦𝑦3 ) with the
interpretation,

1, 𝑖𝑖𝑖𝑖 𝑥𝑥𝑗𝑗 > 0 i.e., the 𝑗𝑗𝑡𝑡𝑡 product is chosen for production .
𝑦𝑦𝑗𝑗 = �
0, 𝑖𝑖𝑖𝑖 𝑥𝑥𝑗𝑗 = 0 i.e., the 𝑗𝑗 𝑡𝑡𝑡 product is rejected for production .

As explained in the previous sections, this condition is implemented as,


𝑥𝑥1 ≤ 𝑀𝑀𝑦𝑦1
𝑥𝑥2 ≤ 𝑀𝑀𝑦𝑦2
𝑥𝑥3 ≤ 𝑀𝑀𝑦𝑦3
𝑦𝑦1 + 𝑦𝑦2 + 𝑦𝑦3 ≤ 2
𝑦𝑦𝑗𝑗 ∈ 0,1 , 𝑓𝑓𝑓𝑓𝑓𝑓 𝑗𝑗 = 1,2,3,

where 𝑀𝑀 is a very large positive number.


Making choices when decision variables are
continuous
To deal with restriction 2, we introduce an auxiliary binary variable 𝑦𝑦4 with the interpretation,

0, 𝑖𝑖𝑖𝑖 4𝑥𝑥1 + 6𝑥𝑥2 + 2𝑥𝑥3 ≤ 40 i.e., Plant 2 is chosen .


𝑦𝑦4 = �
1, 𝑖𝑖𝑖𝑖 3𝑥𝑥1 + 4𝑥𝑥2 + 2𝑥𝑥3 ≤ 30 i.e., Plant 1 is chosen .

As explained in the previous sections, this condition is implemented as,


4𝑥𝑥1 + 6𝑥𝑥2 + 2𝑥𝑥3 ≤ 40 + 𝑀𝑀𝑦𝑦4
3𝑥𝑥1 +4𝑥𝑥2 + 2𝑥𝑥3 ≤ 30 + 𝑀𝑀(1 − 𝑦𝑦4 )
𝑦𝑦4 ∈ 0,1

where 𝑀𝑀 is a very large positive number. Finally, we formulate the complete model as follows,
Making choices when decision variables are
continuous

𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 𝑍𝑍 = 5𝑥𝑥1 + 7𝑥𝑥2 + 3𝑥𝑥3


subject to
𝑥𝑥1 ≤ 7
𝑥𝑥2 ≤ 5
𝑥𝑥3 ≤ 9
𝑥𝑥1 − 𝑀𝑀𝑦𝑦1 ≤ 0
𝑥𝑥2 − 𝑀𝑀𝑦𝑦2 ≤ 0
𝑥𝑥3 − 𝑀𝑀𝑦𝑦3 ≤ 0
𝑦𝑦1 + 𝑦𝑦2 + 𝑦𝑦3 ≤ 2
3𝑥𝑥1 +4𝑥𝑥2 + 2𝑥𝑥3 + 𝑀𝑀𝑀𝑀4 ≤ 30 + 𝑀𝑀
4𝑥𝑥1 + 6𝑥𝑥2 + 2𝑥𝑥3 − 𝑀𝑀𝑦𝑦4 ≤ 40
𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 ≥ 0
𝑦𝑦1 , 𝑦𝑦2 , 𝑦𝑦3 , 𝑦𝑦4 ∈ 0,1
Making choices when decision variables are
continuous

This now is an MIP model, with three variables (the 𝑥𝑥𝑗𝑗 ) not required to be integer and four binary
variables, so an MIP algorithm can be used to solve the model. When this is done (after
substituting a large numerical value for 𝑀𝑀), the optimal solution is 𝑦𝑦1 = 1, 𝑦𝑦2 = 0, 𝑦𝑦3 = 1, 𝑦𝑦4 = 1,
𝑥𝑥1 = 5.5, 𝑥𝑥2 = 0, and 𝑥𝑥3 = 9; that is, choose products 1 and 3 to produce, choose Plant 2 for the
production, and choose the production rates of 5.5 Units per week for product 1 and 9 units per
week for product 3. The resulting total profit is $54,500 per week.
Violating proportionality

The SUPERSUDS CORPORATION is developing its marketing plans for next year’s new products. For
three of these products, the decision has been made to purchase a total of five TV spots for
commercials on national television networks. The problem we will focus on is how to allocate the
five spots to these three products, with a maximum of three spots (and a minimum of zero) for
each product.

The following table shows the estimated impact of allocating zero, one, two, or three spots to each
product. This impact is measured in terms of the profit (in units of millions of dollars) from the
additional sales that would result from the spots, considering also the cost of producing the
commercial and purchasing the spots. The objective is to allocate five spots to the products so as
to maximize the total profit.
Violating proportionality

Profit
Number of TV spots Products
1 2 3
0 0 0 0
1 1 0 -1
2 3 2 2
3 3 3 4
Violating proportionality
A natural formulation would be to let 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 be the number of TV spots allocated to the
respective products. The contribution of each 𝑥𝑥𝑗𝑗 to the objective function then would be given by
the corresponding column in the given table. However, each of these columns violates the
assumption of proportionality. Therefore, we cannot write a linear objective function in terms of
these integer decision variables.

Now see what happens when we introduce an auxiliary binary variable 𝑦𝑦𝑖𝑖𝑖𝑖 for each positive integer
value of 𝑥𝑥𝑖𝑖 = 𝑗𝑗 (𝑗𝑗 = 1, 2, 3), where 𝑦𝑦𝑖𝑖𝑖𝑖 has the interpretation,
1 𝑖𝑖𝑖𝑖 𝑥𝑥𝑖𝑖 = 𝑗𝑗.
𝑦𝑦𝑖𝑖𝑖𝑖 = �
0 otherwise.

(For example, 𝑦𝑦21 = 0, 𝑦𝑦22 = 0, and 𝑦𝑦23 = 1 means that 𝑥𝑥2 = 3.) The resulting linear BIP model is,
Violating proportionality

Maximize 𝑍𝑍 = 𝑦𝑦11 + 3𝑦𝑦12 + 3𝑦𝑦13 + 2𝑦𝑦22 + 3𝑦𝑦23 − 𝑦𝑦31 + 2𝑦𝑦32 + 4𝑦𝑦33


subject to
𝑦𝑦11 + 𝑦𝑦12 + 𝑦𝑦13 ≤ 1
𝑦𝑦21 + 𝑦𝑦22 + 𝑦𝑦23 ≤ 1
𝑦𝑦31 + 𝑦𝑦32 + 𝑦𝑦33 ≤ 1
𝑦𝑦11 + 2𝑦𝑦12 + 3𝑦𝑦13 + 𝑦𝑦21 + 2𝑦𝑦22 + 3𝑦𝑦23 +𝑦𝑦31 +2𝑦𝑦32 + 3𝑦𝑦33 ≤ 5
𝑦𝑦11 , 𝑦𝑦12 , 𝑦𝑦13 , 𝑦𝑦21 , 𝑦𝑦22 , 𝑦𝑦23 , 𝑦𝑦31 , 𝑦𝑦32 , 𝑦𝑦33 ∈ {0,1}
Solving this BIP model gives an optimal solution of,
𝑦𝑦11 = 0, 𝑦𝑦12 = 1, 𝑦𝑦13 = 0, 𝑠𝑠𝑠𝑠, 𝑥𝑥1 = 2.
𝑦𝑦21 = 0, 𝑦𝑦22 = 0, 𝑦𝑦22 = 0, 𝑠𝑠𝑠𝑠, 𝑥𝑥2 = 0.
𝑦𝑦31 = 0, 𝑦𝑦32 = 0, 𝑦𝑦33 = 1, 𝑠𝑠𝑠𝑠, 𝑥𝑥3 = 3.
Covering all characteristics

SOUTHWESTERN AIRWAYS needs to assign its crews to cover all its upcoming flights. We will focus
on the problem of assigning three crews based in San Francisco to the flights listed in the first
column of in the given table. The other 12 columns show the 12 feasible sequences of flights for a
crew. (The numbers in each column indicate the order of the flights.) Exactly three of the
sequences need to be chosen (one per crew) in such a way that every flight is covered. (It is
permissible to have more than one crew on a flight, where the extra crews would fly as passengers,
but union contracts require that the extra crews would still need to be paid for their time as if they
were working.) The cost of assigning a crew to a particular sequence of flights is given (in
thousands of dollars) in the bottom row of the table. The objective is to minimize the total cost of
the three crew assignments that cover all the flights.
Covering all characteristics

Feasible sequence of flights


Flight 1 2 3 4 5 6 7 8 9 10 11 12

1. San Francisco to Los Ángeles 1 1 1 1

2. San Francisco to Denver 1 1 1 1

3. San Francisco to Seattle 1 1 1 1

4. Los Angeles to Chicago 2 2 3 2 3

5. Los Ángeles to San Francisco 2 3 5 5

6. Chicago to Denver 3 3 4

7. Chicago to Seattle 3 3 3 3 4

8. Denver to San Francisco 2 4 4 5

9. Denver to Chicago 2 2 2

10. Seattle to San Francisco 2 4 4 5

11. Seattle to Los Angeles 2 2 4 4 2

Cost, $1000s 2 3 4 6 7 5 7 8 9 9 8 9
Covering all characteristics
We use 12 binary variables to represent these respective decisions,
1, if sequence 𝑗𝑗 is assigned to a crew.
𝑥𝑥𝑗𝑗 = �
0, otherwise.

The most interesting part of this formulation is the nature of each constraint that ensures that a
corresponding flight is covered. For example, consider the last flight in the table (Seattle to Los
Angeles (LA)), Five sequences (namely, sequences 6, 9, 10, 11, and 12 ) include this flight.
Therefore, at least one of these five sequences must be chosen. The resulting constraint is,

𝑥𝑥6 + 𝑥𝑥9 + 𝑥𝑥10 + 𝑥𝑥11 + 𝑥𝑥12 ≥ 1

Using similar constraints for the other 10 flights, the complete BIP model is,
Covering all characteristics

Minimize 𝑍𝑍 = 2𝑥𝑥1 + 3𝑥𝑥2 + 4𝑥𝑥3 + 6𝑥𝑥4 + 7𝑥𝑥5 + 5𝑥𝑥6 + 7𝑥𝑥7 + 8𝑥𝑥8 + 9𝑥𝑥9 + 9𝑥𝑥10 + 8𝑥𝑥11 + 9𝑥𝑥12
subject to,
𝑥𝑥1 + 𝑥𝑥4 + 𝑥𝑥7 + 𝑥𝑥10 ≥ 1
𝑥𝑥2 + 𝑥𝑥5 + 𝑥𝑥8 + 𝑥𝑥11 ≥ 1
𝑥𝑥3 + 𝑥𝑥6 + 𝑥𝑥9 + 𝑥𝑥12 ≥ 1
𝑥𝑥4 + 𝑥𝑥7 + 𝑥𝑥9 + 𝑥𝑥10 + 𝑥𝑥12 ≥ 1
𝑥𝑥1 + 𝑥𝑥6 + 𝑥𝑥10 + 𝑥𝑥11 ≥ 1
𝑥𝑥4 + 𝑥𝑥5 + 𝑥𝑥9 ≥ 1
𝑥𝑥7 + 𝑥𝑥8 + 𝑥𝑥10 + 𝑥𝑥11 + 𝑥𝑥12 ≥ 1
𝑥𝑥2 + 𝑥𝑥4 + 𝑥𝑥5 + 𝑥𝑥9 ≥ 1
𝑥𝑥5 +𝑥𝑥8 + 𝑥𝑥11 ≥ 1
𝑥𝑥3 + 𝑥𝑥7 + 𝑥𝑥8 + 𝑥𝑥12 ≥ 1
𝑥𝑥6 + 𝑥𝑥9 + 𝑥𝑥10 + 𝑥𝑥11 + 𝑥𝑥12 ≥ 1
12

� 𝑥𝑥𝑗𝑗 = 3
𝑗𝑗=1
𝑥𝑥𝑗𝑗 ∈ 0,1 , for all 𝑗𝑗 = 1,2, … , … , 12

One optimal solution for this BIP model is: 𝑥𝑥3 = 1 (assign sequence 3 to a crew), 𝑥𝑥4 = 1 (assign
sequence 4 to a crew), 𝑥𝑥11 = 1(assign sequence 11 to a crew), and 𝑍𝑍 = $18,000.
A
1 6
B
D
F
2 3
C
4
E

G 5 H
Minimize ∑xj
∑ajxj ≥ 1
xj = 0,1 ∀ j
Fixed-charge problem
The fixed-charge problem deals with situations in which the economic activity incurs two types of
costs: an initial "flat" fee that must be incurred to start the activity and a variable cost that is
directly proportional to the level of the activity. For example, the initial tooling of a machine prior to
starting production incurs a fixed setup cost regardless of how many units are manufactured. Once
the setup is done, the cost of labour and material is proportional to the amount produced. Given
that 𝐹𝐹 is the fixed charge, 𝑒𝑒 is the variable unit cost, and 𝑥𝑥 is the level of production, the cost
function is expressed as
𝐹𝐹 + 𝑐𝑐𝑐𝑐, 𝑖𝑖𝑖𝑖 𝑥𝑥 > 0
𝐶𝐶 𝑥𝑥 = �
0, otherwise

The function 𝐶𝐶(𝑥𝑥) is intractable analytically because it involves a discontinuity at 𝑥𝑥 = 0. The next
example shows how binary variables are used to remove this intractability.
Fixed-charge problem
(Choosing a telephone company)

I have been approached by three telephone companies to subscribe to their long distance service
in the United States. MaBell will charge a flat $16 per month plus $0.25 a minute. PaBell will
charge $25 a month but will reduce the per-minute cost to $0.21. As for BabyBell, the flat monthly
charge is $18, and the cost per minute is $0.22. I usually make an average of 200 minutes of long-
distance calls a month. Assuming that I do not pay the flat monthly fee unless I make calls and that
I can apportion my calls among all three companies as I please, how should I use the three
companies to minimize my monthly telephone bill?

This problem can be solved readily without ILP. Nevertheless, it is instructive to formulate it as an
integer program.
Fixed-charge problem
Define,
𝑥𝑥1 = MaBell long−distance minutes per month.
𝑥𝑥2 = PaBell long − distance minutes per month.
𝑥𝑥3 = BabyBell long − distance minutes per month.
𝑦𝑦1 = 1 if 𝑥𝑥1 > 0 and 0 if 𝑥𝑥1 = 0.
𝑦𝑦2 = 1 if 𝑥𝑥2 > 0 and 0 if 𝑥𝑥2 = 0.
𝑦𝑦3 = 1 if 𝑥𝑥3 > 0 and 0 if 𝑥𝑥3 = 0.

We can ensure that 𝑦𝑦𝑗𝑗 will equal 1 if 𝑥𝑥𝑗𝑗 is positive by using the constraint,
𝑥𝑥𝑗𝑗 ≤ 𝑀𝑀𝑦𝑦𝑗𝑗 , 𝑗𝑗 = 1,2,3.
Fixed-charge problem
The value of 𝑀𝑀 should be selected sufficiently large so as not restrict to the variable 𝑥𝑥𝑗𝑗 artificially.
Because I make about 200 minutes of calls a month, then 𝑥𝑥𝑗𝑗 ≤ 200 for all 𝑗𝑗. and it is safe to select
𝑀𝑀 = 200.

The complete model is,

Minimize 𝑧𝑧 = 0.25𝑥𝑥1 + 0.21𝑥𝑥2 + 0.22𝑥𝑥3 + 16𝑦𝑦1 + 25𝑦𝑦2 + 18𝑦𝑦3


subject to,
𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 ≤ 200
𝑥𝑥1 ≤ 200𝑦𝑦1
𝑥𝑥2 ≤ 200𝑦𝑦2
𝑥𝑥3 ≤ 200𝑦𝑦3
𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 ≥ 0
𝑦𝑦1 , 𝑦𝑦2 , 𝑦𝑦3 ∈ 0,1
Fixed-charge problem
The formulation shows that the jth monthly flat fee will be part of the objective function 𝑧𝑧 only if
𝑦𝑦𝑗𝑗 = 1, which can happen only if 𝑥𝑥𝑗𝑗 > 0 (per the last three constraints of the model). If 𝑥𝑥𝑗𝑗 = 0 at
the optimum, then the minimization of 𝑧𝑧, together with the fact that the objective coefficient of 𝑦𝑦𝑗𝑗
is strictly positive. will force 𝑦𝑦𝑗𝑗 to equal zero, as desired.

The optimum solution yields 𝑥𝑥3 = 200, 𝑦𝑦3 = 1, and all the remaining variables equal to zero, which
shows that BabyBell should be selected as my long-distance carrier. Remember that the
information conveyed by 𝑦𝑦3 = 1 is redundant because the same result is implied by 𝑥𝑥3 > 0(=
200). Actually, the main reason for using 𝑦𝑦1 , 𝑦𝑦2 , 𝑦𝑦3 is to account for the monthly flat fee. In effect,
the three binary variables convert an ill-behaved (nonlinear) model into an analytically tractable
formulation. This conversion has resulted in introducing the integer (binary) variables in an
otherwise continuous problem.
SOLUTION OF AN ILP
Some perspectives on solving the integer
programming problems (ILP)
•Integer linear programming problems are, in general, much more difficult to solve than linear
programming problems, sometimes it is tempting to use the approximate procedure of simply
applying the simplex method to the LP relaxation and then rounding the non-integer values to
integers in the resulting solution. This approach may be adequate for some applications,
especially if the values of the variables are quite large so that rounding creates relatively little
error. However, you should beware of two pitfalls involved in this approach.

•One pitfall is that an optimal linear programming solution is not necessarily feasible after it is
rounded. Often it is difficult to see in which way the rounding should be done to retain feasibility. It
may even be necessary to change the value of some variables by one or more units after
rounding.
Some perspectives on solving the integer
programming problems (ILP)
To illustrate, consider the following problem:

Maximize 𝑍𝑍 = 𝑥𝑥2
subject to
1
−𝑥𝑥1 + 𝑥𝑥2 ≤
2
1
𝑥𝑥1 + 𝑥𝑥2 ≤ 3
2
𝑥𝑥1 , 𝑥𝑥2 ≥ 0, and integer.
1
the optimal solution for the LP relaxation is 𝑥𝑥1 = 1 , 𝑥𝑥2 = 2, but it is impossible to round the non-
2
integer variable 𝑥𝑥1 to 1 or 2 (or any other integer) and retain feasibility. Feasibility can be retained
only by also changing the integer value of 𝑥𝑥2 . It is easy to imagine how such difficulties can be
compounded when there are tens or hundreds of constraints and variables.
Some perspectives on solving the integer
programming problems (ILP)
Even if an optimal solution for the LP relaxation is rounded successfully, there remains another
pitfall. There is no guarantee that this rounded solution will be the optimal integer solution. In fact,
it may even be far from optimal in terms of the value of the objective function. This fact is
illustrated by the following problem:
Maximize 𝑍𝑍 = 𝑥𝑥1 + 5𝑥𝑥2
subject to
𝑥𝑥1 + 10𝑥𝑥2 ≤ 20
𝑥𝑥1 ≤2
𝑥𝑥1 , 𝑥𝑥2 ≥ 0, and integer
9
the optimal solution for the LP relaxation is 𝑥𝑥1 = 2, 𝑥𝑥2 = , with 𝑍𝑍 = 11. the variable with the non-
5
9
integer value 𝑥𝑥2 = would normally be rounded in the feasible direction to 𝑥𝑥2 = 1. The resulting
5
integer solution is 𝑥𝑥1 , = 2, 𝑥𝑥2 = 1, which yields 𝑍𝑍 = 7. Notice that this solution is far from the
optimal solution 𝑥𝑥1 , 𝑥𝑥2 = (0, 2), where 𝑍𝑍 = 10.
Branch and Bound algorithm to solve ILP

The basic concept underlying the branch-and-bound technique is to


divide and conquer.
Since the original “large” problem is hard to solve directly, it is divided into smaller and smaller
subproblems until these subproblems can be conquered.
The dividing (branching) is done by partitioning the entire set of feasible solutions into smaller
and smaller subsets.
The conquering (fathoming) is done partially by
(i) giving a bound for the best solution in the subset;
(ii) discarding the subset if the bound indicates that
it can’t contain an optimal solution.
These three basic steps – branching, bounding, and fathoming –
are illustrated on the following example.
Summary of the Branch and Bound algorithm
We now summarize the Branch and Bound algorithm. Assuming a maximization problem, set an
initial lower bound 𝑍𝑍 ∗ = −∞ on the optimum objective value of ILP. Set 𝑖𝑖 = 0.

Step 1. (Fathoming/bounding). Select 𝐿𝐿𝐿𝐿𝑖𝑖 , the next subproblem to be examined. Solve 𝐿𝐿𝐿𝐿𝑖𝑖 , and
attempt to fathom it using one of three conditions:

(a) The optimal 𝑍𝑍-value of 𝐿𝐿𝐿𝐿𝑖𝑖 cannot yield a better objective value than the current lower bound.

(b) 𝐿𝐿𝐿𝐿𝑖𝑖 yields a better feasible integer solution than the current lower bound.

(c) 𝐿𝐿𝐿𝐿𝑖𝑖 has no feasible solution.

Two cases will arise.

(a) If 𝐿𝐿𝐿𝐿𝑖𝑖 is fathomed and a better solution is found, update the lower bound. If all subproblems
have been fathomed, stop; the optimum ILP is associated with the current finite lower bound. If no
finite lower bound exists, the problem has no feasible solution. Else, set 𝑖𝑖 = 𝑖𝑖 + 1, and repeat step
1.

(
Summary of the Branch and Bound algorithm
b) If 𝐿𝐿𝐿𝐿𝑖𝑖 is not fathomed, go to step 2 for branching.

Step 2. (Branching). Select one of the integer variables 𝑥𝑥𝑗𝑗 , whose optimum value 𝑥𝑥𝑗𝑗 in the LPi
solution is not integer. Eliminate the region
𝑥𝑥𝑗𝑗 ∗ < 𝑥𝑥𝑗𝑗 < 𝑥𝑥𝑗𝑗 ∗ + 1.

(where [𝑣𝑣] defines the largest integer: ≤ 𝑣𝑣) by creating two LP subproblems that correspond to
𝑥𝑥𝑗𝑗 ≤ 𝑥𝑥𝑗𝑗 ∗ and 𝑥𝑥𝑗𝑗 > 𝑥𝑥𝑗𝑗 ∗ + 1.

Set 𝑖𝑖 = 𝑖𝑖 + 1, and go to step 1.

The given steps apply to maximization problems. For minimization, we replace the lower bound with
an upper bound (whose initial value is 𝑍𝑍 ∗ = +∞).
The branch and bound technique and its application
to Mixed integer programming
An MIP example:
Maximize 𝑍𝑍 = 5𝑥𝑥1 + 4𝑥𝑥2
Subject to,
𝑥𝑥1 + 𝑥𝑥2 ≤ 5
10𝑥𝑥1 + 6𝑥𝑥2 ≤ 45
𝑥𝑥1 , 𝑥𝑥2 nonegative integer
The lattice points (dots) in the figure define the ILP solution
space. The associated continuous LP1 problem at node 1
(shaded area) is defined from ILP by removing the integer
restrictions. The optimum solution of LP1 is 𝑥𝑥1 = 3.75, 𝑥𝑥2 =
1.25, and 𝑧𝑧 = 23.75.

Because the optimum LP1 solution does not satisfy the integer
requirements, the Branch and Bound algorithm modifies the
solution space in a manner that eventually identifies the ILP
optimum.
The branch and bound technique and its application
to Mixed integer programming
First, we select one of the integer variables whose
optimum value at LP1 is not integer. Selecting 𝑥𝑥1 (=
3.75) arbitrarily, the region 3 < 𝑥𝑥1 < 4 of the LP1
solution space contains no integer values of 𝑥𝑥1 and
thus can be eliminated as non-promising. This is
equivalent to replacing the original LP1 with two new
LPs: LP2 space = LP1 space + (𝑥𝑥1 ≤ 3), and LP3
space = LP1 space + 𝑥𝑥1 ≥ 4 .

The figure depicts the LP2 and LP3 spaces. The two
spaces combined contain the same feasible integer
points as the original ILP—meaning that no
information is lost when LP1 is replaced with LP2 and
LP3.
The branch and bound technique and its application
to Mixed integer programming
If we intelligently impose sequential constraints that
exclude the integer-free regions (e.g., 3 < 𝑥𝑥1 < 4)in
LP1), we will be reducing the continuous solution
space of LP1 into a number of LP subproblems whose
optimum extreme points satisfy the integer
restrictions.

The best of these subproblems is the optimum


solution of ILP.

The new restrictions, 𝑥𝑥1 ≤ 3 and 𝑥𝑥1 ≥ 4 are mutually


exclusive, so that LP2 and LP3 at nodes 2 and 3 must
be dealt with as separate LPs, as the figure shows.
This dichotomization gives rise to the concept of
branching in the Branch and Bound algorithm. In this
case, 𝑥𝑥1 is called the branching variable.
The branch and bound technique and its application
to Mixed integer programming
The optimum ILP lies in either LP2 or LP3. Hence, both subproblems must be examined. We
arbitrarily examine LP2 (associated with 𝑥𝑥1 ≤ 3) first:
Maximize 𝑍𝑍 = 5𝑥𝑥1 + 4𝑥𝑥2
Subject to,
𝑥𝑥1 + 𝑥𝑥2 ≤ 5
10𝑥𝑥1 + 6𝑥𝑥2 ≤ 45
𝑥𝑥1 ≤3
𝑥𝑥1 , 𝑥𝑥2 ≥0
The solution of LP2 is 𝑥𝑥1 = 3, 𝑥𝑥2 = 2, and 𝑍𝑍 = 23. The LP2 solution satisfies the integer
requirements for 𝑥𝑥1 and 𝑥𝑥2 . Hence, LP2 is said to be fathomed—meaning it cannot yield any better
ILP solution and no further branching from node 2 is required.

We cannot say at this point that the integer solution obtained from LP2 is optimum for the original
problem, because LP3 may yield a better integer solution. All we can say is that 𝑍𝑍 = 23 is a lower
bound on the optimum (maximum) objective value of the original ILP.
The branch and bound technique and its application
to Mixed integer programming
This means that any unexamined subproblem that cannot yield a better objective value than the
lower bound must be discarded as nonpromising. If an unexamined subproblem produces a better
integer solution, then the lower bound must be updated accordingly.

Given the lower bound 𝑍𝑍 = 23, we examine LP3 (the only remaining unexamined subproblem at
this point). Because optimum 𝑍𝑍 = 23.75 at LP1 and all the coefficients of the objective function
happen to be integers, it is impossible that LP3 can produce a better integer solution (with 𝑍𝑍 >
23). As a result, we discard LP3 and conclude that it has been fathomed.

The Branch and Bound algorithm is now complete because both LP2 and LP3 have been examined
and fathomed, the first for producing an integer solution and the second for failing to produce a
better integer solution. We thus conclude that the optimum ILP solution is the one associated with
the lower bound—namely, 𝑥𝑥1 = 3, 𝑥𝑥2 = 2, and 𝑍𝑍 = 23.
The branch and bound technique and its application
to Mixed integer programming
Two questions remain unanswered regarding the algorithm:

1. At LP1, could we have selected x 2 as the branching variable in place of x 1 ?

2. When selecting the next subproblem to be examined, could we have solved LP3 first in-

stead of LP2?

The answer to both questions is “yes,” but ensuing computations may differ dramatically. Suppose
that we examine LP3 first (instead of LP2 as we did in the figure). The solution is 𝑥𝑥1 = 4, 𝑥𝑥2 = 0.83,
and 𝑍𝑍 = 23.33 (verify!). Because 𝑥𝑥2 = 0.832 is non-integer, LP3 is examined further by creating
subproblems LP4 and LP5 using the branches 𝑥𝑥2 ≤ 0 and 𝑥𝑥2 ≥ 1 respectively. This means that
LP4 space = LP3 space + (𝑥𝑥2 ≤ 0)= LP1 space +(𝑥𝑥1 ≥ 4) + (𝑥𝑥2 ≤ 0), and LP5 space = LP3
space+(𝑥𝑥2 ≥ 1) = LP1 space+(𝑥𝑥1 ≥ 4) + (𝑥𝑥2 ≥ 1).

Continuing in this manner, we obtain the following branch and bound tree (next slide).
The branch and bound technique and its application
to Mixed integer programming
The branch and bound technique and its application
to Mixed integer programming
The solution sequence in the figure LP1→LP3→ LP5→ LP4→ LP7→ LP6→ LP2 is intentionally
selected to dramatize a worst-case scenario that, nevertheless, may well occur in practice. In the
first attempt, we were lucky to “stumble” upon a good lower bound at the very first subproblem
(LP2), and that in turn allowed us to fathom LP3 without further examination. In essence, we
completed the procedure by solving a total of two LPs. In the above figure, the story is different;
we solved seven LPs to terminate the Branch and Bound algorithm.

The above example points to a principal weakness in the B&B algorithm: Given multiple choices,
how do we select the next subproblem and its branching variable? In answering this question,
there is but one goal in mind: Find a (good) feasible integer solution ASAP! This goal, though
stated qualitatively, is of paramount importance. The reason is simple: finding a (good) feasible
integer solution early on in the search tree can obviate exploring subproblems and hence speed
up the termination of the search. But how can a (good) feasible solution be found?
Example of Branch-and-Bound
6
x1 + x2 = 6 Max Z = 5x1 + 8x2
5 s.t. x1 + x2 ≤ 6
5x1 + 9x2 ≤ 45
4 (2.25, 3.75) x1 , x2 ≥ 0 integer

Z=41.25
2 5x1 + 9x2 = 45

1
Z=20

0 1 2 3 4 5 6 7 8
Utilizing the information about the
optimal solution of the LP-relaxation
 Fact: If LP-relaxation has integral optimal solution x*,
then x* is optimal for IP too.
 In our case, (x1, x2) = (2.25, 3.75) is the optimal solution of the
LP-relaxation. But, unfortunately, it is not integral.

• The optimal value is 41.25 .


 Fact: OPT(LP-relaxation) ≥ OPT(IP)
(for maximization problems)
That is, the optimal value of the LP-relaxation is an
upper bound for the optimal value of the integer
program.
• In our case, 41.25 is an upper bound for OPT(IP).
Branching step
• In an attempt to find out more about the location of the IP’s
optimal solution, partition the feasible region of the LP-
relaxation.
• Choose a variable that is fractional in the optimal solution to the
LP-relaxation – say, x2 . Observe that every feasible IP point
must have either x2 ≤ 3 or x2 ≥ 4 .
• With this in mind, branch on the variable x2 to create the
following two subproblems:
Subproblem 1 Subproblem 2
Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
s.t. x1 + x2 ≤ 6 s.t. x1 + x2 ≤ 6
5x1 + 9x2 ≤ 45 5x1 + 9x2 ≤ 45
x2 ≤ 3 x2 ≥ 4
x1 , x2 ≥ 0 x1 , x2 ≥ 0
• Solve both subproblems
(note that the original optimal solution (2.25, 3.75) can’t recur)
Branching step (graphically)
Z=41
Subproblem 1: Opt. solution (3,3) with value 39
5 Subproblem 2: Opt. solution (1.8,4) with value 41
Subproblem 2
4
(1.8, 4)

3 (3, 3)

2
Subproblem 1

1
Z=20 Z=39

0 1 2 3 4 5 6 7 8
Solution tree
S1: x2 ≤ 3
For each subproblem, we record
All
(3, 3) int.
• the restriction that creates the subproblem Z=39
(2.25, 3.75)
• the optimal LP solution
Z=41.25 S2: x2 ≥ 4
• the LP optimum value
(1.8, 4)
Z=41
The optimal solution for Subproblem 1 is integral: (3, 3).
 If further branching on a subproblem will yield no useful
information, then we can fathom (dismiss) the subproblem.
In our case, we can fathom Subproblem 1 because its solution is integral.
 The best integer solution found so far is stored as incumbent.
The value of the incumbent is denoted by Z*.
In our case, the first incumbent is (3, 3), and Z*=39.
 Z* is a lower bound for OPT(IP): OPT(IP) ≥ Z* .
In our case, OPT(IP) ≥ 39. The upper bound is 41: OPT(IP) ≤ 41.
Next branching step (graphically)
- Fathom Subproblem 1.
5 - Branch Subproblem 2 on x1 :
(1, 4.44)
Subpr. 3 Subpr. 4
Subproblem 3: New restriction is x1 ≤ 1.
4 Opt. solution (1, 4.44) with value 40.55
Subproblem 4: New restriction is x1 ≥ 2.
The subproblem is infeasible
3
Z=40.55

1
Z=20

0 1 2 3 4 5 6 7 8
Solution tree (cont.)
S1: x2 ≤ 3
int.
All (3, 3) S3: x1 ≤ 1
(2.25, 3.75) Z=39
(1, 4.44)
Z=41.25
S2: x2 ≥ 4 Z=40.55

(1.8, 4)
Z=41 S4: x1 ≥ 2
infeasible

 If a subproblem is infeasible, then it is fathomed.


In our case, Subproblem 4 is infeasible; fathom it.

 The upper bound for OPT(IP) is updated: 39 ≤ OPT(IP) ≤ 40.55 .

 Next branch Subproblem 3 on x2 .


(Note that the branching variable might recur).
Next branching step (graphically)
(0, 5) Branch Subproblem 3 on x2 :
5 Subproblem 5: New restriction is x2 ≤ 4.
Feasible region:
4 the segment joining (0,4) and (1,4)
(1, 4) Opt. solution (1, 4) with value 37
Subproblem 6: New restriction is x2 ≥ 5.
3 Feasible region is just one point: (0, 5)
Opt. solution (0, 5) with value 40
2

1
Z=20

0 1 2 3 4 5 6 7 8
Solution tree (final)
S1: x2 ≤ 3 S5: x2 ≤ 4
int.
All (3, 3) S3: x1 ≤ 1 (1, 4) int.
(2.25, 3.75) Z=39 Z=37
(1, 4.44)
Z=41.25
S2: x2 ≥ 4 Z=40.55 S6: x2 ≥ 5
(1.8, 4) (0, 5)
int.
Z=41 S4: x1 ≥ 2 Z=40
infeasible
 If the optimal value of a subproblem is ≤ Z*, then it is fathomed.
• In our case, Subproblem 5 is fathomed because 37 ≤ 39 = Z*.
 If a subproblem has integral optimal solution x*,
and its value > Z*, then x* replaces the current incumbent.
• In our case, Subproblem 5 has integral optimal solution, and its value
40>39=Z*. Thus, (0,5) is the new incumbent, and new Z*=40.
 If there are no unfathomed subproblems left, then the current
incumbent is an optimal solution for (IP).
• In our case, (0, 5) is an optimal solution with optimal value 40.
The branch and bound technique and its application
to Mixed integer programming
Another MIP Example. We will now illustrate this algorithm by applying it to the following MIP
problem:

Maximize 𝑍𝑍 = 4𝑥𝑥1 − 2𝑥𝑥2 + 7𝑥𝑥3 − 𝑥𝑥4


subject to
𝑥𝑥1 + 5𝑥𝑥3 ≤ 10
𝑥𝑥1 + 𝑥𝑥2 − 𝑥𝑥3 ≤1
6𝑥𝑥1 − 5𝑥𝑥2 ≤0
−𝑥𝑥1 + 2𝑥𝑥3 − 2𝑥𝑥4 ≤ 3
𝑥𝑥𝑗𝑗 ≥ 0, for all 𝑗𝑗 = 1,2,3,4
𝑥𝑥𝑗𝑗 is integer for all 𝑗𝑗 = 1,2,3

Initialization: After setting 𝑍𝑍 ∗ = −∞, we form the LP relaxation of this problem by deleting the set of
constraints that 𝑥𝑥𝑗𝑗 is integer for all 𝑗𝑗 = 1,2,3. Applying the simplex method to this LP relaxation
5 3 7 1
yields its optimal solution, 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = , , ,0 , with 𝑍𝑍 = 14 .
4 2 4 4
The branch and bound technique and its application
to Mixed integer programming
Iteration 1: In this optimal solution for the LP relaxation, the first integer-restricted variable that has
5
a non-integer value is 𝑥𝑥1 = , so 𝑥𝑥1 becomes the branching variable. Branching from the All node (all
4
feasible solutions) with this branching variable then creates the following two subproblems:

Subproblem 1: Original problem plus additional constraint, 𝑥𝑥1 ≤ 1.

Subproblem 2: Original problem plus additional constraint, 𝑥𝑥1 ≥ 2.

Deleting the set of integer constraints again and solving the resulting LP relaxations of these two
subproblems yield the following results.
6 9 1
Subproblem 1: 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = 1, , , 0 , with 𝑍𝑍 = 14 .
5 5 5

1
Bound for subproblem 1: 𝑍𝑍 ≤ 14 .
5

Subproblem 2: No feasible solutions.


The branch and bound technique and its application
to Mixed integer programming
Iteration 2: With only one remaining subproblem, corresponding to the 𝑥𝑥1 ≤ 1 node. Examining its
LP relaxation’s optimal solution given below, we see that this node reveals that the branching
6
variable is 𝑥𝑥2 ,because 𝑥𝑥2 = is the first integer-restricted variable that has a non-integer value.
5
Adding one of the constraints 𝑥𝑥2 ≤ 1 or 𝑥𝑥2 ≥ 2 then creates the following two new subproblems.

Subproblem 3: Original problem plus additional constraints, 𝑥𝑥1 ≤ 1, 𝑥𝑥2 ≤ 1.

Subproblem 4: Original problem plus additional constraints, 𝑥𝑥1 ≤ 1, 𝑥𝑥2 ≥ 2.

Solving their LP relaxations gives the following results,


5 11 1
Subproblem 3: 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = , 1, , 0 , with 𝑍𝑍 = 14 .
6 6 6

1
Bound for subproblem 3: 𝑍𝑍 ≤ 14 .
6

5 11 1 1
Subproblem 4: 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = , 2, , 0 , with 𝑍𝑍 = 12 . Bound for subproblem 4: 𝑍𝑍 ≤ 12 .
6 6 6 6
The branch and bound technique and its application
to Mixed integer programming
Because both solutions exist (feasible solutions) and have non-integer values for integer-restricted
variables, neither subproblem is fathomed. (Test 1 still is not operational, since 𝑍𝑍 ∗ = −∞ until the
first incumbent is found.)

Iteration 3: With two remaining subproblems (3 and 4) that were created simultaneously, the one
1 1
with the larger bound (subproblem 3, with 14 > 12 ) is selected for the next branching. Because
6 6
5
𝑥𝑥1 = has a non-integer value in the optimal solution for this subproblem’s LP relaxation,
6
𝑥𝑥1 becomes the branching variable. This leads to the following new subproblems,

Subproblem 5: Original problem plus additional constraints, 𝑥𝑥1 ≤ 1, 𝑥𝑥2 ≤ 1, 𝑥𝑥1 ≤ 0, so 𝑥𝑥1 = 0.

Subproblem 6: Original problem plus additional constraints, 𝑥𝑥1 ≤ 1, 𝑥𝑥2 ≤ 1, 𝑥𝑥1 ≥ 1, so 𝑥𝑥1 = 1.
The branch and bound technique and its application
to Mixed integer programming
The results from solving their LP relaxations are given below,
1 1
Subproblem 5: 𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = 0,0,2, , with 𝑍𝑍 = 13 .
2 2

Subproblem 6: No feasible solutions.

Subproblem 6 is immediately fathomed by test 2. However, note that subproblem 5 also can be
fathomed. Test 3 passes because the optimal solution for its LP relaxation has integer values (𝑥𝑥1 =
1
0, 𝑥𝑥2 = 0, 𝑥𝑥3 = 2) for all three integer-restricted variables. Thus, we have 𝑍𝑍 ∗ = 13 , the first
2

incumbent solution. Using this 𝑍𝑍 to reapply fathoming test 1 to the only other subproblem
1
(subproblem 4) is successful, because its bound 12 ≤ 𝑍𝑍 ∗ . Thus, optimal solution:
6
1
𝑥𝑥1 , 𝑥𝑥2 , 𝑥𝑥3 , 𝑥𝑥4 = 0,0,2, .
2
The branch and bound technique and its application
to Mixed integer programming
Software options to solve integer programming
problems
•All the software packages (Excel, LINGO/LINDO, and MPL, CPLEX) include an algorithm for solving
(pure or mixed) BIP models, as well as an algorithm for solving general (pure or mixed) IP models
where variables need to be integer but not binary.

•When using Excel, in addition to the constraints that fit linear programming, you also need to add
the integer constraints. This is accomplished in the Add Constraint dialogue box by choosing the
range of integer-restricted variables on the left-hand side and then choosing “int” from the pop-up
menu. In the case of binary variables, choose “bin” from the pop-up menu instead.

•A LINGO model uses the function @BIN() to specify that the variable named inside the
parentheses is a binary variable. For a general integer variable (one restricted to integer values
but not just binary values), the function @GIN() is used in the same way.

•For an MPL model, the keyword INTEGER is used to designate general integer variables, whereas
BINARY is used for binary variables.
Review
Conclusions
•IP problems arise frequently because some or all of the decision variables must be restricted to
integer values. There also are many applications involving yes-or-no decisions (including
combinatorial relationships expressible in terms of such decisions) that can be represented by
binary (0– 1) variables. These factors have made integer programming one of the most widely
used OR techniques.

•IP problems are more difficult than they would be without the integer restriction, so the algorithms
available for integer programming are generally much less efficient than the simplex method.

•For a fixed number of integer variables, BIP problems generally are much easier to solve than
problems with general integer variables, but adding continuous variables (MIP) may not increase
computation time substantially. Other much smaller problems without such special structure may
not be solvable.

•Computer codes for IP algorithms now are commonly available in mathematical programming
software packages.
Exercises
Vincent Cardoza is the owner and manager of a machine shop that does custom order work. This Wednesday
afternoon, he has received calls from two customers who would like to place rush orders. One is a trailer hitch
company which would like some custom-made heavy-duty tow bars. The other is a mini-car-carrier company which
needs some customized stabilizer bars. Both customers would like as many as possible by the end of the week
(two working days). Since both products would require the use of the same two machines, Vincent needs to
decide and inform the customers this afternoon about how many of each product he will agree to make over the
next two days.

Each tow bar requires 3.2 hours on machine 1 and 2 hours on machine 2. Each stabilizer bar requires 2.4 hours
on machine 1 and 3 hours on machine 2. Machine 1 will be available for 16 hours over the next two days and
machine 2 will be available for 15 hours. The profit for each tow bar produced would be $130 and the profit for
each stabilizer bar produced would be $150. Vincent now wants to determine the mix of these production
quantities that will maximize the total profit.

(a) Formulate an IP model for this problem.

(b) Use a branch and bound approach to solve this model.


Exercises
Pawtucket University is planning to buy new copier machines for its library. Three members of its Operations
Research Department are analysing what to buy. They are considering two different models: Model A, a high-
speed copier, and Model B, a lower-speed but less expensive copier. Model A can handle 20,000 copies a day,
and costs $6,000. Model B can handle 10,000 copies a day, but costs only $4,000. They would like to have at
least six copiers so that they can spread them throughout the library. They also would like to have at least one
high-speed copier. Finally, the copiers need to be able to handle a capacity of at least 75,000 copies per day. The
objective is to determine the mix of these two copiers which will handle all these requirements at minimum cost.

(a) Formulate an IP model for this problem.

(b) Use a graphical approach to solve this model.

You might also like