BRANCH AND BOUND



9.7 Branch and Bound

The branch and bound technique is a variant of backtracking
that can be helpful in cutting down on the time required to
find a solution in a large graph.

With branch and bound, we try to be more intelligent in our
search method.

We do not proceed from node to node according to the dictates
of a "blind" depth-first or breadth-first search.

When we arrive at a node A, we examine the various new nodes
that we can get to from A.  According to some "rule of thumb",
we compute an upper bound on how good the solutions might be
that lie along the various directions.

If the upper bound in some direction is less than the value of
one of the solutions we have found so far, then we don't have
to search in that direction at all.

If there are some directions remaining that offer the prospect
of a better solution than any we already have, we try first the
direction that has the highest value of the upper bound on the
worth of the possible solution.

Branch and bound can be conveniently implemented as a "priority
first search", using a heap to implement the list of nodes that
have been generated but have not yet been explored.

One just takes the next item off the heap to figure out which
node to explore next.  If a simple stack is used instead of a
heap based on priority, we get depth-first search.  If a queue
is used, we get breadth-first search.