Docsity

Branch and Bound: The Assignment Problem | CPSC 5155U, Study notes of Computer Architecture and Organization

Toggle sidebar
bg1
Branch & Bound: The Assignment Problem
Our previous discussion of the knapsack problem has already introduced a part
of this strategy, when we evaluated each partial solution for maximum possible value.
This lecture develops the branch and bound strategy in a more formal way.
The outline of this lecture is as follows.
1. We first define the branch and bound strategy.
2. We then describe the assignment problem.
3. We apply the branch and bound strategy to solution of an
instance of the assignment problem.
The assignment problem is one of many problems for which the only
known solutions take exponential time in general.
In general, the assignment of N jobs to N workers, 1 job to a worker
requires (N!) computations.
While we cannot reduce the complexity to polynomial, we can use
a number of tricks to speed up the solution considerably.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Branch and Bound: The Assignment Problem | CPSC 5155U and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Branch & Bound: The Assignment Problem

Our previous discussion of the knapsack problem has already introduced a part of this strategy, when we evaluated each partial solution for maximum possible value. This lecture develops the branch and bound strategy in a more formal way. The outline of this lecture is as follows.

  1. We first define the branch and bound strategy.
  2. We then describe the assignment problem.
  3. We apply the branch and bound strategy to solution of an instance of the assignment problem. The assignment problem is one of many problems for which the only known solutions take exponential time in general. In general, the assignment of N jobs to N workers, 1 job to a worker requires (N!) computations. While we cannot reduce the complexity to polynomial, we can use a number of tricks to speed up the solution considerably.

Optimization Problems

The branch and bound strategy is applied to optimization problems. Recall that an optimization problem attempts to maximize profits or minimize costs subject to constraints. The value to be maximized or minimized is called either the “value function” or the “objective function”. Here are some terms associated with the study. A feasible solution satisfies the constraints An optimal solution is a feasible solution that optimizes the objective function. A bounding solution not necessarily feasible optimizes the [unconstrained] objective function. Please note that the term “bounding solution” may be one that only your instructor uses.

The Assignment Problem

The assignment problem is a minimization problem. For N  2, we are given N workers and N jobs. We are given an N–by–N matrix of costs, with entries C[I, J] being the cost to assign worker I to job J. We want to minimize the total costs of the assignments. The feasibility constraints are obvious:

  1. Each worker is to be given exactly one job.
  2. Each job is to be assigned to exactly one worker. In terms of the cost matrix, the translation of the requirements is also obvious:
  3. Each row is to have exactly one element selected.
  4. Each column is to have exactly one element selected. The answer is a total cost and either an array assigning jobs to workers or an array assigning workers to jobs. In either case, the array will have N elements and be a permutation of the set of integers {1, 2, …, N}.

An Instance of the Assignment Problem

Here we use the textbook’s example. Four workers : A, B, C, & D. Four jobs: 1, 2, 3, 4. 1 2 3 4 A 9 2 7 8 B 6 4 3 7 C 5 8 1 8 D 7 6 9 4 The solution vectors are as follows. Assigning jobs to workers: (2, 1, 3, 4) a total cost of 13. Worker A gets job 2, worker B gets job 1, worker C gets job 3, and D gets 4. Assigning workers to jobs: (B, A, C, D) again, a total cost of 13. Job 1 goes to worker B, job 2 goes to worker A, job 3 to C, and job 4 to D. It should be obvious that either representation of the solution conveys the same information. Neither representation is better than the other.

Examination of the Bounding Solutions

First note that neither bounding solution is feasible. This is expected. Now we examine what each of the bounding solutions is telling us. The row minimum solution says “No optimal solution can cost less than 10”. The column minimum solution says “No optimal solution can cost less than 12”. Both of these statements must be true. From this, we conclude that no optimal solution can cost less than 12. NOTE: Frequently, these lower bounds on costs (and upper bounds on profits) are not actually used in the branch–and–bound solutions. Your instructor just likes to calculate them.

Generating Trial Feasible Solutions

We want to generate a few feasible solutions very quickly, to aid in providing an upper bound to the optimal cost. Recall that the assignment problem for N workers has (N!) feasible solutions. We are trying to avoid generation of all or a significant part of these. Two obvious quick tries are (1, 2, … , N) and (N, N – 1, … , 2, 1). For our four workers, the two quick tries are (1, 2, 3, 4) and (4, 3, 2, 1). Here we have discovered a feasible solution with total cost of 18. This solution is more costly that the bounded solution (as expected), so it might not be the optimal solution. It is the best solution so far.

Bounding Solutions

Here are the bounds we have derived for the optimal solution of our problem. We now want a way to compute the lower bound on the cost of any partial solution. This obviously involves the actual cost of the partial solution. A gets job 1 cost 9. A gets 1 and B gets 2 cost 13 A gets 1 and B gets 3 cost 12 A gets job 2 cost 2 A gets 2 and B gets 1 cost 8 A gets 2 and B gets 3 cost 5 We now need a method for a lower bound on the costs of the remaining assignments, so that we can establish a lower bound on the cost of the partial solution. For a maximization problem, we would be looking for upper bounds.

Lower Bounds on the Partial Solutions

We derive a figure such that any feasible solution based on this partial solution must cost at least as much as the estimate. If that figure is greater than the actual cost of a known feasible solution, drop the partial solution; prune its subtree. Here is the notation we use to describe every node. For this node, A has been given job 1. The sum of the minima in the remaining rows of the matrix is 3 + 1 + 4 = 8. With this approach, our search tree begins as follows.

Evaluating the Assignment for Worker A

Recalling our quick feasible solution (1, 2, 3, 4) with total cost 18, we now use the above information to make a tentative choice for worker A. What we see here is that no solution based on assignment of job 3 to worker A can be better than the solution we have already produced. We prune that subtree. We now have three open nodes; nodes that can be further expanded into solutions. We choose to practice best–first branch–and–bound , always expanding the node with the best (here lowest cost) bound on the solution.

Expand A = 2

We now have five live nodes, with lower bound values 13, 14, 17, 17, and 18. “Best first” strategy indicates that we expand the node with lower bound = 13.