Branch-and

Chapter 6 Branch-and-Bound
Illustrating Branch-and-Bound
with the 0-1 Knapsack Problem

Branch-and-Bound





using state space tree like backtracking
not limit us to any way of traversing tree
use only for optimization problem
determine whether a node is promising
in the sate space tree by computing a
number (bound)
bound not better than the best solution
 nonpromising (e.g. 0-1 knapsack
problem)
[email protected]
2
1
Branch-and-Bound


we can visit the children of a promising
node which has the best bound for
rapidly reaching an optimal solution
breadth-first search (instead of
depth-first search)


visit root first, followed by all nodes at level
1, followed by all nodes at level 2,....
See Fig. 6.1 pp. 250
[email protected]
3
Branch-and-Bound
[email protected]
4
2
Branch-and-Bound
[email protected]
5
6.1 Illustrating Branch-andBound with the 0-1 Knapsack
Problem


Breadth-First Search with Branchand-Bound Pruning
Best-First Search with Branch-andBound Pruning
3
6.1.1 Breadth-First Search with Branch-andBound Pruning

See Example 6.1 pp. 251
void breadth_first_branch_and_bound (tree T)
{ initialize (Q);
v=root of T;
enqueue(Q, v);
maxprofit = profit(v);
while (!empty(Q))
{ dequeue(Q, v);
for (each child u of v)
{ if (profit(v) is better than the maxprofit)
maxprofit = profit(v);
if (bound(v) is better than best)
enqueue(Q, u);
}
}
}
[email protected]
7
[email protected]
8
4
[email protected]
9
6.1.1 Breadth-First Search with Branch-andBound Pruning
[email protected]
10
5
6.1.2 Best-First Search with Branch-and-Bound
Pruning




improve breadth-first search strategy
after visiting all children of a given node,
we look at all promising and
unexpanded nodes,

expand the node with the best bound first

See Example 6.2 pp. 257
it not guarantees that the node appears
to be best will actually lead to an
optimal solution
priority queue
[email protected]
11
[email protected]
12
6
6.1.2 Best-First Search with Branch-and-Bound
Pruning
[email protected]
13
[email protected]
14
7
The End
8