Daa Unit V
Daa Unit V
Shumama Ansa
BRANCH & BOUND –
GENERAL METHOD
• Branch & Bound (B & B) is general algorithm (or Systematic method) for
finding optimal solution of various optimization problems, especially in
discrete and combinatorial optimization.
• The differences are that the B&B method
– Does not limit us to any particular way of traversing the tree.
– It is used only for optimization problem
– It is applicable to a wide variety of discrete combinatorial problem.
• The term B&B refers to all state space search methods in which all children
of the “E-node” are generated before any other “live node” can become the
“E-node”
– Live node is a node that has been generated but whose children have
not yet been generated.
– E-nodeis a live node whose children are currently being explored.
• Dead node is a generated node that is not to be expanded or explored
any further. All children of a dead node have already been expanded.
FIFOBB
LIFO BB
• The selection rule for the next E-node in FIFO or LIFO branch and bound
is sometimes “blind”. i.e., the selection rule does not give any preference to
a node that has a very good chance of getting the search to an answer node
quickly.
• The search for an answer node can often be speeded by using an
“intelligent” ranking function. It is also called an approximate cost function
“Ĉ”.
• Expanded node (E-node) is the live node with the best Ĉ value.
• Branching: A set of solutions, which is represented by a node, can be
partitioned into mutually (jointly or commonly) exclusive (special) sets.
Each subset in the partition is represented by a child of the original node.
• Lower bounding: An algorithm is available for calculating a lower bound
on the cost of any solution in a given subset.
•In both FIFO and LIFO Branch and Bound the
selection rules for the next E-node in rigid and blind.
•The selection rule for the next E-node does not give
any preferences to a node that has a very good chance
of getting the search to an answer node quickly.
•In this we will use ranking function or cost function.
•We generate the children of E-node, among these live
nodes; we select a node which has minimum cost.
•By using ranking function we will calculate the cost of
each node.
BRANCH & BOUND –
APPLICATIONS
∞ 20 30 10 11
15 ∞ 16 4 2
3 5 ∞ 2 4
19 6 18 ∞ 3
16 4 7 16 ∞
• Substract minimum element from every row
∞ 20 30 10 11 ∞ 10 20 0 1
15 ∞ 16 4 2 13 ∞ 14 2 0
3 5 ∞ 2 4 1 3 ∞ 0 2
19 6 18 ∞ 3 16 3 15 ∞ 0
16 4 7 16 ∞ 12 0 3 12 ∞
• Subtract minimum element from every
column
M1
∞ 10 20 0 1 ∞ 10 17 0 1 10
13 ∞ 14 2 0 12 ∞ 11 2 0 2
1 3 ∞ 0 2 0 3 ∞ 0 2 2
16 3 15 ∞ 0 15 3 12 ∞ 0 3
12 0 3 12 ∞ 11 0 0 12 ∞ 4
1 0 3 0 0 25
This is the cost of a root i.e. node 1, because this is the initially reduced
cost matrix.
The lower bound for node is 25 and upper bound is ∞.
Node2
• 1st row and 2nd column all elements and (2,1) = ∞
• Updated matrix
M2
Matrix is in reduced form ∞ ∞ ∞ ∞ ∞ 0
Cost of node 2 =
∞ ∞ 11 2 0 0
reduced cost + cost[1,2] + r^
= 25+10+0 0 ∞ ∞ 0 2 0
= 35 15 ∞ 12 ∞ 0 0
11 ∞ 0 12 ∞ 0
0 0 0 0 0 0
∞ 10 17 0 1
Node3 12 ∞ 11 2 0
• 1st row and 3rd column all elements 0 3 ∞ 0 2
• and (3,1) = ∞ Step 1 15 3 12 ∞ 0
• Updated matrix 11 0 0 12 ∞
Step 2 M3
Step 3
∞ ∞ ∞ ∞ ∞ 0
12 ∞ ∞ 2 0 0 ∞ ∞ ∞ ∞ ∞
∞ 3 ∞ 0 2 0 1 ∞ ∞ 2 0
15 3 ∞ ∞ 0 0 ∞ 3 ∞ 0 2
11 0 ∞ 12 ∞ 0 4 3 ∞ ∞ 0
11 0 0 0 0 11 0 0 ∞ 12 ∞
Cost = 25+0+0 = 25
∞ ∞ ∞ ∞ ∞ 0
Node5 Step 2
12 ∞ 11 2 ∞ 2
• 1st row and 5th column all elements and
(5,1) = ∞ M1 Step 1 0 3 ∞ 0 ∞ 0
∞ 10 17 0 1 15 3 12 ∞ ∞ 3
12 ∞ 11 2 0 ∞ 0 0 12 ∞ 0
0 3 ∞ 0 2
Step 3
15 3 12 ∞ 0 ∞ ∞ ∞ ∞ ∞ 0
11 0 0 12 ∞ 10 ∞ 9 0 ∞ 2
Step 4 M5
0 3 ∞ 0 ∞ 0
∞ ∞ ∞ ∞ ∞
12 3 9 ∞ ∞ 3
10 ∞ 9 0 ∞
∞ 0 0 12 ∞ 0
0 3 ∞ 0 ∞
0 0 0 0 0 5
12 0 9 ∞ ∞
∞ 0 0 12 ∞ Cost = 25+ 1 + 5 = 31
• Among node 2, node 3, node4, node 5 the
least cost is obtained for node 4
• So, now explore node 4
Use M4, obtain M6 for Node6 ∞ ∞ ∞ ∞ ∞ 0
(vertex 4 to vertex 2)
4th row and 2nd column all elements ∞
Step 2 ∞ ∞ 11 ∞ 0 0
M4 Step 1 0 ∞ ∞ ∞ 2 0
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
12 ∞ 11 ∞ 0
11 ∞ 0 ∞ ∞ 0
0 3 ∞ ∞ 2
Step 3
∞ 3 12 ∞ 0 ∞ ∞ ∞ ∞ ∞ 0
11 0 0 ∞ ∞ ∞ ∞ 11 ∞ 0 0
M6 Step 4
0 ∞ ∞ ∞ 2 0
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
∞ ∞ 11 ∞ 0
11 ∞ 0 ∞ ∞ 0
0 ∞ ∞ ∞ 2
0 0 0 0 0 0
∞ ∞ ∞ ∞ ∞
11 ∞ 0 ∞ ∞ Cost = 25+ 3 + 0 = 28
Use M4, obtain M7 for Node7 ∞ ∞ ∞ ∞ ∞ 0
(vertex
4th
4 tord vertex 3) 12 ∞ ∞ ∞ 0 0
row and 3 column all elements ∞
M4 Step 1 Step 2 ∞ 3 ∞ ∞ 2 2
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
12 ∞ 11 ∞ 0
11 0 ∞ ∞ ∞ 0
0 3 ∞ ∞ 2
∞ 3 12 ∞ 0 Step 3 ∞ ∞ ∞ ∞ ∞ 0
11 0 0 ∞ ∞ 12∞ ∞ ∞ 0 0
M7 Step 4
∞ 1 ∞ ∞ 0 2
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
1 ∞ ∞ ∞ 0
11 0 ∞ ∞ ∞ 0
∞ 1 ∞ ∞ 0
11 0 0 0 0 13
∞ ∞ ∞ ∞ ∞
Cost = 25+ 13 + 12 = 50
0 0 ∞ ∞ ∞
Use M4, obtain M8 for Node8 ∞ ∞ ∞ ∞ ∞ 0
(vertex
4th
4 toth vertex 5) 12 ∞ 11 ∞ ∞ 11
row and 5 column all elements ∞
Step 1
Step 2 0 3 ∞ ∞ ∞ 0
M4
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
12 ∞ 11 ∞ 0
∞ 0 0 ∞ ∞ 0
0 3 ∞ ∞ 2
∞ 3 12 ∞ 0
Step 3 ∞ ∞ ∞ ∞ ∞ 0
11 0 0 ∞ ∞ 1 ∞ 0 ∞ ∞ 11
M8 Step 4
0 3 ∞ ∞ ∞ 0
∞ ∞ ∞ ∞ ∞
∞ ∞ ∞ ∞ ∞ 0
1 ∞ 0 ∞ ∞
∞ 0 0 ∞ ∞ 0
0 3 ∞ ∞ ∞
0 0 0 0 0 11
∞ ∞ ∞ ∞ ∞
∞ 0 0 ∞ ∞ Cost = 25+ 0 + 11 = 36
1
2 3 4 5
7 8
6
(3) (5)
(2)