You are on page 1of 54

Integer programming

(branch and bound method)


GROUP NO.-4

By-
Amit Kumar 4
Anu Arora 7
Prabhdeep Kaur 28
Nivedita Joshi 24
Rakesh Kumar 49
Solanki Kumari 57
12/09/2021 1
Introduction

Integer programming are special class of linear


programming where all or some variables in the
optimal solution are restricted to non-negative
integer values .

The basic objective of integer programming is to get


non-fractional solution .

The technique which is used to solve the integer


programming is called branch and bound technique

12/09/2021 2
EXAMPLE 7.9- The cost to perform different jobs by different
workers is given as follows:

JOB
WORKER
1 2 3 4
A 90 18 48 50

B 72 28 85 80
C 53 92 12 78
D 20 70 70 25

Obtain the optimal assignment of jobs to workers.

12/09/2021 3
Branch and bound method
First we obtain the lower bound on the total cost
of the assignment.(cost below which total cost
would not fall)
This need not be the feasible solution.
Lower bound achieved by adding up min cost
value in each column i.e 20+18+12+25=75.
Results in JOB 1-D,2-A,3-C,4-D.
Not a feasible solution(two job to D).
We need to find least cost feasible solution.

12/09/2021 4
Cont’d…
We now look for feasible solution.
We begin by assigning job 1 in turn to each of the
workers A,B,C,D.
Then consider the smallest value in each of the
remaining three column without considering that
the sol is feasible or not .
Let start with a getting job 1 for a cost of Rs 90
Ignore values in first column and first row and the
minimum value is considered second,third and
fourth row .

12/09/2021 5
TABLE 7.8 Assignment of Job 1 to each worker

Assignment Lower bound on the Feasibility


Total

1-A 2-B 3-C 4-D 90+28+12+25=155 Feasible

1-B 2-A 3-C 4-D 72+18+12+25=127 Feasible

1-C 2-A 3-A 4-D 53+18+48+25=144 Infeasible

1-D 2-A 3-C 4-A 20+18+12+50=100 Infeasible

12/09/2021 6
Job 1 to A
155 Feasible

Job 1 to B
127 Feasible
75
Job 1 to C
144 Infeasible

Job 1 to D
100 Infeasible

Tree Diagram: Assignment of Job 1 to each other


12/09/2021 7
Contd……
All the solution which might appear by assigning
job 1 to a can be ruled out as 155>127
127 (i.e the cost involved by assigning job 1 to b is
less and feasible )
Similarly since no solution would a cost lower
than 144 , when job 1 is assigned to c we discard all
the solution which leads from assigning job 1 to c .

12/09/2021 8
Now we will consider the least cost branch of the
tree obtain in the previous figure when job 1 was
assigned to worker d .
Now we fix the job 1 to d and rotate job 2 to a, b
and c respectively .
The same process is applied again .

12/09/2021 9
Assignment Lower Bound on Feasibility
the Total

1-D 2-A 3-C 4-A 20+18+12+50=100 Infeasible

1-D 2-B 3-C 4-A 20+28+12+50=110 Feasible

1-D 2-C 3-C 4-A 20+92+12+50=174 Infeasible

Assignment of Job 1 to Worker D and Job 2 to Each


Worker
12/09/2021 10
Job 1 to A
155 Feasible

Job 1 to B
127 Feasible
75
Job 1 to C
144 Feasible
Job 2 to A Infeasible
100
Job 1 to D Job 2 to B
100 110 Feasible
Job 2 to C
174 Feasible

12/09/2021 11
The solution possible with job 1 to worker d and job
2 to worker c have a min cost of 174 and need not to
be further investigated . Why ?
To continue we consider the branch which involves
job 1 to D and job 2 to A and investigate if it is
pssible to find out some solution that is feasible
with a cost lower than that obtained so far .
With jobs 1 and 2 assigned to workers D and A
respectively now job 3 is assigned to worker B and C
respectively

12/09/2021 12
Job 1 to A
155 Feasible

Job 1 to B Job 3 to B
127 Feasible 201 Feasible
Job 4 to C
75
Job 1 to C Job 2 to A
144 Feasible 100
Job 3 to C
Job 2 to B 130 Feasible
Job 1 to D Job 4 to B
100 110 Feasible

Job 2 to C
174 Infeasible

12/09/2021 13
It may be observed that both the solution is
feasible but has more cost than 110 , the cost
associated with a known feasible solution found
earlier and therefore it is discarded.
Thus the optimal solution to this problem is

12/09/2021 14
WORKER JOB COST

A 4 50

B 2 28

C 3 12

D 1 20

TOTAL 110

12/09/2021 15
Example 7.10:
Mr. Iyer is a salesman with Delite Manufacturing
Company. He wants to visit six cities , say 1,2,3,4,5 &6
with city 1 where he is stationed . The distances between
various cities given in table as following .
Mr. Iyer wants to develop a tour through the five other
cities and return to his home city in such a way that he
has to travel minimum distances . It may be noted that
the matrix of the distances between different cities is
not a symmetrical one. For instance , the distance from
city 1 to 2 is not given to be the same as the distance
from city 2 to 1 .Such situation may develop because of
several reasons. In the one-way traffic system for
example the distance to be covered to each a point
might be different from the distance to be covered while
returning.
12/09/2021 16
FROM
CITY TO CITY

1 2 3 4 5 6

1 - 25 18 35 50 39

2 21 - 28 16 30 13

3 22 28 - 14 16 20

4 35 12 14 - 12 12

5 50 30 16 12 - 8

6 39 15 20 12 7 -

12/09/2021 17
The total nimber of finite solution is 120
With branch and bound method :- Suppose Mr. Iyer
travels to cities in numerical order listed and makes
his tour as
1-2-3-4-5-6-1
This would entail a total Travelling of
25+28+14+12+8+39=126Km

Now since this tour is feasible solution to this


problem .The optimal solution should not require
him to travel any more than 126 Km in all on his tour .
This value of 126 Km is the upper bound on the value
of the solution to the problem

12/09/2021 18
12/09/2021 19
Lower bound value is set by considering the
matrix containing inter city distances and solving
it as a usual problem of the minimization type .
The distances are taken to be the costs of making
assignment , and since a particular city cannot be
‘assigned’ to itself, we place an M in each of the
cells in the distances matrix lying on the diagonal,
proceeding from 1 through 6.The value obtained
would be lower bound because no other
assignment will yield a value smaller than this.

12/09/2021 20
CITY
CITY

1 2 3 4 5 6

1 M 7 0 17 32 21

8 M 15 3 17 0
2
3 8 14 M 0 2 6

4 23 0 2 M 0 0

5 42 22 8 4 M 0

32 8 13 5 0 M
6
12/09/2021 21
Reduce cost Table 1 7.12
CITY
CITY

1 2 3 4 5 6
1 M 7 0 17 32 21

2 0 M 15 3 17 0

3 0 14 M 0 2 6

4 15 0 2 M 0 0

M 0
5 34 22 8 4

0 M
6 24 8 13 5

12/09/2021 22
Assignments : 1-3, 2-1, 3-4, 4-2, 5-6, 6-5
Sub-tours : 1-3-4-2-1 and 5-6-5
Length : 65 km 15 km
Total distance = 80 km

This value is a lower bound on the solution


because no assignment pattern connecting one city
to another in the present case would involve a
distance of less than 80 km.

But the solution is not feasible for salesman as it


involves 2 sub-tours 1-3-4-2-1 and 5-6-5.

12/09/2021 23
Now the upper bound is 126 km and lower Bound is
80 km
For shortening the gap between the upper and
lower bounds, we resort to branching in such a way
that the sub-tours are broken and joined to form a
tour. In a particular situation, we break the
smallest of the sub-tours for example , the two sub-
tours given by the solution are 1-3-4-2-1 and 5-6-5
which involve distances of 65 km and 15 km
respectively.
Since 5-6-5 is smaller of the two, we break this sub-
tour. Here there would be two branches - one
making route 5-6 and the other making 6-5 as
unacceptable .
12/09/2021 24
Initial Branch and Bound Tree
Upper Bound =126 Km
5-6 Unacceptable

LB
=80
6-5 Unacceptable

12/09/2021 25
Table 7.13

1. When 5-6 is unacceptable: replace 0 in 5-6 by M


CITY
CITY
1 2 3 4 5 6
M 7 0 17 32 21
1
2 0 M 15 3 17 0

0 14 M 0 2 6
3
15 0 2 M 0 0
4
5 34 22 8 4 M M

24 8 13 5 0 M
6
12/09/2021 26
Table 7.14

CITY
CITY

1 2 3 4 5 6
M 7 0 17 32 21
1
0 M 15 3 17 0
2
0 14 M 0 2 6
3
15 0 2 M 0 0
4
30 18 4 0 M M
5
24 8 13 5 0 M
6
12/09/2021 27
Assignments : 1-3, 2-6, 3-1, 4-2, 5-4, 6-5
Sub-tours : 1-3-1, and 2-6-5-4-2
Length : 40 km 44 km
Total distance = 84 km

 The optimal solution to this problem leads to two sub-tours


1-3-1 , and 2-6-5-4-2 with a total distance value of 84 km.

 Now again start with the optimal solution of the problem


obtained earlier and put an m in the cell corresponding to
route 6-5.This make this route unacceptable . Now solve this
problem also as an assignment problem. This is shown as

12/09/2021 28
Upper Bound =126 km

Sub-tours:
84
1-3-1 (40 km)
2-6-5- 4-2 (44 km)
5-6 Unacceptable

LB =80

6-5 Unacceptable

12/09/2021 29
Table: 7.15

2. When 6-5 is unacceptable: replace 0 in 6-5 by M

CITY
CITY
1 2 3 4 5 6
M 7 0 17 32 21
1
2 0 M 15 3 17 0

3 0 14 M 0 2 6

15 0 2 M 0 0
4
34 22 8 4 M 0
5
6 24 8 13 5 M M
12/09/2021 30
7.16

CITY
CITY
1 2 3 4 5 6
M 7 0 17 32 21
1
0 M 15 3 17 0
2
3 0 14 M 0 2 6

15 0 2 M 0 0
4
34 22 8 4 M 0
5
6 19 3 8 0 M M
12/09/2021 31
7.17

CITY
CITY
1 2 3 4 5 6
M 7 0 19 32 23
1
M 13 3 15 0
2 0

3 0 12 M 0 0 6

17 2 M 0 0
4 0

34 20 6 4 M
5 0

6 19 1 6 M M
0
12/09/2021 32
Assignments : 1-3, 2-1, 3-5, 4-2, 5-6, 6-4
Tour : 1-3-5-6-4-2-1
Length : 87 km

12/09/2021 33
Upper Bound =126 km
Revised Upper Bound = 87 km
Revised Lower Bound =84 km Sub-tours:
1-3-1 (40 km)
2-6-5- 4-2 (44 km)
5-6 Unacceptable 84

LB =80

87
6-5 Unacceptable Tour:
1-3-5-6-4-2-1
(87 km)

12/09/2021 34
Now since the gap exists between the lower and the
upper bounds , we shall attempt to find the
possibility of narrowing it.

For this again , we break the smallest of the sub


tours- in the present case the sub-tour 1-3-1. There
would again be two branches: one that makes route
1-3 unacceptable and the other that makes the route
3-1 not acceptable . For this purpose we start with
the optimal solution given in table 7.14 and put M
in the cell indicating the route 1-3. This makes this
route impossible . The problem is then solved in
the following manner as assignment problem

12/09/2021 35
Table 7.18:

When 1-3 is unacceptable: replace 0 in 1-3 by M


CITY
CITY
1 2 3 4 5 6
M 7 M 17 32 21
1
2 0 M 15 3 17 0

0 14 M 0 2 6
3
4 15 0 2 M 0 0

5 30 18 4 0 M M

24 8 13 5 0 M
6
12/09/2021 36
Table 7.19:

After row operations

CITY
CITY
1 2 3 4 5 6
M 0 M 10 25 14
1
2 0 M 15 3 17 0

0 14 M 0 2 6
3
4 15 0 2 M 0 0

5 30 18 4 0 M M

24 8 13 5 0 M
6
12/09/2021 37
7.20

CITY
CITY
1 2 3 4 5 6
M 0 M 10 25 14
1
0 M 13 3 17
2 0

3 0 14 M 0 2 6

15 0 M 0 0
4 0

30 18 2 M M
5 0

6 24 8 1 5 M
0
12/09/2021 38
Assignments : 1-2, 2-6, 3-1, 4-3, 5-4, 6-5.
Tour :1-2-6-5-4-3-1
Length : 93 km

Making the route 1-3 unacceptable results in a


tour 1-2-6-5-4-3-1 with a total distance of 93 km
tables 7.21-7.23 give the solution when the rout
3-1 is taken not to be an acceptable one .

12/09/2021 39
Table 7.21:

When 3-1 is unacceptable: replace 0 in 3-1 by M

CITY
CITY
1 2 3 4 5 6
M 7 O 17 32 21
1
2 0 M 15 3 17 0

3 M 14 M 0 2 6

4 15 0 2 M 0 0

5 30 22 4 0 M M

6 24 8 13 5 0 M
12/09/2021 40
Table 7.22:
After row and column operations
CITY
CITY
1 2 3 4 5 6
M 7 0 21 36 21
1
2 0 M 15 7 21 0

M 10 M 0 2 2
3
15 0 2 M 4 0
4
26 14 0 0 M M
5
6 20 4 0 5 0 M
12/09/2021 41
7.23

CITY
CITY
1 2 3 4 5 6
M 5 21 34 19
1 0

2 00 M 17 9 21 0

3 M 8 M 0 0 0

15 4 M 4 0
4 0

24 12 0 M M
5 0

6 20 4 11 7 M
0
12/09/2021 42
ASSIGNMENTS : 1-3, 2-1, 3-6, 4-2, 5-4, 6-5
Tour : 1-3-6-5-4-2-1
Length : 90 km

 The result of making the route 3-1 unacceptable is a tour 1-3-6-


5-4-2-1 involving a total distance of 90 km.

 Clearly , then, the movement along both the branches of this


node results in feasible solutions, but each one of them
involves a plan that would make the salesman travel longer
than how much he would if he accepts the plan already in
hand , to conclude upper bound cannot be reduced and
further and the optimal solution to the problem is the order 1-
3-5-6-4-2-1

12/09/2021 43
Final Branch and Bound Tree of the Travelling Salesman’s Problem
Initial UB = 126 km Initial LB = 80 km
Revised UB = 87 km Revised LB= 84 km

Revised LB 93
Tour 1-2-6-5-4-3-1
e p ta bl e
3 Unacc (93 km)
1 -
Initial Sub-tours:
1-3-484
(40) The upper bound
ta ble cant be reduced
ep 2-6-5-4-2 (44)
c c 3-1 Break 1-3-1 further
Una Un
6 acc
5-Sub-tours: ept
abl
LB e
1-3-4-2-1(65) Tour 1-3-6-5-4-2-1 Tour
=80 90
5- 5-6-5 (15) (90 km) 1-3-6-5-4-2-1
6U
na Break 5-6-5
cc
ep
tab
le
87
Revised UB
STAGE-1 STAGE-2 STAGE-3
12/09/2021 44
EXAMPLE 16: A machine operator process 4 types of machine and
he must choose a correct sequence for them . THE SET UP COST
PER CHANGE DEPENDS on the item currently on machine and the
set up made according to the table : HOW SHOULD HE SEQUENCE
THE ITEMS ?
From To

A B C D

A M 4 7 3

B 4 M 6 3

C 7 6 M 7

D 3 3 7 M

12/09/2021 45
Since a feasible sequence is A–B–C–D–A, the total
set-up cost of 4 + 6 + 7 + 3 = 20 may be set as the
upper
bound. Now, we solve the given problem as an
assignment problem. The given cost matrix is
reproduced here with cost elements of each of the
cells at the diagonal being set equal to M.

12/09/2021 46
ROW operations
A B C D

A M 1 4 0

B 1 M 3 0

C 1 0 M 1

D 0 0 4 M

12/09/2021 47
Column operations
A B C D

A M 1 1 0

B 1 M 0 0

C 1 0 M 1

D 0 0 1 M

12/09/2021 48
Assignments : A–D, B–C, C–B, D–A
Sub-tours : A–D–A, B–C–B
Total cost : 6 + 12 = 18 (Lower bound)
Since the optimal solution involves two sub-
tours, we now re-solve the problem by breaking
one of
these: A–D–A. For this, we make A–D and D–A
unacceptable, one by one.

12/09/2021 49
When A–D is unacceptable:
A B C D

A M 0 0 M

B 1 M 0 0

C 1 0 M 1

D 0 0 1 M

12/09/2021 50
Assignments : A–C, B–D, C–B, D–A
Tour : A–C–B–D–A
Total cost : 19
The upper bound is revised to 19.

12/09/2021 51
When D–A is unacceptable:
A B C D

A M 1 1 0

B 0 M 0 0

C 0 0 M 1

D M 0 1 M

12/09/2021 52
Assignments : A–D, B–C, C–A, D–B
Tour : A–D–B–C–A
Total cost : 19

The optimal solution to thegiven problem is to


set up the jobs either as A–C–B–D–A or A–D–B–C–
A, for a total cost of 19.

12/09/2021 53
12/09/2021 54

You might also like