You are on page 1of 23

Assignment Problems

Example:
Machinco has four jobs to be completed. Each machine
must be assigned to complete one job. The time
required to setup each machine for completing each job
is shown in the table below. Machinco wants to
minimize the total setup time needed to complete the
four jobs.

1
Setup times
(Also called the cost matrix)
Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 14 5 8 7
Machine 2 2 12 6 5
Machine 3 7 8 3 9
Machine 4 2 4 6 10

2
The Model
According to the setup table Machinco’s problem can be
formulated as follows (for i,j=1,2,3,4):
min Z  14 X 11  5 X 12  8 X 13  7 X 14  2 X 21  12 X 22  6 X 23  5 X 24
7 X 31  8 X 32  3 X 33  9 X 34  2 X 41  X 42  6 X 43  10 X 44
s.t. X 11  X 12  X 13  X 14  1
X 21  X 22  X 23  X 24  1
X 31  X 32  X 33  X 34  1
X 41  X 42  X 43  X 44  1
X 11  X 21  X 31  X 41  1
X 12  X 22  X 32  X 42  1
X 13  X 23  X 33  X 43  1
X 14  X 24  X 34  X 44  1
Xij  0 or Xij  1
3
For the model on the previous page note that:

Xij=1 if machine i is assigned to meet the demands of


job j

Xij=0 if machine i is not assigned to meet the demands


of job j

In general an assignment problem is a balanced


transportation problem in which all supplies and
demands are equal to 1.
4
Solution Method
Although the transportation simplex appears
to be very efficient, there is a certain class of
transportation problems, called assignment
problems, for which the transportation
simplex is often very inefficient. For that
reason there is an other method called The
Hungarian Method.

5
Basic Ideas
• Suppose we ranked all feasible assignments in
increasing order of cost.
• The ranking does not change if one subtracts the
same amount, say, D, from all costs in the same row,
since all assignment costs are reduced by D.
• The ranking does not change if one subtracts the
same amount, say, D, from all costs in the same
column, since all assignment costs are reduced by D.

6
Basic Ideas (cont’d)
• An assignment selects one entry in each
row and one in each column.
• As long as all costs are kept non-negative, if
the reduced cost matrix allows a zero cost
assignment, that assignment is optimal.
• If there is a zero cost in each row and a zero
cost in each column of the reduced cost
matrix, this assignment is optimal.

7
The steps of The Hungarian Method are as
listed below:

Step1.
Find the minimum element in each row of the mx n cost
matrix.
Construct a new matrix by subtracting from each cost the
minimum cost in its row. For this new matrix, find the
minimum cost in each column. Construct a new matrix
(reduced cost matrix) by subtracting from each cost the
minimum cost in its column.

8
Step2.
Draw the minimum number of lines (horizontal and/or
vertical) that are needed to cover all zeros in the reduced
cost matrix. If m lines are required, an optimal solution is
available among the covered zeros in the matrix. If fewer
than m lines are required, proceed to step 3.

Step3.
Find the smallest nonzero element (call its value k) in the
reduced cost matrix that is not covered by the lines
drawn in step 2. Now subtract k from each uncovered
element of the reduced cost matrix and add k to each
element that is covered by two lines. Return to step2.

9
Cost Matrix
Time (Hours)

Job1 Job2 Job3 Job4

Machine 1 14 5 8 7

Machine 2 2 12 6 5

Machine 3 7 8 3 9

Machine 4 2 4 6 10

10
Setup times
(Also called the cost matrix)

Time (Hours)

Job1 Job2 Job3 Job4

Machine 1 14-5 5-5 8-5 7-5

Machine 2 2-2 12-2 6-2 5-2

Machine 3 7-3 8-3 3-3 9-3

Machine 4 2-2 4-2 6-2 10-2

11
Setup times
(Also called the cost matrix)

Time (Hours)

Job1 Job2 Job3 Job4

Machine 1 9 0 3 2-2

Machine 2 0 10 4 3-2

Machine 3 4 5 0 6-2

Machine 4 0 2 4 8-2

12
Setup times
(Also called the cost matrix)
Time (Hours)

Job1 Job2 Job3 Job4

Machine 1 9 0 3 0

Machine 2 0 10 4 1

Machine 3 4 5 0 4

Machine 4 0 2 4 6

13
Setup times
(Also called the cost matrix)
Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 9 +1 0 3 +1 0
Machine 2 0 10-1 4 1-1
Machine 3 4 5-1 0 4-1
Machine 4 0 2-1 4 6-1

14
Setup times
(Also called the cost matrix)
Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 10 0 4 0
Machine 2 0 9 4 0
Machine 3 4 4 0 3
Machine 4 0 1 4 5

15
Setup times
(Also called the cost matrix)
Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 10 0 4 0
Machine 2 0 9 4 0
Machine 3 4 4 0 3
Machine 4 0 1 4 5

16
Optimal Assignment
For the Reduced Cost Matrix
Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 10 0 4 0
Machine 2 0 9 4 0
Machine 3 4 4 0 3
Machine 4 0 1 4 5

17
Optimal Assignment
For the Original Cost Matrix
Cost = 15

Time (Hours)
Job1 Job2 Job3 Job4
Machine 1 14 5 8 7
Machine 2 2 12 6 5
Machine 3 7 8 3 9
Machine 4 2 4 6 10

18
Maximization Problem
Profits

Job1 Job2 Job3 Job4

Subordinate 1 5 40 20 5

Subordinate 2 25 35 30 25

Subordinate 3 15 25 20 10

Subordinate 4 15 5 30 15

19
It is a maximization assignment problem. Therefore converted into minimization by subtracting
all elements from the highest element of this matrix. Highest element is 40 .
Then all the process of Hungarian method to be followed.

Profits

Job1 Job2 Job3 Job4

Subordinate 1 40-5 40-40 40-20 40-5

Subordinate 2 40-25 40-35 40-30 40-25

Subordinate 3 40-15 40-25 40-20 40-10

Subordinate 4 40-15 40-5 40-30 40-15

20
Unbalanced Problem
Time (Hours)

Job1 Job2 Job3 Job4

Machine 1 9 14 19 15

Machine 2 7 17 20 19

Machine 3 9 18 21 18

Machine 4 10 12 18 19

Machine 5 10 15 21 16
21
Maximization &Unbalanced
Problem
Time (Hours)

Job1 Job2 Job3 Job4 Job5

Mechanic 1 62 78 50 111 82

Machine 2 71 84 61 73 59

Machine 3 87 92 111 71 81

Machine 4 48 64 87 77 80

22
Practice Questions will be
provided to you online through
PDF

Thank You

23

You might also like