04-Unit Four - OR
04-Unit Four - OR
Yalew Mamo
Introduction
• The basic objective of an assignment problem is to assign
n number of resources to n number of activities so as to
minimize the total cost or to maximize the total profit of
allocation in such a way that the measure of effectiveness
is optimized.
• The assignment model can be applied in many decision-
making processes like determining optimum processing
time in machine operators and jobs, effectiveness of
teachers and subjects, designing of good plant layout, etc.
Formulation of the Problem
• Let there are n jobs and n persons are available with
different skills. If the cost of doing jth work by ith person is
Cij. Then the cost matrix is given in the table 1 below:
Continued
• Now the problem is which work is to be assigned to whom
so that the cost of completion of work will be minimum.
Mathematically, we can express the problem as follows:
•
• To minimize z (cost) =
•
• Where xij =
•
• with the restrictions
Comparison between Transportation Problem and
Assignment Problem
• Now let us see what are the similarities and differences
between Transportation problem and Assignment
Problem.
• Similarities
• 1. Both are special types of linear programming problems.
• 2. Both have objective function, structural constraints, and
non-negativity constraints. And the relationship between
variables and constraints are linear.
• 3. Both are basically minimization problems. For
converting them into maximization problem same
procedure is used.
Differences
Assignment Problem
Transportation Problem
• 1. The matrix of the problem
• 1. The problem may have must be a square matrix.
rectangular matrix or square • 2. The rows and columns must
matrix.
have one to one allocation.
• 2. The rows and columns may
Because of this property, the
have any number of allocations
matrix must be a square matrix.
depending on the rim conditions.
• 3. The basic feasible solution is
• 3. The basic feasible solution is
obtained by Hungarian method
obtained by northwest corner
or Flood's technique or by
method or matrix minimum
method or VAM Assignment algorithm.
• 4. The optimality test is given by
• 4. Optimality test is given by
stepping stone method or by drawing minimum number of
MODI method. horizontal and vertical lines to
cover all the zeros in the
matrix.
Continued
Assignment Problem
Transportation Problem
• 5. Every column and row
• 5. The basic feasible must have at least one
solution must have m + n – zero. And one machine is
1 allocation.
assigned to one job and
• 6. The rim requirement
vice versa.
may have any numbers • 6. The rim requirements
(positive numbers).
are always 1 each for
• 7. In transportation every row and one each
problem, the problem deals for every column.
with one commodity being
• 7. Here row represents
moved from various origins
to various destinations. jobs or machines and
columns represent
machines or jobs.
Types of Assignment Problem
• The assignment problems are of two types. It can be either
• (i) Balanced or
• (ii) Unbalanced.
• If the number of rows is equal to the number of columns or
if the given problem is a square matrix, the problem is
termed as a balanced assignment problem. If the given
problem is not a square matrix, the problem is termed as an
unbalanced assignment problem.
• If the problem is an unbalanced one, add dummy rows
/dummy columns as required so that the matrix becomes a
square matrix or a balanced one. The cost or time values
for the dummy cells are assumed as zero.
Approach to Solution
• Let us consider a simple example and try to understand
the approach to solution and then discuss complicated
problems.
• 1. Solution by visual method
• In this method, first allocation is made to the cell having
lowest element. If there is more than one cell having
smallest element, tie exists and allocation may be made
to any one of them first and then second one is selected.
In such cases, there is a possibility of getting alternate
solution to the problem. This method is suitable for a
matrix of size 3 × 3 or 4 × 4. More than that, we may face
difficulty in allocating.
Continued
• There are 3 jobs A, B, and C and three machines X, Y, and Z.
All the jobs can be processed on all machines. The time
required for processing job on a machine is given below in the
form of matrix. Make allocation to minimize the total
processing time.
Machines (time in hours)
Jobs X Y Z
A 11 16 21
B 20 13 17
C 13 15 12
• Allocation: A to X, B to Y and C to Z and the total time = 11 +
13 +12 = 36 hours. (Since 11 is least, Allocate A to X, 12 is the
next least, Allocate C to Z)
Continued
• 2. Solving the assignment problem by enumeration
• Let us take the same problem and workout the solution.
Machines (time in hours)
Jobs X Y Z
A 11 16 21
B 20 13 17
C 13 15 12
• Step IV
• Constraints:
• (a) Constraints on subassemblies are (b) Constraints on contractors are
• X11+ X12+ X13+X14 = 1 X11+ X21+ X31+X41 = 1
• X21+ X22+ X23+X24 = 1 X12+ X22+ X32+X42 = 1
• X31+ X32+ X33+X34 = 1 X13+ X23+ X33+X43 = 1
• X41+ X42+ X43+X44 = 1 X14+ X24+ X34+X44 = 1
Continued
• (ii) Comparing this model with the transportation
model, we find that ai = 1, i = 1,2,3,4, and bj = 1, j =
1,2,3,4. Thus, the assignment model can be represented
as in table below. Therefore, the assignment model is a
special case of the transportation model in which
• (a) All right- hand side constraints in the constraints are
unity i.e., ai =1, bj =1.
Contractors
1 2 3 4 Supply ai
1 15 13 14 17 1
Subassemblies 2 11 12 15 13 1
(jobs, tasks or 3 13 12 10 11 1
requirements) 4 15 17 14 16 1
Demand bj 1 1 1 1
(b) All coefficients of Xij in the constraints are unity.
(c) m = n
Continued
• (iii) Solution of the Model
• We shall apply the food’s technique for solving the
assignment problems. This techniques also known as the
Hungarian Method or Reducing Matrix Method consists the
following steps.
• Step I
• Prepare a square Matrix: since the situation involves a
square matrix, this step is not necessary.
• Step II
• Deduce the Matrix: this involves the following sub steps:
• Sub step 1: In the effectiveness matrix, subtract the minimum
element of each raw from all the elements of that row. The
resulting reduced matrix will have at least one zero element
in each row. Check if there is at least one zero element in
each column also. If so, stop here. If not proceed to subset 2.
Continued
• Sub step 2: Mark the columns that do not have zero
element. Now subtract the minimum element of each such
column from all the elements of that column.
Continued
• Step III
• Check if the Optimal assignment can be made in the
current solution or not
• Basis for making this check is that if the minimum number
of lines crossing all zeros in low than n (in our example n
=4), then an optional assignment cannot be made in the
current solution. If it is equal to n (=4), then optimal
assignment can be made in the current solution.
Contractors
1 2 3 4
1 2 0 1 3
Subassemblies
2 0 1 4 1
3 3 2 0 0
4 1 3 1
0
Continued
• The optimal assignment can be made in the current
solution. Thus minimum total cost is
• = birr (13x1 + 11x1 + 11x1 +14x1) x 100 = 4,900 birr.
• Subassembly 1 - Contractor 2,
• Subassembly 2 - Contractor 1,
• Subassembly 1 - Contractor 4,
• Subassembly 1 - Contractor 3
J2 3 0 1
0
J3 0 3 2 3
J4 7 1 1 0
Continued
• Sub step 4 Mark (✓) the rows for which assignment has not
been made. In our problem it is the third row.
• Sub step 5: Mark (✓) columns (not already marked) which
have zeros in marked rows. Thus column 1 is marked (✓)
• Sub step 6: Mark (✓) rows (not already marked) which have
zeros in the marked columns. Thus row 1 is marked (✓)
• Sub step 8: draw liens through all unmarked rows and
through all marked columns.
Continued
• Step IV
• Iterate Towards Optimality
Continued
• Step VI
• Iterate Towards Optimality
Continued
• As there is assignment in each row and in each column,
optimal assignment can be made in the current solution.
Hence optimal assignment policy is
• Job J1 should be assigned to machine M1,
• Job J2 should be assigned to machine M2,
• Job J3 should be assigned to machine M3,
• Job J4 should be assigned to machine M4,
• And optimal cost = (5+5+10+3) = 23 birr.