Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignments Problems Hungarian Method

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

ASSIGNMENTS PROBLEMS

Hungarian Method:

The Hungarian Method is discussed in the form of a series of computational steps as follows, when
the objective function is that of minimization type.

Step 1:

From the given problem, find out the cost table. Note that if the number of origins is not equal to
the number of destinations then a dummy origin or destination must be added.

Step 2:

In each row of the table find out the smallest cost element, subtract this smallest cost element from
each element in that row. So, that there will be at least one zero in each row of the new table. This
new table is known as First Reduced Cost Table.

Step 3:

In each column of the table find out the smallest cost element, subtract this smallest cost element
from each element in that column. As a result of this, each row and column has at least one zero
element. This new table is known as Second Reduced Cost Table.

Step 4:

Now determine an assignment as follows:

1. For each row or column with a single zero element cell that has not be assigned or
eliminated, box that zero element as an assigned cell.
2. For every zero that becomes assigned, cross out all other zeros in the same row and for
column.
3. If for a row and for a column there are two or more zero and one can’t be chosen by
inspection, choose the assigned zero cell arbitrarily.
4. The above procedures may be repeated until every zero element cell is either assigned
(boxed) or crossed out.

Step 5:

An optimum assignment is found, if the number of assigned cells is equal to the number of rows (and
columns). In case we had chosen a zero cell arbitrarily, there may be an alternate optimum. If no
optimum solution is found i.e. some rows or columns without an assignment then go to Step 6.

Step 6:

Draw a set of lines equal to the number of assignments which has been made in Step 4, covering all
the zeros in the following manner

1. Mark check (√) to those rows where no assignment has been made.
2. Examine the checked (√) rows. If any zero element cell occurs in those rows, check (√) the
respective columns that contains those zeros.
3. Examine the checked (√) columns. If any assigned zero element occurs in those columns,
check (√) the respective rows that contain those assigned zeros.
4. The process may be repeated until now more rows or column can be checked.
5. Draw lines through all unchecked rows and through all checked columns.

Step 7:

Examine those elements that are not covered by a line. Choose the smallest of these elements and
subtract this smallest from all the elements that do not have a line through them.

Add this smallest element to every element that lies at the intersection of two lines. Then the
resulting matrix is a new revised cost table.

Repeat Step 4.

Problem No. 2.1.


A work shop contains four persons available for work on the four jobs. Only one person can work on
any one job. The following table shows the cost of assigning each person to each job. The objective is
to assign person to jobs such that the total assignment cost is a minimum.

Jobs
1 2 3 4
A 20 25 22 28
Persons B 15 18 23 17
C 19 17 21 24
D 25 23 24 24

Solution
Step 1:-
Jobs
1 2 3 4
A 20 25 22 28
Persons B 15 18 23 17
C 19 17 21 24
D 25 23 24 24

Step 2:-

Row A = 20, Row B = 15, Row C = 17, Row D = 23

Jobs
1 2 3 4
A 0 5 2 8
Persons B 0 3 8 2
C 2 0 4 7
D 2 0 1 1

Step 3:-

Column 1 = 0, Column 2 = 0, Column 3 = 1, Colum 4 = 1

Jobs
1 2 3 4
A 0 5 1 7
Persons B 0 3 7 1
C 2 0 3 6
D 2 0 0 0

Step 4:-
Jobs
1 2 3 4
A 0 5 1 7
Persons B 0 3 7 1
C 2 0 3 6
D 2 0 0 0

Step 5:-

No Optimum solution is found. Hence, move to Step 6.

Step 6:-
Jobs
1 (Tick) 2 3 4
A (Tick) 0 5 1 7
Persons B (Tick) 0 3 7 1
C 2 0 3 6
D 2 0 0 0

Step 7:-
Jobs
1 2 3 4
A 0 4 0 6
Persons B 0 2 6 0
C 3 0 3 6
D 3 0 0 0

Person A is assigned to Job 1

Person B is assigned to Job 4

Person C is assigned to Job 2

Person D is assigned to Job 3


Total Minimum Time = 20 + 17 + 24 + 17 = 78

Problem No. 2.2.


Solve the following unbalanced assignment problem of minimizing the total time for
performing all the jobs.

Jobs
1 2 3 4 5
Workers A 5 2 4 2 5
B 2 4 7 6 6
C 6 7 5 8 7
D 5 2 3 3 4
E 8 3 7 8 6
F 3 6 3 5 7
Solution
Step 1:-
Jobs
1 2 3 4 5 6
Workers A 5 2 4 2 5 0
B 2 4 7 6 6 0
C 6 7 5 8 7 0
D 5 2 3 3 4 0
E 8 3 7 8 6 0
F 3 6 3 5 7 0

Step 2:-
Jobs
1 2 3 4 5 6
Workers A 5 2 4 2 5 0
B 2 4 7 6 6 0
C 6 7 5 8 7 0
D 5 2 3 3 4 0
E 8 3 7 8 6 0
F 3 6 3 5 7 0

Step 3:-
Jobs
1 2 3 4 5 6
Workers A 3 0 1 0 1 0
B 0 2 4 4 2 0
C 4 5 2 6 3 0
D 3 0 0 1 0 0
E 6 1 4 6 2 0
F 1 4 0 3 3 0

Step 4:-
Jobs
1 2 3 4 5 6
Workers A 3 0 1 0 1 0
B 0 2 4 4 2 0
C 4 5 2 6 3 0
D 3 0 0 1 0 0
E 6 1 4 6 2 0
F 1 4 0 3 3 0
Step 5:-
This is not an optimum Solution.

Step 6:-
Jobs
1 2 3 4 5 6 (Tick)
Workers A 3 0 1 0 1 0
B 0 2 4 4 2 0
C (Tick) 4 5 2 6 3 0
D 3 0 0 1 0 0
E (Tick) 6 1 4 6 2 0
F 1 4 0 3 3 0

Step 7:-
Jobs
1 2 3 4 5 6
Workers A 3 0 1 0 1 1
B 0 2 4 4 2 1
C 3 4 1 5 2 0
D 3 0 0 1 0 1
E 5 0 3 5 1 0
F 1 4 0 3 3 0
Worker A is assigned to Job 4

Worker B is assigned to Job 1

Worker C is assigned to Job 6. Since Job 6 is dummy. Hence no assignment to Worker C.

Worker D is assigned to Job 5

Worker E is assigned to Job 2

Worker F is assigned to Job 3

Total Minimum Time = 2 + 2 + 0 + 4 + 3 + 3 = 14


Problem No. 2.3. (Homework)
A marketing company wants to assign three employees viz. A, B, and C to four offices
located at W, X, Y and Z respectively. The assignment cost for this purpose is given in
following table:-

Offices
W X Y Z
Employee A 160 220 240 200
B 100 320 260 160
C 100 200 460 250

Problem No. 2.4.


A computer centre has five jobs to be done and has five computer machines to perform
them. The cost of processing of each job on any machine is shown in the table below.
Because of specific job requirement and machine configurations certain jobs can’t be done
on certain machines. These have been shown by X in the cost table. The assignment of jobs
to the machines must be done on a one to one basis. The objective here is to assign the jobs
to the available machines so as to minimize the total cost without violating the restrictions
as mentioned above.

Jobs
1 2 3 4 5
1 70 30 X 60 30
Computer 2 X 70 50 30 30
Machines 3 60 X 50 70 60
4 60 70 20 40 X
5 30 30 40 X 70
Solution

“Substitute X = high Value” and solve the problem with the above
steps.

Problem No. 2.5.


Consider the problem of five different machines can do any of the required five jobs with
different profits resulting from each assignment as illustrated below. Find out the maximum
profit through optimal assignment.
Machines
1 2 3 4 5
1 40 47 50 38 50
Jobs 2 50 34 37 31 46
3 50 42 43 40 45
4 35 48 50 46 46
5 38 72 51 51 49
Solution
Subtract the matrix with the highest value.
Hence, subtract 72 with all the values of the matrix.
Machines
1 2 3 4 5
1 32 25 22 34 22
Jobs 2 22 38 35 41 26
3 22 30 29 32 27
4 37 24 22 26 26
5 34 0 21 21 23
Now solve it using Hungarian Method.
Final Answer is
Jobs Machine
1 3
2 5
3 1
4 4
5 2

Problem No. 2.6.


A trip from Chennai to Coimbatore takes six hours by bus. A typical time table of the bus
service in both the direction is given in the Table 1. The cost of providing this service by the
company based on the time spent by the bus crew i.e. driver and conductor away from their
places in addition to service times. The company has five crews. The condition here is that
every crew should be provided with more than 4 hours of rest before the return trip again and
should not wait for more than 24 hours for the return trip. Also the company has guest house
facilities for the crew of Chennai as well as at Coimbatore.

Find which line of service is connected with which other line so as to reduce the waiting time
to the minimum.
Departure Route Arrival at Arrival at Route Departure
from Number Coimbatore Chennai Number from
Chennai Coimbatore
06:00 1 12:00 11:30 a 05:30
07:30 2 13:30 15:00 b 09:00
11:30 3 17:30 21:00 c 15:00
19:00 4 01:00 00:30 d 18:30
00:30 5 06:30 06:00 e 00:00
Solution
Let Crew resides at Chennai and rest at Coimbatore. Waiting times is as follows:-
Routes
a b c d e
1 17.5 21 A 6.5 12
Routes 2 16 19.5 A 5 10.5
3 12 15.5 21.5 A 6.5
4 4.5 8 4 17.5 23
5 23 A 8.5 12 17.5

Let Crew resides at Coimbatore and rest at Chennai. Waiting times is as follows:-
Routes
a b c d e
1 18.5 15 9 5.5 A
Routes 2 20 16.5 10.5 7 A
3 A 20.5 14.5 11 5.5
4 7.5 A 22 18.5 13
5 13 9.5 A A 18.5

Combine matrix to find the optimum solution considering stay and rest in both the location
is as follows:-

Routes
a b c d e
1 17.5* 15 9 5.5 12*
Routes 2 16* 16.5 10.5 5* 10.5*
3 12* 15.5* 14.5 11 5.5
4 4.5* 8* 14* 17.5* 13
5 13 9.5 8.5* 12* 17.5*
Now solve it using Hungarian Method.
Final Answer is
Routes Residence of the Crew Waiting Time
1–c Coimbatore 9
2–d Chennai 5
3–e Coimbatore 5.5
4–a Chennai 4.5
5–b Coimbatore 9.5

You might also like