The Assignment Problem
SMS 4674 / SMS 3392
Operational Research
Outline
Introduction
Formulation of an Assignment Problem as a Linear Programming
Problem
Hungarian Method
Special Cases in Assignment Problems
INTRODUCTION
Assignment problems (A.P.) involve problems such as assigning
jobs to machines, people to tasks, sales personnel to sales territories,
contracts to bidders, etc.
In A. P., one person is assigned to only one task.
Goal of A.P.: to determine the optimum set of assignments for a
stated objective, such as minimize cost, minimize time or maximize
profit.
In A.P., the supply (demand) amount at each source (destination)
exactly equals 1.
Like transportation problem, an A.P. can
also be represented by a network.
The nodes in the left and right represent
the personnel and projects, respectively.
The arrows represent the possible
assignments.
The project completion times by the
individuals are shown by the side of the
arrows.
Network representation of an assignment
problem
General LP Formulation
Objective function
Constraints 1
One person can be assigned
to only one project
Non-negativity Constraints 2
constraint One project
where: can be assigned to only one
person
= 1 or 0 according to whether person is assigned to task
= the cost of assigning person to task
Example:
Fowle Marketing Research has just received requests for market research studies from three new
clients. The company faces the task of assigning a project leader (agent) to each client (task).
Currently, three individuals are available for the project leader assignments. Fowle’s management
realizes, however, that the time required to complete each study will depend on the experience and
ability of the project leader assigned. The three projects have approximately the same priority, and
the company wants to assign project leaders to minimize the total number of days required to
complete all three projects. If a project leader is to be assigned to one client only, what assignments
should be made?
Example: To answer the assignment question, Fowle’s management must first consider all possible project
leader–client assignments and then estimate the corresponding project completion times. With three
project leaders and three clients, nine assignment alternatives are possible. The alternatives and the
estimated project completion times in days are summarized in Table A.
Table A: Estimated Project Completion Times (Days) for the Fowle Marketing Research Assignment Problem
Example:
From Fowle’s problem,
1. Create a network diagram.
2. Construct a LP formulation.
Network representation
LP formulation of Fowle’s assignment problem:
Definition of decision variables:
Project leader
constraints
Client
constraints
Hungarian Method to Solve an A.P
Special-purpose solution procedures that have been specifically designed to solve the
assignment problem. The method is Hungarian Method.
The method was developed by Harold W. Khun on 1955 and is based upon the
mathematical theories developed by D. Koning and E. Egervary in 1932.
The method involves matrix reduction - Subtracting and adding appropriate values in the
matrix yields an optimal solution to the assignment problem.
Steps in the Hungarian method
Step 1: Create an initial assignment table.
Step 2: Perform row operation: Choose the minimum cost in the first row and subtract it from all
elements in the first row. If the minimum cost is not unique, choose any one. Repeat the same
operation for all the remaining rows.
Step 3: Perform column operation: Start with the table obtained after performing the above row
operation. Choose the minimum element from the first column and subtract it from all elements in
the first column. If the minimum element is not unique, choose any one. Repeat the same operation
for all the remaining columns.
Steps in the Hungarian method
Step 4: Cover all the zeros by drawing minimum number of horizontal and/or vertical lines across
the rows and columns. If the number of lines is equal to the number of rows (or columns), the
optimality condition has been satisfied and go to Step 6; otherwise go to Step 5.
Note:
One can draw all horizontal lines or all vertical lines or any
amount of mixing of horizontal and vertical lines to cover all the
zeros. But, make sure that the number of lines you use is the
minimum. If you can cover all the zeros by ‘m’ lines, then you
cannot use more than ‘m’ lines to cover all the zeros.
Steps in the Hungarian method
Step 5: Choose the smallest uncovered element.
1. Subtract this element from all the uncovered elements.
2. Add this element to the element at the intersection of two lines, i.e., the elements on
which two lines have passed.
3. The elements on which only one line has passed should be left unchanged.
4. Go to Step 4.
Steps in the Hungarian method
Step 6: Pick up only the zeros and put them in a table, called final assignment table. Identify
row/column containing a single zero, put a ‘√ ’mark there. Put ‘x’ signs in all cells containing
zero in the row or column corresponding the cell where you have just put ‘√ ’ sign.
Proceed in this manner until you complete all the assignment. Write down the optimal
assignment and the optimal value for all the assignments.
… from the previous example
Initial assignment table
Minimum value in each row
Assignment table after row operation
Minimum value in each column
Assignment table after column operation
Assignment table with the minimum number of lines to cover all the zeros
Smallest uncovered element
Since the number of lines used in the table above is less than
the number of rows (or columns), the optimality condition is
not satisfied!!
The new assignment table produced by using Step 5
The new assignment table with the minimum lines to cover all the zeros
The row/column with single(or fewest) zero(s) is chosen first
in order to produced final assignment table
Final assignment table
The optimal assignment for Fowle Marketing Research
Assignment Time (days)
Terry → Client 2 15
Karl → Client 3 5
Mustafa → Client 1 6
Total time = 26 days
Exercise
A professor has been contacted by four not-for-profit agencies that
are willing to work with student consulting teams. The agencies
need help with such things as budgeting, information systems,
coordinating volunteers, and forecasting. Although each of the
four student teams could work with any of the agencies, the
professor feels that there is a difference in the amount of time it
would take each group to solve each problem. The professor's
estimate of the time, in days, is given in the table below. Use the
Hungarian method to determine which team works with which
project. All projects must be assigned and no team can be
assigned to more than one project.
Project
Team Budgeting Information Volunteers Forecasting
A 32 35 15 27
B 38 40 18 35
C 41 42 25 38
D 45 45 30 42
The estimation of completion time (days).
Answer:
Team A works with the forecast, Team B works with volunteers, Team C works with
budgeting, and Team D works with information. The total time is 131.
Special Cases in Assignment Problems
Maximizatio
Unbalanced
n
assignment
assignment
problem
problem
Special Cases
Unacceptabl
Multiple
e
assignments
assignments
Unbalanced
assignment
problem
• Could be any one of the two types:
• No. of persons > No. of tasks
• No. of persons < No. of tasks
• To solve it by LP, no modification is needed.
• To solve it by Hungarian method, it is required that
the problem be balanced – we need to create an
artificial or dummy task(s)/person(s).
• No assignment will actually be made corresponds to
the dummy.
Maximization
assignment
problem
• If
the numbers in the assignment tableau represent
profits rather than costs, then we have a maximization
assignment problem.
• To solve it by LP, simple we change the objective
function, “” “”, and no other change will take place.
• To solve it by Hungarian method, we need to convert
into a minimization problem (i.e. opportunity cost
assignment tableau).
• Opportunity costs are calculated by subtracting every
element in each column from the largest element in that
column.
Multiple
assignments
• In particular cases, one person can be assigned to
more than one task.
• This can be easily solved by LP. We need to change
the constraint representing the person that can be
assigned to more than one task.
• All other constraints will remain unchanged.
Unacceptable
assignments
• Sometimes, the situation arises where there is a
restriction to assign some particular person(s) to some
particular task(s)
• There are two ways to solve it by LP;
1. Drop the corresponding variable from the original
formulation
2. With the original formulation, add the additional
constraint, “corresponding variable = 0”
• To solve it by Hungarian method, we imposed a very
high cost so that it is excluded from being considered
in the optimal solution.