Assignment Problem

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Assignment Problem

► Special - purpose algorithm used in linear programming.

Objective : To find assignment : Which job should be assigned to which


worker (machine) so that cost for performing all the jobs should be
minimized OR profit after performing the jobs should be
maximize.

Basic Characteristics

1. Number of jobs should be equal to number of workers (machines).

2. One job should be assigned to one worker (machine) OR


One worker (machine) should be assigned with one job.

3. Every worker is able to do every kind of jobs.


Assignment Method

 Assignment Method is also known as Flood’s technique or the


Hungarian method, provides much more efficient method of
solving assignment problems.

Steps in the assignment Method

Step I. Determine the opportunity-cost table.


a. Subtract the lowest entry in each row of the given cost table
from all entries in the row.
b. Subtract the lowest entry in each column of the obtained in part a
from all entries in the column.
Assignment Model (Example)
To Machine X Machine Y Machine Z
From
Job A 25(cost) 31 35
Job B 15 20 24
Job C 22 19 17

Job Opportunity cost

TO Machine X Machine Y Machine Z


From
Job A 0 6 10

Job B 0 5 9

Job C 5 2 0
Assignment Model (Example Contd.)
Machine Opportunity Cost

TO Machine X Machine Y Machine Z


From
Job A 0 4 10
Job B 0 3 9
Job C 5 0 0

Assign The Jobs To Machines


To Machine X Machine Y Machine Z
From
Job A 0 4 10
Job B 0 3 9
Job C 5 0 0
Assignment Method (Contd.)
Step II. Determine whether an optimal assignment can be made.
The Procedure is to cover all the zeroes by minimum number of
lines. So, to cover the zeroes, we use Hungarian Method.

Steps in Hungarian Method

1. Mark the row with no assignment.


2. Mark column with zeroes in the marked rows.
3. Mark rows with assignment in the marked columns.
Repeat this process for the row scanning and column scanning.
4. Draw straight lines through unmarked rows and marked columns.
Assignment Model (Example Contd.)
To Machine X Machine Y Machine Z
From

Job A 0 4 10
Job B 0 3 9
Job C 5 0 0

To Machine X Machine Y Machine Z


From
Job A 0 4 10
Job B 0 3 9
Job C 5 0 0
Minimum value is 3
Assignment Method (Contd.) (with example)
Step III. Revise the total opportunity – cost table.
a. Select the smallest number in the table not covered by the
straight lines and subtract this number from all number not
covered by a straight line.
b. Add this numbers to the numbers lying at the intersection of
any two lines.
To Machine X Machine Y Machine Z
From
Job A 0 1 7
Job B 0 0 6
Job C 8 0 0

Now, Again assign the jobs to the machines, as done in step I.


Assignment Model (Example Contd.)
To Machine X Machine Y Machine Z
From
Job A 0 1 7
Job B 0 0 6
Job C 8 0 0

Now, we see that, Job A assigned to Machine X with cost 25


Job B assigned to Machine Y with cost 20
Job C assigned to Machine Z with cost 17

Total cost is (25+20+17 = 62) to assign jobs to different machines.


Maximization Problem In Assignment Method
Problem : Heidi Kurtweiler manages the Jamesville Car Rental Agency.
This year, she plans to purchase five new automobiles to replace five older
vehicles. The older vehicles are to be sold at auction. Heidi has solicited bids
from five individuals, each of whom wishes to purchase only one vehicle but
has agreed to make a sealed bid on each of the five. The bids are as follows :
Automobile
Buyer’s Ford Dodge Bulck Volkswagen Toyota
name
A $3,000 $2,500 $3,300 $2,600 $3,100
B 3,500 3,000 2,800 2,800 3,300
C 2,800 2,900 3,900 2,300 3,600
D 3,300 3,100 3,400 2,900 3,500
E 2,800 3,500 3,600 2,900 3,000
Heidi wishes to determine which bid to accept from each of the five bidders
so that each of them can purchase one vehicle while the total of the five
Accepted bids is a maximum.
Solution Part of Maximization Problem
Automobile
Buyer’ Ford Dodge Bulck Volkswagen Toyota
s name
A $900 $1400 $600 $1300 $800
B 400 900 1100 1100 600
C 1100 1000 0 1600 300
D 600 800 500 1000 400
E 1100 400 300 1000 900

Now, the above problem is Minimization Problem, which can be


Solved as the earlier method.
Restrictions On Assignment
Problem Type I
Problem : In the modification of a plant layout of a factory four new
machines M1, M2, M3 & M4 are to be installed in a machine shop. There
are five vacant places A, B, C, D & E available. Because of limited space,
machine M2 cannot be placed at C and M3 cannot be placed at A. The
cost of locating of machine I to place j in rupees is shown below. Find the
optimal assignment schedule.

A B C D E
M1 9 11 15 10 11
M2 12 9 - 10 9
M3 - 11 14 11 7
M4 14 8 12 7 8
Problem Type I (Contd.)
A B C D E
M1 9 11 15 10 11
M2 12 9 M 10 9
M3 M 11 14 11 7
14 8 12 7 8
M4 0 0 0 0 0
Dummy
Step I A B C D E
M1 0 2 6 1 2
M2 3 0 M 1 0
M3 M 4 7 4 0
7 1 5 0 1
M4 0 0 0 0 0
Dummy
Problem Type I (Contd.)
A B C D E
M1 0 2 6 1 2
M2 3 0 M 1 0
M3 M 4 7 4 0
7 1 5 0 1
M4 0 0 0 0 0
Dummy
Machine M1 will be placed at A with cost of 9
Machine M2 will be placed at B with cost of 9
Machine M3 will be placed at E with cost of 7
Machine M4 will be placed at D with cost of 7
Dummy machine will be placed at C with cost 0

Total Cost = 9+9+7+7+0 = 32


Problem Type II
Problem : A salesman has to visit five cities A, B, C, D and E. The
intercity distances are tabulated below :
From/To A B C D E
A - 12 24 25 15
B 6 - 16 18 7
C 10 11 - 18 12
D 14 17 22 - 16
E 12 13 23 25 -
Note that the distance (in km.) between two cities need not be same
both ways.
If the salesman starts from city A and has to come back to city A, which
route would you advise him to take so that total distance travelled by
him is minimized?
Problem Type II (Contd.)
To A B C D E
From

A - 12 24 25 15
B 6 - 16 18 7
C 10 11 - 18 12
D 14 17 22 - 16
E 12 13 23 25 -

Step I (a) To A B C D E
From

A M 0 12 13 3
B 0 M 10 12 1
C 0 1 M 8 2
D 0 3 8 M 2
E 0 1 11 13 M
Problem Type II (Contd.)
Step I (a) To A B C D E
From

A M 0 4 5 2
B 0 M 2 4 0
C 0 1 M 0 1
D 0 3 0 M 1
E 0 1 3 5 M
To A B C D E
Step II From

A M 0 4 5 2
B 0 M 2 4 0
C 0 1 M 0 1
D 0 3 0 M 1
E 0 1 3 5 M
Problem Type II (Contd.)
The optimal assignments are : (A to B) + (B to E) + (E to A) + (C to D) + (D to C) =
12+7+18+22+12 = 71 km.
In above problem we see that the salesman travelled from A to B then B to E
and after that he comes back to A from E. Which is not allowed in such kind of
problems.
Now, we have to move at next best solution.

The next minimum (non zero)


To A B C D element
E in the matrix is 1. So, we try
From into the solution.
A M 0 4 5 2
Another schedule can be : A→B,
B →E, E →C, C→D, D→A involving
B 0 M 2 4 0
distance of 12+7+23+18+14 = 74 km.
C 0 1 M 0 1
Earlier
D routing 0 was involving
3 071 km.M 1
is the shortest, but it does not satisfy the
restrictions.
E 0 1 3 5 M

You might also like