Branch and Bound

I. Introduction

II. Illustration on the Job Assignment Problem

III. The General Branch and Bound Algorithm

IV. Criteria for the Choice of Approximate Cost Functions

V. Implementation of the B&B Job Assignment Algorithm

I. Introduction

Back to Top

II. Illustration on the Job Assignment Problem

Back to Top

The General Branch and Bound Algorithm



Procedure B&B() begin E: nodepointer; E := new(node); -- this is the root node which -- is the dummy start node H: heap; -- A heap for all the live nodes -- H is a min-heap for minimization problems, -- and a max-heap for maximization problems. while (true) do if (E is a final leaf) then -- E is an optimal solution print out the path from E to the root; return; endif Expand(E); if (H is empty) then report that there is no solution; return; endif E := delete-top(H); endwhile end



Procedure Expand(E) begin - Generate all the children of E; - Compute the approximate cost value CC of each child; - Insert each child into the heap H; end

Back to Top

IV. Criteria for the Choice of Approximate Cost Functions

Back to Top

V. Implementation of the B&B Job Assignment Algorithm

Back to Top

Exercise: The 0/1 knapsack problem is the same as the regular knapsack problem except that one cannot take a fraction of any item: either the whole item is taken, or nothing of that item is taken. Develop a B&B algorithm for the 0/1 knapsack problem.

Hint: take CC(X) to be

the cost so far + the regular knapsack solution for the remaining items.
Show that this approximate cost function CC meets the criteria.