Branch and Bound
Branch and Bound
( unit-v)
Problem state :-
Each node in the tree is a problem state.
State Space :-
All paths from the root to problem states define the state
space of the problem.
Solution States :-
These are those problem states S for which the
path from the root to S define a tuple in the
solution space.
Solution Space :-
All paths from the root to solution states define
the solution space of the problem.
– A node which has been generated and all of whose
children have not yet been generated is called a live
node.
^ ^
c(.) = h(x) + g(x)
where
h(x) is the cost of reaching x from the root
Actual cost function c(.) is defined as follows:
^
c(.) is an approximation to c(.)
A FIFO or LIFO search always generates the state space tree by
levels.
^
We can only compute estimate c(x) of c(x). we can write
^ ^
c(x)=f(x) +g(x), where f(x) is the length of the path from
^
the root to node x and g(x) is an estimate of the
length of a shortest path from x to a goal node in the
subtree with root x.
^
one possible choice for g( x ) is
^
g( x ) = number of nonblank tiles not in their goal
position.
Control Abstraction of LC-Search:-
Algorithm LCSearch( t )
// search tree t for answer node
{
if *t is an answer node then output *t and return;
E=t // E-node
repeat
{
for each child x of E do
{
if x is an answer node then output the
path from x to t and return;
^
A cost function c(.) such that ^c (x)<=c(x) is used to provide the lower
bounds on solutions obtainable from any node x.
^
^
Upper number = c
LC Branch and Bound Solution
Lower number = u
^ -38 -32
Process: The calculation of U and C is as -32 2 3 -22
follows.
U(1) - Scan through the objects from left to -38
right and put into the knapsack until -32 4 5 -36
the first object that does not fit is -22
encontered.
-38
^ -32 6 7
-38
C(1) – Similar to U(1) except that it also -38
considers a fraction of the first object that
does not fit the knapsack.
-38 8 9 -20
-38 -20
Answer node k
Continue this process until an answer node is
found.
FIFO Branch and Bound
^
Upper number = c
-38
-32 Lower number = u
1
-38
-32 2 -32
3 -27
-38
-32 -36
4 5 -22 6 -32 7 -28
-27 -28
k
-38
-32 8 9
-38
-38
10 11 12 -38 13 -20
-38 -20
Answer node
Home Work :-
1. Draw the portion of the state space tree generated by
LCBB and FIFIBB for the following knapsack problem.
b) n=5, ( p1,p2,p3,p4,p5 )=
( w1,w2,w3,w4,w5 )=
( 4,4,5,8,9 ) and m=15.