You are on page 1of 31

CHAPTER FIVE

Integer Programming
5.1. Introduction
Not too long after more and more applications of linear programming were developed it became
apparent that in some of these applications, the variables would not be able to attain just any
(nonnegative) value, but should be integers. As a simple applications, if a variable has been
defined to denote the number of cans of beans manufactured in the planning period, then surely it
would make no sense to make, say, 1,305,557.3 cans: the last 0.3 cans would have to be rounded
up or down. While this may be an acceptable practice when dealing with this application (after
all, it makes very little difference whether or not we make 0.3 cans more or less), in other
applications this may make a huge difference. For instance, assigning airplanes to routes or
trucks to deliveries may very well make the difference between gain and loss. Furthermore,
simply rounding up or down a non-integer (usually referred to as a continuous solution) will not
necessarily result in an optimal integer solution. We will demonstrate this fact below. Even
though the difference may be blurry, it may be useful to distinguish between variables that are
naturally required to be integer (such as the number of trucks to be used for deliveries, the
number of work crews dispatched to a construction site, or the number of drums of hazardous
material shipped from one site to another), and so-called logical variables that also must be
integer and are introduced for logical reasons. Integer programming problems were first
discussed by Gomory in the 1950s, who also devised a solution technique for them. Gomory’s
class of techniques is called cutting plane techniques, and we will describe their basic idea
below. A breakthrough is the 1961 contribution by Land and Doig, whose branch-and bound
method remains the standard solution technique to this day.
The topics we have discussed so far are based on the formulation of linear programming and its
application. As stated in its characteristics certainty and divisibility are the basic assumptions
along with proportionality and additively. The assumption of certainty which contradicts the real
world business environment has been solved using post analysis method. The assumption of
divisibility in linear programming allows the decision variable to have both continuous and
integer value/s. However there are many real world problems which do not permit the continuous
values for decision variables like for instance number of people or operator, number of machine,
car, or those decision problems requiring yes or no/ connect /disconnect, install/ not install, fail
or pass are problems need to be formulated based on integer programming. Integer linear
programs (ILPs) are linear programs with some or all the decision variables restricted to integer
(or discrete) values. Based on this integer linear programming can be either of the following.
i. Integer programming (pure integer programming): All decision variables are integers

ii. Mix-Integer Programming: Some decision variables are integers (binary or not) and
some are continuous.

iii. Binary Integer Programming: Decision variables are binary

Definition: The LP obtained by omitting all integers or 0–1 constraints on variables is called the
LP relaxation of the IP.
Any IP may be viewed as the LP relaxation plus additional constraints (the constraints that state
which variables must be integers or be 0 or 1). Hence, the LP relaxation is a less constrained, or
more relaxed, version of the IP. This means that the feasible region for any IP must be contained
in the feasible region for the corresponding LP relaxation. For any IP that is a max problem, this
implies that

If the feasible region for a pure IP’s LP relaxation is bounded, then the feasible region for the IP
will consist of a finite number of points.
The study of ILPs is based on the three areas of concerns, theory application and computation.
We find that many real-life situations may be formulated as ILPs. Unfortunately, we will also see
that ILPs are usually much harder to solve than LPs.
Capital budgeting, facility location (covering problem), scheduling (both machine and operator),
Knapsack Problems, traveling salesman problem (TSP) and fixed charge problems are example
of application for LIP. 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 cost
resulted from tooling setup prior to any production is fixed cost while the cost of labor and
material proportional to the amount produced or manufactured is a variable cost. The total cost
C ( x) for x level of production is the result of the fixed charge cost F and the variable unit costc
will have the following formulation:

{
C ( x )= F+ cx if x .0
0 otherwise
C ( x )is intractable analytically at x=0 as it brings discontinuity at this point. This intractability
however can be addressed using binary variable.
The drawback of integer linear programming algorithm is their lack of consistency in solving
integer problems.
5.2. Formulation of IP
The complete name of IP is integer linear programming and the adjective linear normally is
dropped if the concern is to be with the more esoteric integer nonlinear programming problem
which is not the scope of this lecture. The mathematical model for integer programming is the
linear programming model with the one additional restriction that the variables must have integer
values.
Practical problems can be formulated as IPs. For instance budgeting problems, knapsack
problems, fixed charge production and location problems, set covering problems, etc.
5.2.1. Budgeting Problems
In budget problem the problem formulation is about how to maximize net present value (NPV)
of the investment and decision/s regarding whether or not investment should be made in
individual projects. For the case of capital budgeting let have the following problem.
Capital Budgeting
A stock is considering four investments with an expected yield of net present value of each
$8,000, $11,000, $6,000, $4,000. Each investment requires at certain cash flow at the present
time ($5,000, $7,000, $4,000, $3,000. If the stock currently has $14,000 available for investment
the problem is to formulate an IP whose solution will tell Stock how to maximize the NPV
obtained from the four investments.
Solution
The decision for the stock is either to make or not. Hence the decision variable x j=1 means the
stock will make investment j( j=1,2,3,4) and x j=0 is stock will not make investment j . This
leads to the 0-1 (binary integer programming) problem as follow:

Straightforward “bang for buck” (taking ratios of objective coefficient over constraint
coefficient) suggests that investment 1 is the best choice (i.e., the greater the ratio value the
higher the variable to basic variable). Ignoring integrality constraints, the optimal linear
programming solution is:
x1 = x2 = 1, x3 = 0.5, and x4 = 0 for a value of $22

As it is shown in result the value of x 3=0.5 which, is not integer. We can make x 3 integer by
rounding it to 0 and 1. But upper bounding however makes the problem infeasible (
5+7+ 6 isnot less than 14) while x 3=0 is feasible(5+7=12 ≤14) . Hence x 1=x 2=1 , x 3=x 4 =0
gives the objective value of 8+11=19.
For the better optimal solution for the binary integer programming problem can be formulated in
WINQSB software as follow:

And the combined final solution of the problem using branch and bound method is:

In fact any IP that has only one constraint is referred to as a knapsack problem. The coefficients
of this constraint and the objective are all non-negative. The traditional story is that: There is a
knapsack. There are a number of items, each with a size and a value. The objective is to
maximize the total value of the items in the knapsack. Knapsack problems are nice because they
are (usually) easy to solve.
But if modify the above Stock capital budgeting formulation to account for each of the following
requirements:
1 Stock capital can invest in at most two investments.
2 If Stock capital invests in investment 2; they must also invest in investment 1.
3 If Stock capital invests in investment 2; they cannot invest in investment 4.
Solution
1. Simply add the constraint
x 1+ x2 + x 3 + x 4 ≤2 to (5.1)
2. in terms of x 1 and x 2 this requirement states that if x 1=1, then x 1 must also equal
1. If we add the constraint x 1 ≤ x 2 or x 2−x 1 ≤ 0 to (7.1). Then we will have taken care of the
second requirement. Two possibilities can be considered either x 2=1 or x 1=0 . Case 1 x 2=1
implies the above expression x 1 ≥ 1 because x 1 must equal 0 or 1, this implies that x 1=1 as
required by the above expression. Case 2, x 2=0 , in this case the expression reduces to x 1 ≥ 0
which allows x 1=0 or x 1=1. In short, if x 2=0, the expression does not restrict the value of x 1, this
is also consistent with requirement 2. In summary, for any value of x 2, the expression given
above is equivalent requirement 2.
3. Simply add the constraint
x 2+ x 4 ≤ 1 to (5.1). Now again two cases can be observed in this requirement x 2=1∨x 2=0. the
first case is x 2=1 which makes investment 2 to be selected but not investment 4. If x 2=1 the
expression given for requirement does imply 1+ x 4 ≤1 or x 4 ≤ 0 and consists with the requirement.
For the second case x 2=0 requirement 3 does not restrict the value of x 4 . Note that if x 2=0 , then
the expression x 2+ x 4 ≤ 1 reduce to x 4 ≤1 , which also leaves x 4 to equal 0 or 1.

5.2.2 Fixed Charge Problems

There is a cost associated with performing an activity at a nonzero level that does not depend on
the level of the activity. Bahir Dar Garment Company is capable of manufacturing three types of
clothing: shirts, shorts, and pants. The manufacture of each type of clothing requires that the
company have the appropriate type of machinery available. The machinery needed to
manufacture each type of clothing must be rented at the following rates: shirt machinery, $200
per week; shorts machinery, $150 per week; pants machinery, $100 per week. The manufacture
of each type of clothing also requires the amounts of cloth and labor shown in the Table below.
Each week, 150 hours of labor and 160 sq yd of cloth are available. The variable unit cost and
selling price for each type of clothing are given. Formulate an IP whose solution will maximize
Gandhi’s weekly profits
Solution: we define a decision variable for each decision that the Company must make.
Clearly, the company must decide how many of each type of clothing should be manufactured
each week, so we define:

Note that the cost of renting machinery depends only on the types of clothing produced, not on
the amount of each type of clothing. This enables us to express the cost of renting machinery by
using the following variables.

In short, if x j ≥ 0 , y j=1. and if x j=0 , y j=0. Thus the weekly profit for the company is:

Because the cost of renting, say, shirt machinery does not depend on the number of shirts
produced, the cost of renting each type of machinery is called a fixed charge. A fixed charge for
an activity is a cost that is assessed whenever the activity is undertaken at a nonzero level. The
presence of fixed charges will make the formulation of the problem much more difficult.
We can now express weekly profits as:
Now the company wants to maximize its profit as:

And the following will be the complete formulation for the problem

The optimal solution for this formulation however does not seem feasible as all y i=0 for each of
x 1=30 , x3 =10 , x 2=0 production levels. These are meant that without any machinery for shirt,
and pant there exist a production of 30 shirts and 10 pants which is impossible. This is however
due to the fault during formulation of to include y i as system constraint. Since supply of labor
and cloth is limited, Company faces two constraints. To ensure x j > 0 forces y i = 1, we include
the additional constraints.
xj≤M j y j
Where M j is the large positive number? In order to make this additional constraint a limit for x j
it is better to make it as large as possible but M j should be set equal to the maximum value that
x j can attain (the coefficient of x j helps for the determination). x 1Has maximum coefficient on
cloth constraint (4 >3) than labor constraint. Hence the maximum shirt can be produced is
160
M 1= =40 . If M1 were not chosen large (say M 1=10), then the additional constraint for shirts
4
would unnecessarily restrict the value of x 1). The maximum production of short ( x 2) can be
160
obtained from the again the cloth constraint as 3>2 and therefore M 2= ≅ 53. labor constraint
3
on the other hand limits the maximum production of pants as x 3 has 6 confident value on it than
150
cloth constraint which is 4. M 3= =25.
6
Based on this the following complete formulation can guarantee the feasibility of the optimal
solution x 3=25 , y 1=1 giving z=75.

5.2.3. Covering Problems.

Covering problem is a kind of membership in a specified subset that can be formulated using
decision variables x j equal to 1 if an object is part of a solution and 0 otherwise. Set covering, set
packing, and set partitioning models formulate problems where the core issue is membership in
specified subsets. Many applications in areas such as location problems (fire/police station,
warehouse, and facility), scheduling (crew, airline, truck, and bus), and political districting are
covering problems.
Set covering constraints
Require that at least one member of sub collection j belongs to a solution:
∑ x j ≥ 15.2 Set packing constraints
j=1

Require that at most one member of sub-collection j belongs to a solution


∑ x j ≤ 15.3
j=1

Set partitioning constraints


Require that exactly one member of sub-collection J belongs to a solution
∑ x j=15.4
j=1

Set Covering Problems


Each member of a given set (call it set 1) must be “covered” by an acceptable member of some
set (call it set 2). The objective of a set-covering problem is to minimize the number of elements
in set 2 that are required to cover all the elements in set 1.
Example:
There are six sites in Addis Ababa. The Addis Ababa must determine where to build fire stations.
The city wants to build the minimum number of fire stations needed to ensure that at least one
fire station is within 15 minutes (driving time) of each site. The times (in minutes) required to
drive between the sites in Addis Ababa are shown in below. Formulate an IP that will tell Addis
Ababa how many fire stations should be built and where they should be located.
To- site
From -site 1 2 3 4 5 6
1 0 10 20 30 30 20
2 10 0 25 35 20 10
3 20 25 0 15 30 20
4 30 35 15 0 15 25
5 30 20 30 15 0 14
6 20 10 20 25 14 0
Solution
Here the decision is whether to open or not the fire station in the site and let define the binary
variable x i=0∨1. for i=1,2 , … 6 and the following is true.

6
Then the total number of fire stations that are built is given by ∑ x i and objective function is to
i=1

minimize z=x 1 + x 2+ x 3 + x 4 + x 5 + x 6.
To ensure the speed constraint, at least one fire station is within the 15 minute of site x i. Each
constraint should state that there must be a station either in site j or in some adjacent site. The j- th
column of the constraint matrix represents the set of site that can be served by a fire station in
site j.
The table indicates which locations can reach the site in 15 minutes or less. To ensure that at
least one fire station is within 15 minutes of site 1, we add the constraint.
x 1+ x2 ≥1 . (Site 1 constraint)
This constraint ensures that x 1=x 2=0 is impossible so at least one fire station will be built within
15 minutes of site 1. Similarly the constraint
x 1+ x2 + x 1+ x6 ≥ 1≥ 1 (Site 2 constraint) ensures that at least one fire station will be located within
15 minutes of site 2. In a similar fashion, we obtain constraints for sites 3–6. Combining these
six constraints with the objective function (and with the fact that each variable must equal 0 or
1), we obtain the following 0–1 IP:

One optimal solution to this IP is z =2, x 2=x 4=1.


Hence the city can build two fire stations: one in site 2 and one in site 4.
Set-covering problems have many applications in areas such as airline crew scheduling, political
districting, airline scheduling, and truck routing.
5.2.4 Traveling Salesperson Problems
Given a number of cities and the costs of traveling from any city to any other city, what is the
cheapest round-trip route (tour) that visits each city once and then returns to the starting city?”
This problem is called the traveling salesperson problem (TSP) which is a generic and
generalization of vehicle routing problem in different variants, not surprisingly. An itinerary that
begins and ends at the same city and visits each city once is called a tour. Suppose there are N
cities and c ij is distance from city i to city j (fori≠ j) and let c ii =M (a very large number relative
to actual distances). Also let define x ij as a 0-1 variable as follow:

{
x ij = 1if s /he goes city i ¿ city j; ¿ 0 otherwise ¿
¿
The formulation of the TSP is:
Min ∑ ∑ c ij x ij 5.5 a
i j

Subject to
∑ x ij=1 , ∀ j, ( ¿ bound constraint ) 5.5 b
i

∑ x ij=1 , ∀ i , ( out bound constraint ) 5.5 c


j

U i−U j + N xij ≤ N −1(subtour elimination constraint)5.5 d


All x ij ≥ 0 ,∧U i ≥ 0(Non−negativity constraint) 5.5 e
Equation 5.5 guarantee that the objective of TSP is to minimize to tall traveling cost while Eq.
(5.5b) and Eq. (5.5c) indicates inbound and out bound constraints, i.e., a travel man arrives once
in each city ( inbound) and leaves once each city (outbound).
Assume that N=5. and if we have two routs as r 1=1−5−2−1 ,r 2=3−4−3.
Choose the sub-tour that does not contain city 1.

This rules out the possibility that x 34 =x 43=1 and x 34 + x 43 =2 which must give 5*2 =10 which is
greater than 10.
An IP formulation can be used to solve a TSP but can become unwieldy and inefficient for large
TSPs. When using B&B methods to solve TSPs with many cities, large amounts of computer
time are needed. Heuristic methods, or heuristics, can be used to quickly lead to a good (but not
necessarily optimal) solution.
The application of IP has been extended up to the either or and if and then constraints. The
importance of binary decision variable has state to remove the discontinuity of objective
function. An either or model of IP is used for constraints that are not satisfied simultaneously and
if the constraints are dependent if-then both under binary decision variable can be implemented.
Example: Gizachew uses a single machine to process three jobs. Both the processing time and
the due date (in days) for each job are given in the table. The due date is measured from zero, the
assumed start time of the first job.
Processing Due date Late penalty
Job time (days) (days) Birr/day
1 5 25 19
2 20 22 12
3 15 35 34

The objective of the problem is to determine the minimum late-penalty sequence for processing
the three jobs.

Solution:
Let define x j=¿ start date in days for job j (measured from zero.) the problem has two types of
constraints the noninterference constraint (guaranteeing that no two jobs are processed
concurrently) and the due date constraints. Let us consider the noninterference constraint first.
Two jobs i and j with processing time pi and p j will not be processed concurrently if either
x i ≥ x j + p j or x j ≥ x i + pi depending on whether job j precedes job i or vice versa. Because all
mathematical program deal with simultaneous constraint only, we transform the either-or
constraint by introducing the following auxiliary binary variable:

{
y ij 1 ,if i precedes j
0 , if j precede i
For M sufficiently large, the either, or-constraint is converted to the following two simultaneous
constraints
My ij +( x i−x j) ≥ p j and M(1- y ij )+( x j− xi ) ≥ p i
The conversion guarantees only one of the two constraints can be active at any one time. If y ij =0
the first constraint is active, and the second is redundant (because its left-hand side will include
M, which is much larger than pi). If y ij =1, the first constraint is redundant, and the second is
active.
Now let us consider the due-date constraint. Given that d j is the due date for job j and let s j
unrestricted variable. Then, the associated constraint is:
x j + p j+s j=d j
If s j ≥ 0 the due date is met, and s j ≤ 0 a late penalty applies; using the substitution
+¿ ≥0¿
−¿, s ¿
+ ¿,s j j
¿
−¿−s j ¿
s j=s j
Then the constraint becomes
+ ¿=d j−p j ¿
−¿− sj ¿
x j+s j
+ ¿¿
The late-penalty cost is proportional to s j and the model for the given problem is:
+ ¿+ 34s 3 +¿ ¿ ¿
+¿+12 s2 ¿
Minimize Z=19 s1
Subject to

5.3. Solving IP
We have gone through a number of examples of IPs at the “Formulating IP Problems” section.
“How can we get solutions to these models?” There are two common approaches:
The technique based on dividing the problem into a number of smaller problems in a tree search
method called branch and bound. The method based on cutting planes (adding constraints to
force integrality). Actually, all these approaches involve solving a series of LP. For solving LP’s
we have general purpose (independent of the LP being solved) and computationally effective
(able to solve large LP's) algorithms (simplex or interior point).
For any IP we can generate an LP by taking the same objective function and same constraints but
with the requirement that variables are integer replaced by appropriate continuous constraints:
The LP obtained by omitting all integer and 0-1 constraints on variables is called the LP
Relaxation of the IP (LR). We can then solve this LR of the original IP. If LR is optimized by
integer variables then that solution is feasible and optimal for IP. In other words, if the solution is
turned out to have all variables taking integer values at the optimal solution, it is also optimal
solution for IP:
LR – IP Relation
Since LR is less constrained than IP
If IP is a maximization problem, the optimal objective value for LR is greater than or equal to
that of IP.
If IP is a minimization problem, the optimal objective value for LR is less than or equal to that of
IP.
If LR is infeasible, then so is IP. So solving LR does give some information. It gives a bound on
the optimal value, and, if we are lucky, may give the optimal solution to IP. In IP the obvious
solution approach is simply to enumerate all these possibilities - calculating the value of the
objective function at each one and choosing the (feasible) one with the optimal value.
Example Multi-period Capital Budgeting

Possible Solutions
There are 24=16 possible solutions
Hence for our example, we merely have to examine 16 possibilities before we know precisely
what the best possible solution is. This example illustrates a general truth about integer
programming.
For solving LP’s we have general purpose (independent of the LP being solved) and
computationally effective (able to solve large LP's) algorithms (simplex or interior point).
For solving IP's no similar general purpose and computationally effective algorithms exist that is
why an LR is needed.
5.3.1 The Branch-and-Bound Method.
The most effective general purpose optimal algorithm is an LP-based tree search approach called
as branch and bound (B&B). The method was first put forward in the early 1960's by Land and
Doig. This is a way of systematically (implicitly) enumerating feasible solutions such that the
optimal integer solution is found.
Where this method differs from the enumeration method is that not all the feasible solutions are
enumerated but only a part (hopefully a small part) of them. However we can still guarantee that
we will find the optimal integer solution. By solving a single sub-problem, many possible
solutions may be eliminated from consideration. Sub-problems are generated by branching on an
appropriately chosen fractional valued variable. Suppose that in a given sub-problem (call it
subp.1), assumes a fractional value between the integer i and i+1. Then the two newly generated
sub-problems
Subp.2 = Subp.1 + Constraint “xi ≥ i+1”
Subp.3 = Subp.1 + Constraint “xi ≤i ”
If all variables have integer values in the optimal solution to the sub-problem then the solution is
a feasible solution for the original IP. If the current feasible solution for the IP has a better z-
value than any previously obtained feasible solution, then it becomes a candidate solution, and
its z-value becomes the current Lower Bound (LB) on the optimal z-value (for a max problem).
If it is unnecessary to branch on a sub-problem, we say that it is fathomed (inactive):

The sub-problem is infeasible


The sub-problem yields an optimal solution in which all variables have integer values
The optimal z-value for the sub-problem does not exceed the current LB, so it cannot
yield the optimal solution of the IP.

Two general approaches are used to determine which sub-problem should be solved next:
i. Backtracking (LIFO)
Leads us down one side of the B&B tree and finds a candidate solution. Then we backtrack our
way up to the top of the other side of the tree.
ii. Jump tracking
Solves all the problems created by branching. Then it branches again on the node with the best z-
value. Often jumps from one side of the tree to the other. A display of the sub-problems that have
been created is called a tree. Each sub-problem is referred to as a node of the tree.
Each additional constraint is referred to as a line (arc) connecting two nodes (old sub-problem
and one of the new sub-problems) of the tree.
Example A (pure integer)

Solution
Suppose that we were to solve the LR of the problem [replace “x1, x2 ≥ 0 and integer “by “x1, x2 ≥
0”]
Then using any LP package or utilizing simplex or graphical solution method we get the
following results. Z= 41.25, x 1=3.75 , x2=2.25
As a result of this we now know something about the optimal integer solution, namely that it is
less or equal to 41.25 i.e. this value of 41.25 is an Upper Bound on the optimal integer solution.
This is because when we relax the integrality constraint we (as we are maximizing) end up with a
solution value at least that of the optimal integer solution (and maybe better).
We arbitrarily choose a variable that is fractional in the optimal solution to the LR.
(subp.1): say, x 1 .
We need x 1 to be integer. We branch on x 1 and create two new sub-problems.
Subp.2: LR + “ x 1 ≥ 4”
Subp.3: LR + “ x 1 ≤ 3”
Observe that neither subp.2 nor subp.3 includes any points with x 1=3.75. This means that the
optimal solution to LR can not recur when we solve these new sub-problems. Let again choose
arbitrarily Subp.2

Solving the new problem then gives an optimal value of x 1=4 , x 2=1.8 , z=41

x 2 is not integer in Subp.2 and we branch on x 2 and create two new sub-problems:
Subp.4: LR + x 1 ≥ 4 and x 2 ≥ 2 = Subp.2 + x 2 ≥ 2
Subp.5: LR + x 1 ≥ 4 and x 2 ≤ 1 = Subp.2 + x 2 ≤ 1
The set of unsolved sub-problems are consists of subp.3, 4, and 5. We choose to solve the most
recently created sub-problem (This is called LIFO): The LIFO rule implies that we should next
solve subp.4 or 5. We now arbitrarily choose to solve subp.4.

We see that subp.4 is infeasible. Thus subp.4 cannot yield the optimal solution to the IP. Because
any branches emanating from subp.4 will yield no useful information, it is fruitless to create
them

LIFO rule implies that we should next solve subp.5. (Subp.5: LR + x 1 ≥ 4 and x 2 ≤ 1 = Subp.2 +
x 2 ≤ 1)

And the optimal solution for


Subp.5 is: z= 40.556,
x 1=4.44 , x 2=¿1 ¿

We branch on fractional-valued
x1
Subp.6: Subp.5 + x1 ≥ 5
Subp.7: Subp.5 + x1 ≤ 4
Subp.3, 6, and 7 are now unsolved. The LIFO rule implies that we next solve subp.6 or 7. We
now arbitrarily choose to solve subp.7.
The optimal solution to subp.7 is z = 37, x 1 = 4, x 2 = 1
As both variables assume integer values, this solution is feasible for the original IP. This solution
is a candidate solution. We must keep this candidate solution until a better feasible solution to
the IP (if any exists) is found. We may conclude that the optimal z-value for the IP ≥ 37 which is
a Lower Bound (LB).

LIFO rule implies that we should next solve subp.6.

And the optimal solution to subp.6 is z = 40, x 1 = 5, x 2 = 0. Here the value of z is larger than the
LB obtained from subp7, which is 37. Thus subp.7 cannot yield the optimal solution of the IP
and we have to update the lower bound (LB) to 40.
Subp.3 is the only remaining unsolved problem

And the optimal solution to subp3 is


z = 39, x 1 = 3, x 2 = 3
Subp.3 cannot yield a z-value exceeding the current LB, so it cannot yield the optimal solution to
the IP.

Final B&B Tree


Optimal Solution
Thus, the optimal solution to the IP
z = 40, x 1 = 5, x2= 0.
Example 5.3.1 A (Mixed IP Problems)
In MIP, some variables are required to be integers and others are allowed to be either integer or
non-integers. To solve a MIP by B&B method, modify the method by branching only on
variables that are required to be integers. For a solution to a sub-problem to be a candidate
solution, it need only assign integer values to those variables that are required to be integers.
Take the following maximization problem for the application of B&B for mixed integer
programming problem.

Solution
We can solve this problem by relaxing the IP to linear programming by replacing the integrality
constraint to non-negativity constraint [replace “x1≥ 0 and integer” by “x1 ≥ 0”].
Then using any LP package (WINQSB for our case) or utilizing simplex or graphical solution
method we get

z = 11/3, x 1 = 2/3, x 2=7/3. Because x 2 is allowed to be fractional, we do not branch on x 2. We


branch on x1 and create two new sub-problems:
Subp.2: LR + x 1 ≥ 1
Subp.3: LR + x 1 ≤ 0
We see that the optimal solution to subp.2 is z = 7/2, x 1 = 1, x 2 = 3/2

As only x1 assume integer value, this solution is feasible for the original MIP →Candidate
solution; LB = 7/2.The optimal solution to subp.3 is z = 3, x 1 = 0, x 2 = 3.
Subp.3 cannot yield a z-value exceeding the current LB, so it cannot yield the optimal solution to
the MIP.
Optimal Solution
Thus, the optimal solution to the MIP z = 7/2, x 1 = 1, x 2 = 3/2.
Example 5.3.1 B (binary)
One aspect of the B&B method greatly simplifies. Due to each variable equaling 0 or 1,
branching on xi will yield in x i = 0 and x i = 1.

Solution
Replace “xi = 0 or 1 (i=1,...,4)” by “0 ≤ xi ≤ 1 (i=1,...,4)”→LR of the problem.

The optimal solution for the LR is z=0.65, x2=0.5, x3=1, x1=x4=0

The variable x2 is fractional. To resolve this we can generate two new problems:
P1: LR + x 2 =0
P2: LR + x 2 =1
We now have two new sub-problems to solve (jump tracking) and if we do this we get
P1 solution: z=0.6, x 1 =0.5, x 3 =1, x 2 = x 4 =0
P2 solution: z=0.63, x 2 =1, x 3 =0.67, x 1 = x 4 =0
Choosing sub-problem P2 (the best z–value), we branch on x 3 and get
P3 (P2 + x 3 =0) solution: z=0.5, x 1 =x2=1, 3 = x 4 =0
P4 (P2 + x 3 =1) solution: infeasible
P3 solution is feasible for the original binary IP → Candidate solution; LB = 0.5
Choosing the only remaining sub-problem P1, we branch on x1 and get
P5 (P1 + x1=0) solution: z=0.6, x 3 = x 4 =1, x 1 = x 2 =0
P6 (P1 + x 1 =1) solution: z=0.53, x 1 =1, x 3 =0.67, x 2 = x 4 =0
P5 solution is feasible for the original binary IP → New candidate solution; updated
LB = 0.6. P6 cannot yield a z-value exceeding the current LB, so it cannot yield the optimal
solution to the binary IP.
Thus, the optimal solution to the binary IP is: z = 0.6, x1 = 0, x2 = 0, x3 = 1, x4 = 1.

5.3.2 Cutting Planes


A linear inequality is a valid inequality for a given IP problem if it holds for all integer feasible
solutions to the model. Relaxations can often be strengthened dramatically by including valid
inequalities that are not needed by a correct discrete model. To strengthen a relaxation, a valid
inequality must cut off (render infeasible) some feasible solutions to current LR that are not
feasible in the IP model.
This need to cut off non-integer relaxation solutions are why valid inequalities are sometimes
called cutting planes.
Cutting process can be either general purpose or problem specific. The first is based on
fractional extreme point can always be separated (LP-based approach, that works for IP) and can
be used for Disjunctive cuts and Gomory cutting planes.
Problem specific cutting process on the other hand derived from problem structure, generally
facets. (Capital Budgeting (Knapsack), Set Packing... )
Cutting Plane Algorithm (Gomory cut)
We can derive cuts directly from solving the LP relaxation. If the relaxation has an integer
optimal solution, then we are done since this is also an optimal solution to the integer problem. If
the optimal solution is fractional, we will use rounding to obtain a cut (as explained below).
This cut will cut off the fractional solution and thus make the feasible region smaller. This
makes sure that we improve in each step.
Choose any line of the dictionary with a fractional constant (in this case every line qualifies,
including z). This choice is arbitrary but good practice suggests choosing the line where the
fraction is closest to 1/2. We pick the expression for z and move whole parts to the left, keeping
only fractions on the right. This time we also have fractional coefficient with variables. We
rearrange the expression so that on the right each variable has negative fractional coefficient,
while the absolute constant is a positive fraction.
Algorithm
 Find the optimal tableau for the IPs LR.
 If all variables in the optimal solution assume integer values, we have found an optimal
solution! Otherwise proceed to next step
 Pick a constraint in the optimal tableau whose RHS has the fractional part closest to ½.
 For the constraint identified, put all of the integer parts on the left side (round down), and
all the fractional parts on the right.
 Generate the cut as: “RHS of the modified constraint”≤0
Use the dual simplex to find the optimal solution to the LR, with the cut as an additional
constraint.
If all variables assume integer values in the optimal solution, we have found an optimal
solution to the IP.
Otherwise, pick the constraint with the most fractional right-hand side and use it to
generate another cut, which is added to the tableau.
We continue this process until we obtain a solution in which all variables are integers. This will
be an optimal solution to the IP.
Dual Simplex Method
Please recall that at dual simplex:
We choose the most negative RHS.
BV of this pivot row leaves the basis.
For the variables that have a negative coefficient in the pivot row, we calculate the ratios
(coefficient in Z / coefficient in pivot row).
Variable with the smallest ratio (absolute value) enters basis

If we ignore integrality, we get the following optimal tableau:

Let's choose the constraint whose RHS has the fractional part closest to ½ (Arbitrarily choose the
second constraint):
x1 – 1.25 s1 + 0.25 s2 =3.75
We can manipulate this to put all of the integer parts on the left side (round down), and all the
fractional parts on the right to get:
x – 2 s + 0 s – 3 = 0.75 – 0.75 s – 0.25 s2
1 1 2 1

Now, note that the LHS consists only of integers, so the right hand side must add up to an
integer. It consists of some positive fraction minus a series of positive values. Therefore, the
right hand side cannot be a positive value. Therefore, we have derived the following constraint:
0.75 – 0.75 s1 – 0.25 s2 ≤ 0
This constraint is satisfied by every feasible integer solution to our original problem. But, in our
current solution, s1 and s2 both equal 0, which is infeasible to the above constraint. This means
the above constraint is a cut, called the Gomory cut after its discoverer. We can now add this
constraint to the linear program and be guaranteed to find a different solution, one that might be
integer.

Based on the dual simplex method, the leaving variable is the basic variable with the most
negative value. s3 is the only basic variable with negative variable. The minimum ratio test is then
observed on s1which the entering variable is. Based the row operation:
r3 14
r 3 =old =0 0 1 1.
−0.75 33
r 1 (For x 2)¿ old value−2.25∗the corresponding column value∈the new pivote row
r 1 ( x 2) =0 1 0−1−3 0
1 5
r 2 ( x 1) =1 0 0 − 5
6 3
11 85
z j =8 5 0− − 40
3 3
11 85
Z ( c j−z j ) =0 0 0 0
3 3
The optimal solution is an IP solution: z = 40, x 1 = 5, x 2 = 0.
Review Questions
1. Explain with example pure or all and mixed integer programming problem.
2. Explain the significance of integer programming problem.
3. Explain the interactive procedure of cutting plane or fractional cut method.
4. How do you add Gomorian constraint?
5. Explain the procedure involved in branch and bound technique.

Exercise Problems
1. Find the optimal solution for the following IP problems using cutting plane method.

a. Max Z = 3x1 - 2x2 + 5x3


Subject to 4x1 + 5x2 + 5x3  30
5x1 + 2x2 + 7x3  28
x1, x2, x3  0 and are integers.
[Ans: x1=0, x2=0, x3=4, Max Z=20]
b. Max Z = 4x1 + 3x2
Subject to x1 + x2  4
2x1 + x2  6
x1, x2  0 and are integers.
[Ans: x1=3, x2=0, Max Z=12]
c. Max Z = 7x1 + 6x2
Subject to 2x1 + 3x2  12
6x1 + 5x2  30
x1, x2  0 and are integers.

[Ans: x1=5, x2=0, Max Z=35]


d. Max Z = 2x1 + 3x2
Subject to x1 + 3x2  9
3x1 + x2  7
x1, x2  1
x1, x2  0 and are integers.
[Ans: x1=0, x2=3, Max
Z=9]
e. Max Z = 110x1 + 100x2
Subject to 6x1 + 5x2  29
4x1 + 14x2  48
x1, x2  0 and are integers.
[Ans: x1=4, x2=1, Max
Z=540]
2. Solve the following IP problems by branch and bound techniques.
a. Max Z = x1 + x2
Subject to 2x1 + 5x2  16
6x1 + 5x2  30
x2  0 and x1 is integer.
[Ans: x1=3, x2=0, Max Z=15]
b. Max Z = 5x1 + 4x2
Subject to 5x1 + 3x2  15
x1 + x2  2
3x1 + 5x2  15
x1, x2  0 and are integers.
[Ans: x1=3, x2=0, Max
Z=26/5]
c. Max Z = 3x1 + 4x2
Subject to 3x1 - x2 + 3x = 12
3x1 + 11x2 + x4 = 66
xj,  0, for j=1, 2, 3, 4 and are integers.
[Ans: x1=5, x2=4, Max
Z=31]

d. Max Z = 2x1 + 20x2 – 10x3


Subject to 2x1 + 20x2 + 4x3  15
6x1 + 20x2 + 4x3 = 20
6x1 + 20x2 + 4x3 = 20
x1, x2, x3  0 and are integers.
[Ans: x1=2, x2=0, x3=2. Max
Z=16]
e. Max Z = x1 + 4x2
Subject to 2x1 + 4x2  15
5x1 + 3x2  20
x1, x2  0 and are integers.
[Ans: x1=1, x2=1, Max Z=5]

You might also like