### The Assignment Problem

• Introduction

• The assignment problem is one of the fundamental combinatorial optimization problems in the branch of optimization or operations research in mathematics.

• In an assignment problem, we must find a maximum matching that has the minimum weight in a weighted bipartite graph.

• The Assignment problem

• Problem description:

• 3 men apply for 3 jobs

Each applicant gets one job.

• The suitability of each candidate for each job is represented by a cost:

 The lower the cost, the more suitable the candidate is for that job

Example:

• Problem:

 Find a maximum matching (give jobs to as many men as possible) for which the sum of the cost of the edges is minimized

• Naive solution

• In the previous lecture, we have learned:

 How to find a maximum matching

• We can solve the assignment problem by:

 Find all maximum matchings Sum the cost of the edges of each maximum matching Select the maximum matching with the lowest possible cost

• Obviously, we want something better :-)

• 0,1 Integer Program of an assignment problem

• The assignment problem can be formulated as a 0,1-integer linear constrained optimization problem (i.e.: IP)

• Example:

Cost Matrix:

 ``` jobs -------------> 1 2 3 +- -+ 1 | 1 4 5 | C = 2 | 5 7 6 | 3 | 5 8 8 | +- -+ ```

Define:

 Cost matrix C = [cij] where cij = cost of man i working on job j         Variable xij = 0 or 1 xij = 1 if man i is assigned to job j and xij = 0 otherwise

• Integer program for the assignment problem:

 ``` min: 1x11 + 4x12 + 5x13 + 5x21 + 7x22 + 6x23 + 5x31 + 8x32 + 8x33 s.t.: x11 + x12 + x13 = 1 // Worker 1 gets 1 job x21 + x22 + x23 = 1 x31 + x32 + x33 = 1 x11 + x21 + x31 = 1 // Job 1 assigned to 1 worker x12 + x22 + x32 = 1 x13 + x23 + x33 = 1 xij = 0, or 1 ```

• Example Program: (Demo above code)

Solution:

 ``` Value of objective function: 15.00 Actual values of the variables: x11 0 x12 1 x13 0 x21 0 x22 0 x23 1 x31 1 x32 0 x33 0 ```

• Note:

 We can solve a Linear Program instead of an integer program --- this is due to a special property The constraint matrix of the assignment problem is very special It will only produce integer solutions These special constraint matrices are called uni-modular matrices (See: click here)

• Simplex Algorithm adapted to solve network problems

• The Simplex Algorithm is a general purpose algorithm to find the maximum/minimum of a linear cost function with linear constraints

• Linear program that are formulated from network flow problems often have a special structure

We can exploit the structure to improve the performance of the Simplex Algorithm for some special type of problem.

• Some specially adapted Simplex Algorithms:

• Network Simplex Algorithm (See: click here)

 The Network Simplex Method is a (primal) Simplex Method adapted to solve the maximum flow problem in networks (I did not discussed this for brevity)

• The Hungarian Algorithm (See: click here)

 The Hungarian is a (primal-dual) Simplex Method adapted to solve the assignment problem in bi-partite graphs (I will discuss this algorithm next)