@4 - Assignment Problem

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Assignment Problem

Assignment problem is a special kind of transportation problem in


which each source should have the capacity to fulfil the demand of
any of the destination.
Main objective of assignment problem
To assign the jobs to the right operator such that the total processing
time/cost is minimized.

m be the no. of jobs and m be the


no. of operators
tij – processing time of the job i, if
it is assigned to the operator j
Examples of Assignment Problem:
The different examples (applications) of Assignment problem
Zero-one programming model for assignment problem
Question: Develop a zero-one programming model
Example:
4 jobs must be assigned to 4 persons. The cost of assigning job j to resource i is given in the following Table

Person
I1 I2 I3 I4
J1 5 9 3 6
Job J2 8 7 8 2
J3 6 10 12 7
J4 3 10 8 6

A solution to the assignment problem is feasible when every task is assigned to exactly one resource
and every resource gets exactly one task.
SOLVING THE ASSIGNMENT PROBLEM—HUNGARIAN ALGORITHM
The Hungarian algorithm consists of the four steps below. The first two steps are executed
once, while Steps 3 and 4 are repeated until an optimal assignment is found. The input of the
algorithm is n by n square matrix with only nonnegative elements.
Step 1: Subtract row minima
For each row, find the lowest element and subtract it from each element in that row.
Step 2: Subtract column minima
Similarly, for each column, find the lowest element and subtract it from each element in that
column.
Step 3: Algorithm for allocation
• If a row (or column) has exactly one assignable zero, make the assignment. The other zeros
in the corresponding column (or row) is not assignable.
• If a row or column has more than one assignable zero, do not make any assignment. Move
to the next row or column and go to Step l. Terminate when no assignment is possible.
If total number of assignment is equal to number of row or column, then it is an optimal
solution otherwise go to next step.
Step 4: Cover all zeros with a minimum number of lines
i. Tick all unassigned rows.
ii. If a row is ticked and has a zero, then tick the corresponding
column (if the column is not yet ticked).
iii. If a column is ticked and has an assignment, then tick the
corresponding row (if the row is not yet ticked).
iv. Repeat Steps ii. and iii. till no more ticking is possible.
v. Draw lines through unticked rows and ticked columns. The number
of lines represent the maximum number of assignments possible.
Step 5: Create additional zeros
Find the smallest element (call it k) that is not covered by a line in Step
4. Subtract k from all uncovered elements and add k to all elements that
are covered twice.
Example: 1 Person
I1 I2 I3 I4
J1 5 9 3 6
Job J2 8 7 8 2
J3 6 10 12 7
J4 3 10 8 6

For the cost matrix in above Table, the row minimum in the four rows are 3, 2, 6 and
3, respectively.
Row reductions Column Reductions
Person Person
I1 I2 I3 I4 I1 I2 I3 I4
J1 5-3 = 2 9-3=6 3-3=0 6-3=3 J1 2 2 0 3
Job J2 8-2=6 7-2=5 8-2=6 2-2=0 Job J2 6 1 6 0
J3 6-6=0 10-6=4 12-6=6 7-6=1 J3 0 0 6 1
J4 3-3=0 10-3=7 8-3=5 6-3=3 J4 0 3 5 3

Minimum of the four columns are 0, 4, 0 and 0


Person

I1 I2 I3 I4

J1 2 2 0 3
Job
J2 6 1 6 0

J3 0 0 6 1

J4 0 3 5 3

We can make assignments in the zero cost positions in above Table.


Row J1,J2 and J4 has exactly one assignable zero, make the assignment to cell
C13,C24,C41. Ignore the zero in cell C31 because this column already has assignment.
Now in Row J3 we have only one assignable zero so make the assignment C32.
Now we have obtained four assignments and the algorithm terminates. Since we have
obtained a feasible solution with four assignments, we have reached the optimal solution.
Question: Formulate the general LPP for the given assignment problem
and solve it by Hungerian method

Operator

O1 O2 O3 O4

J1 2 10 9 7

Job J2 15 4 14 8

J3 13 14 16 11

J4 3 15 13 8

Solution: 1 Find Row reduction


2 Column Reduction
3 Row Scanning (See single zero in each row and assign the job
to the operator)
Next Column Scanning ( See single zero in column and assign the operator to job)
Formulate the general LPP for the given Assignment problem and find
the minimum cost

J1 J2 J3 J4
P1 12 30 21 15
P2 18 33 9 31
P3 44 25 24 21
P4 23 30 28 14
Example:2 Let us consider a 5-job 5-machine assignment problem with
the cost coefficients shown in following table
Row reductions

Machine Machine
M1 M2 M3 M4 M5 M1 M2 M3 M4 M5
J1 160 130 175 190 200 J1 30 0 45 60 70
J2 135 120 130 160 175 J2 15 0 10 40 55
Job Job
J3 140 110 155 170 185 J3 30 0 45 60 75
J4 50 50 80 80 110 J4 0 0 30 30 60
J5 55 35 70 80 105 J5 20 0 35 45 70
Solution: subtracting the row minimum from every element of each row. The row
minima are 130, 120, 110, 50 and 35, respectively. We get the matrix shown in
following Table at the end of this operation.

Column minimum 0, 0, 10, 30 and 55


Subtracting column minimum from every element of the columns, we
get the matrix shown in the following Table

Machine
M1 M2 M3 M4 M5
J1 30 0 35 30 15
J2 15 0 0 10 0
Job J3 30 0 35 30 20
J4 0 0 20 0 5
J5 20 0 25 15 15
Applying Procedure to obtain initial set of assignments we assign Cl2 (Row l has only one
zero). We cross C22 ,C32, C42 and C52 and make them unassignable. We assign C23(Row 2
has only one zero). We leave Row 3 and 5 because it has no assignable zero and Rows 4
because it has two assignable zero. Applying this procedure to the columns, we assign
C23, C4l and cross the remaining zero of these columns and the procedure stops. We have
three assignments and, therefore, we do not have a feasible solution. We also observe that
every zero in the matrix is either assigned or crossed (not eligible for assignment).
Machine
M1 M2 M3 M4 M5
J1 30 0 35 30 15
J2 15 0 0 10 0
Job
J3 30 0 35 30 20
J4 0 0 20 0 5
J5 20 0 25 15 15
This solution is not optimal, so we need to go to the next step (step 4) and Cover all zeros
with a minimum number of lines:
tick Rows 3 and 5 (unassigned rows). Tick Column 2 (it has zero) and then tick Row l
(assignment Xl2). We draw lines through Rows 2 and 4 and Column 2. So, the maximum
assignments possible is three.

Machine
M1 M2 M3 M4 M5
J1 30 0 35 30 15 √
J2 15 0 0 10 0
Job
J3 30 0 35 30 20 √
J4 0 0 20 0 5
J5 20 0 25 15 15 √


all zeros in the previous Table have lines passing through them. Now we need to go to
next step (step 5).
The smallest element (call it k) that is not covered by a line in previous step is 15.
Subtract 15 from all uncovered elements and add 15 to all elements that are covered
twice. Now we have following matrix.

Machine
M1 M2 M3 M4 M5
J1 15 0 20 15 0
J2 15 15 0 10 0
J3 15 0 20 15 5
Job
J4 0 15 20 0 5
J5 5 0 10 0 0
Now again repeat the procedure of allocation we have following allocation:
Machine
M1 M2 M3 M4 M5
J1 15 0 20 15 0
J2 15 15 0 10 0
Job J3 15 0 20 15 5
J4 0 15 20 0 5
J5 5 0 10 0 0

Now we have 5 allocation so it is an optimal solution.


Final allocation is J1 M5, J2 M3, J3 M2, J4 M1, J5 M4

Total Cost= 200+130+110+50+80=570


Maximization Case in Assignment Problem

The profit maximization assignment problems are solved by converting them into a
cost minimization problem in either of the following two ways:

(i) Put a negative sign before each of the elements in the profit matrix in order to
convert the profit values into cost values.

(ii) Locate the largest element in the profit matrix and then subtract all the elements of
the matrix from the largest element including itself. The transformed assignment
problem can be solved by using usual Hungarian method.
Q. A marketing manager has five salesmen and five sales districts. Considering the
capabilities of the salesmen and the nature of districts, the marketing manager
estimates that the sales per month (in hundred rupees) for each salesman in each
district would be as follows:
Districts
A B C D E
1 32 38 40 28 40
2 40 24 28 21 36
Salesman
3 41 27 33 30 37
4 22 38 41 36 36
5 29 33 40 35 39

Find the assignment of salesmen to districts that will result in maximum sales.
Unbalanced Assignment Problem
Unbalanced Assignment Problem
If number of rows is not equal to number of columns, then it is called Unbalanced
Assignment Problem. So, to solve this problem, we must add dummy rows or
columns with cost 0, to make it a square matrix.
Example: Find Solution of Assignment problem using Hungarian method (MIN
case)
Job I II III IV
Work
A 9 14 19 15
B 7 17 20 19
C 9 18 21 18
D 10 12 18 19
E 10 15 21 16
Solution:
The number of rows = 5 and columns = 4. Here given problem is
unbalanced so we add 1 new column to convert it into a balance

Job I II III IV J5
Work
A 9 14 19 15 0
B 7 17 20 19 0
C 9 18 21 18 0
D 10 12 18 19 0
E 10 15 21 16 0
Row minimum for each row is zero, so Find out each column minimum element and subtract it from
that column.
Job I II III IV J5
Work
A 2 2 1 0 0
B 0 5 2 4 0
C 2 6 3 3 0
D 3 0 0 4 0
E 3 3 3 1 0
Make assignment in the opportunity cost matrix:
Job I II III IV J5
Work
A 2 2 1 0 0
B 0 5 2 4 0
C 2 6 3 3 0
D 3 0 0 4 0
E 3 3 3 1 0

Number of assignment is 4 and number of row is 5 so solution is not optimal.


Job I II III IV J5
Work
A 2 2 1 0 0
B 0 5 2 4 0
C 2 6 3 3 0 √
D 3 0 0 4 0
E 3 3 3 1 0 √
K=1 √

Job I II III IV J5
Work
A 2 2 1 0 1
B 0 5 2 4 1
C 1 5 2 2 0
D 3 0 0 4 1
E 2 2 2 0 0

Number of assignment is 4 so solution is not optimal.


Job I II III IV J5
Work
A 2 2 1 0 1 √
B 0 5 2 4 1
C 1 5 2 2 0 √
D 3 0 0 4 1
E 2 2 2 0 0 √
K=1 √ √
Job I II III IV J5
Work
A 1 1 0 0 1
B 0 5 2 5 2
C 0 4 1 2 0
D 3 0 0 5 2
E 1 1 1 0 0
Number of assignment is equal to number of rows so solution is optimal.

Work Job Cost


A III 19
B I 7
C J5 0
D II 12
E IV 16
Total 54
Travelling Salesman Problem
Travelling Salesman Problem
Q. ABC Ice Cream Company has a distribution depot in Greater Kailash Part I for
distributing ice-cream in South Delhi. There are four vendors located in different
parts of South Delhi (call them A, B, C and D) who have to be supplied ice-cream
everyday. The following matrix displays the distances (in kilometres) between the
depot and the four vendors:
TO
Depot Vendor A Vendor B Vendor C Vendor D
Depot 0 3.5 3 4 2
Vendor A 3.5 0 4 2.5 3
From Vendor B 3 4 0 4.5 3.5
Vendor C 4 2.5 4.5 0 4
Vendor D 2 3 3.5 4 0
What route should the company van follow so that the total distance travelled is
minimized?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy