08) # branch and bound
TRANSCRIPT
-
8/3/2019 08) # Branch and Bound
1/22
Branch and bound
-
8/3/2019 08) # Branch and Bound
2/22
Branch and Bound Method
The design technique known as branch andbound is similar to backtracking in that itsearches a tree model of the solution space andis applicable to a wide variety of discretecombinatorial problems.
Backtracking algorithms try to find one or allconfigurations modeled as N-tuples, whichsatisfy certain properties.
Branch and bound are more oriented towardsoptimization.
-
8/3/2019 08) # Branch and Bound
3/22
Here all the children of the E- node aregenerated before any other live node can
become E- node.Here two state space trees can be formed
BFS (FIFO)and D search (LIFO).
-
8/3/2019 08) # Branch and Bound
4/22
1
2 34 5
X1=1
X1=4
6 7 8
X2=2X2=4
9 10
11
12 13
X3=3
16
1415
X4=4 BFSSEARCH forsum ofsubsetproblem
X3=4
X1=2
X2=3
-
8/3/2019 08) # Branch and Bound
5/22
1
2 3
X1=0X1=1
4 5
6 7
8 910 11
12 13
14 1516 17
18 19
20 21
22 23
Nodes are generated in D -search manner for sum ofsubset problem
-
8/3/2019 08) # Branch and Bound
6/22
Traveling salesman problem
The salesman problem is to find a least cost tourof N cities in his sales region.
The tour is to visit each city exactly once. Salesman has a cost matrix C where the
element cij equals the cost (usually in terms oftime, money, or distance) of direct travel
between city I and city j. Assume cii=infinity forall i. Also cij= infinity if it is not possible to movedirectly from city I to city j.
-
8/3/2019 08) # Branch and Bound
7/22
Branch and bound algorithms for travelingsalesman problem can be formulated in a
variety of ways.Without loss of generality we can assumethat every tour starts and ends at city one.
So the solution space S is given by{ 1 , , 1 | is a permutation of (2,3,4 n)}
|S|= (n-1)!.
-
8/3/2019 08) # Branch and Bound
8/22
1
2 3 4
5 6
1112
7 8
13 14
9 10
15 16
A Sate space tree for traveling salesman problem with n= 4
I1=2
I1=3
I1=4
I2=3I2=4
I3=4
I2=3
I3=2
Tour 1 2 3 4 1 1 2 4 3 1
-
8/3/2019 08) # Branch and Bound
9/22
all tours
------
{3,5} {3,5}
-------
{2,1} {2,1}
A branch and bound state space tree for traveling salesmanproblem
-
8/3/2019 08) # Branch and Bound
10/22
What is meant by bounding?
With each vertex in the tree we associate alower bound on the cost of any tour in theset represented by the vertex.
The computation of these lower bounds ismajor labor saving device in any branchand bound algorithm.
There fore much thought should be given to
obtain tight bounds.
-
8/3/2019 08) # Branch and Bound
11/22
Assume that we have constructed a specificcomplete tour with cost m.
If the lower bound associated with the set oftours represented by a vertex v is M.
And
M>= m
Then no need to search further fordescendants of v for the optimum tour.
-
8/3/2019 08) # Branch and Bound
12/22
Basic steps for the computation of
lower bounds
The basic step in the computation of lower bound is knownas reduction. It is based on following observations:
1- In the cost matrix C every full tour contains exactly one
element from each row and each column.Note: converse need not be true e.g {(1,5),(5,1),(2,3),(
3,4),(4,2)}.
2- If a constant h is subtracted from every entry in any rowor column of C , the cost of any tour under the newmatrix C is exactly h less than the cost of the same tourunder matrix C.This subtraction is called a row(column)reduction
-
8/3/2019 08) # Branch and Bound
13/22
3- By a reduction of the entire cost matrix Cwe mean the following: Sequentially go
down the rows of C and subtract the valueof each rows smallest element hi fromevery element in the row. Then do thesame for each column.
Let h = hi summation over all rows andcolumns
The resulting cost matrix will be called the
reduction of C.h is a lower bound on the cost of any
tour.
-
8/3/2019 08) # Branch and Bound
14/22
Let A be the reduced cost matrix for a nodeR. Let S be a child of R such that edge
(R,S) corresponds to including edge (i,j) inthe tour.
1- change all entries in row i and column j ofA to .(so that no edge from this row
(column)leaving from I(coming to j), maybe included in the tour in future).
2- set A(j,1) =
This prevents A(j,1) since node 1 should bethe last node of the tour.
-
8/3/2019 08) # Branch and Bound
15/22
4-Reduce all rows and columns in theresulting matrix except for rows and
columns containing only .
Let the resulting matrix be B.
Let r be the total amount subtracted thenlower bound on S is
lower bound for (R) + A(i,j) + r
-
8/3/2019 08) # Branch and Bound
16/22
example 20 30 10 1115 16 2 2
3 5 2 4
19 6 18 316 4 7 16
10 17 0 112 11 2 0
0 3 0 2
15 3 12 011 0 0 12
Reduced cost matrix lower bound =
25(subtracting 10,2,2,3,4) and 1,3 fromcolumn 1 and 3
So all tours in the given graph havelength atleast 25.
Cost matrix
-
8/3/2019 08) # Branch and Bound
17/22
1 25
2 3 4535 53 25 31
6 78
9 10
11
28
50
36
5228
28
I1=2
I1=3
I1=5
I2=2i2
= 3
-
8/3/2019 08) # Branch and Bound
18/22
1 25
2 3 4535 53 25 31
6 78
9 10
11
50
36
I1=2
I1=3
I1=5
I2=2i2
= 3
-
8/3/2019 08) # Branch and Bound
19/22
11 2 0
0 0 215 12 011 0 12
1 2 0
3 0 2
4 3 0
0 0 12
12
9 0 0 3 0 12 0 9
0 0
12
Path (1,2) node 2 (25 + 10=35) path(1,3) node 3
path(1,5) node 5
12
11 00 3 2
3 12 011 0 0 Path 1,4
node 4
-
8/3/2019 08) # Branch and Bound
20/22
-
8/3/2019 08) # Branch and Bound
21/22
Least cost (LC) Search
In both LIFO and FIFO branch and bound theselection rule for the next E- node is rather rigidand in a sense blind.The selection rule for the
next E- node does not give any preference to anode that has a very good chance of getting thesearch to an answer node quickly.
The search foe an answer node can often be
speeded by using an intelligent ranking C*(.)for live nodes.The next E- node is selected onthe basis of this ranking function.
-
8/3/2019 08) # Branch and Bound
22/22