Você está na página 1de 20

ASSIGNMENT PROBLEM

The objective of an assignment problem is to assign different jobs to different operators in order to minimize the total cost. In a standard assignment problem there should be one-one correspondence between operators and jobs i.e. each job must be assigned to one operator and each operator must be assigned to a single job.

HUNGARIAN ALGORITHM:
The Hungarian algorithm is used to solve assignment problems. It is based on the following steps: Step 1: Row Reduction: Subtract the smallest element of each row from every element of that row. Therefore, there will be at least one zero in each row of the reduced matrix. Column Reduction: Subtract the smallest element of each column from every element of that column. Therefore, there will be at least one zero in each column of the reduced matrix. Step 2: Examine rows successively until a row with single zero is found. Cross all the zeros in the associated column and draw a vertical line through the associated column. Similarly examine columns successively until a column with single zero is found. Cross all the zeros in the associated row and draw a vertical line through the associated row. If there is no single zero in any row or column of the reduced matrix, then arbitrarily choose a row or column having the minimum number of zeros. Arbitrarily, choose zero in the row or column, cross the remaining zeros in the associated row and column and draw a vertical or horizontal line (not both). Repeat the procedure until all zeros are either assigned or crossed out. Step 3: If the total number of lines=order of the matrix than the solution is called optimal solution.

Step 4: If the solution is not optimal examine all the uncovered elements. Select the smallest element and subtract it from all the uncovered elements. Add this smallest element to every element that lies at the intersection of two lines. The remaining elements remain unchanged. Repeat steps 2, 3 and 4 until an optimal solution is obtained. MULTIPLE OPTIMAL SOLUTIONS: in the optimal matrix if we have performed an arbitrary selection of a single zero then it indicates that multiple optimal solutions exist. The other optimal solution can be obtained by changing the choice of arbitrary selection. UNBALANCED ASSIGNMENT PROBLEM: The Hungarian method of assignment requires that the number of columns and rows in the assignment matrix must be equal. When the given cost matrix is not a square matrix, then he problem is called unbalanced problem. In this case dummy row(s) or column(s) with zero cost is added to make it a square matrix. These cells are then treated the same way as the real cost cells and the Hungarian method is applied to obtain an optimal solution. MAXIMIZATION PROBLEM: Sometimes the assignment problem may deal with maximization of the objective function. The maximization problem has to be changed to minimization before the Hungarian method may be applied. This transformation may be done in either of the following two ways: a) Subtracting all the elements form the largest element of the matrix. b) Multiplying the matrix elements by -1. The Hungarian method can then be applied to this equivalent minimization problem to obtain the optimal solution. RESTRICTIONS ON ASSIGNMENTS: Sometimes there are restrictions that do not permit the assignment of a particular facility to a particular job. Such problems can be solved by assigning an infinite cost to the corresponding cell. Such a job will then be automatically excluded from further considerations.

Example 1: Solve the following problem:

10 9 8 11

7 11 9 7

6 10 12 7

9 7 7 14

Solution: Step 1: Row Reduction: Subtracting the smallest element of each row from every element of that row. 4 2 1 4 1 4 2 0 0 3 5 0 3 0 0 7

Column Reduction: Subtracting the smallest element of each column from every element of that column. 3 1 0 3 1 4 3 0 0 2 5 0 3 0 0 7 Step 2: 3 1 0 3 1 4 2 0 0 3 5 0 3 0 0 7

Step 3: Since the total number of lines=order of the matrix therefore optimal solution is: , , , Total cost= Rs. 6+7+8+7= Rs. 28.

Example 2: Five wagons A, B, C, D, E are required at stations I, II, II, IV, V. The mileages between various stations are given in the table below. How the wagons should be transported so as to minimize the total mileage covered. I II III IV V A 10 5 9 18 11 B 13 9 6 12 14 C 3 2 4 4 5 D 18 9 12 17 15 E 11 6 14 19 10 Solution: Step 1: Row Reduction: Subtracting the smallest element of each row from every element of that row. 5 7 1 9 5 0 3 0 0 0 4 0 2 3 8 13 6 2 8 13 6 8 3 6 4

Column Reduction: Subtracting the smallest element of each column from every element of that column. 4 0 4 11 3 6 3 0 4 5 0 0 2 0 0 8 0 3 6 3 4 0 8 11 1 Step 2: 4 6 0 8 4 0 3 0 0 0 4 0 2 3 8 11 4 0 6 11 3 5 0 3 1

Step 3: Here the total no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Step 4: Here the minimum uncovered element is 1. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 3 5 0 7 3 Repeating step 2: 3 5 0 7 3 0 3 1 0 0 4 0 3 3 8 10 3 0 5 10 2 4 0 2 0 0 3 1 0 0 4 0 3 3 8 10 3 0 5 10 2 4 0 2 0

Again the no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Now the minimum uncovered element is 3. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 0 2 0 4 0 0 3 4 0 0 4 0 6 3 8 7 0 0 2 7 2 4 3 2 0

Here we can see that the no. lines=the order of the matrix. Therefore the optimal solution is: A I, B III, C IV, D II, E V and the total mileage covered =10+ 6+ 4+ 9+ 10= 39.

Example 3: Four different jobs can be done on four different machines; the matrix below gives the cost in rupees of producing job I on machine j:

5 8 4 10

7 5 7 4

11 9 10 8

6 6 7 3

How should the jobs be assigned to various machines so that the total cost is minimized? Solution: Step 1: Row Reduction: Subtracting the smallest element of each row from every element of that row. 0 3 0 7 2 0 3 1 6 4 6 5 1 1 3 0

Column Reduction: Subtracting the smallest element of each column from every element of that column. 0 2 2 1 3 0 0 1 0 3 2 3 7 1 1 0 Step 2: 0 3 0 7 2 0 3 1 2 0 2 1 1 1 3 0

Step 3: Here the total no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Step 4: Here the minimum uncovered element is 1. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 0 4 0 8 Repeating step 2: 0 4 0 8 1 0 2 1 1 0 1 1 0 1 2 0 1 0 2 1 1 0 1 1 0 1 2 0

Again the no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Now the minimum uncovered element is 1. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 0 5 0 8 0 0 1 0 0 0 0 0 0 2 2 0

Here we can see that the no. lines=the order of the matrix. Therefore the optimal solution is: , , , and total cost= Rs. 5+5+10+3= Rs. 23 Also the zero in cell (1,1) was chosen arbitrarily which indicates that multiple optimal solution exists. The other solution can be obtained by changing the choice of arbitrary selection i.e.

0 5 0 8

0 0 1 0

0 0 0 0

0 2 2 0

In this case the optimal assignment is , , , and total cost= Rs. 6+5+4+8= Rs. 23. Note that changing the choice of arbitrary zero does not effect the optimal cost. Example 4: Solve: 90 35 125 45 75 85 95 110 75 55 90 95 80 65 105 115

Solution: Step 1: Row Reduction: Subtracting the smallest element of each row from every element of that row. 15 0 35 0 0 50 5 65 0 20 0 50 5 30 15 70

Column Reduction: Subtracting the smallest element of each column from every element of that column. 15 0 0 0 0 50 20 25 35 5 0 10 0 65 50 65

Step 2: 15 0 35 0 0 50 5 65 0 20 0 50 0 25 10 65

Step 3: Here the total no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Step 4: Here the minimum uncovered element is 5. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 20 0 35 0 Repeating step 2: 20 0 35 0 0 45 0 60 5 20 0 50 0 20 5 60 0 45 0 60 5 20 0 50 0 20 5 60

Again the no. of lines= 3 while the order of the matrix= 4 hence the solution is not optimal. Now the minimum uncovered element is 20. Subtracting it from all the uncovered elements and adding it to every element lying at the intersection of two lines we get 40 0 55 0 0 25 0 40 5 0 0 30 0 0 5 40

Here we can see that the no. lines=the order of the matrix. Therefore the optimal solution is:

and total cost= Rs. 75+65+90+45= Rs. 275

Also the zero in cell (1,2) was chosen arbitrarily which indicates that multiple optimal solution exists. The other solution can be obtained by changing the choice of arbitrary selection i.e. 40 0 55 0 0 25 0 40 5 0 0 30 0 0 5 40 , , , .

In this case the optimal assignment is

Example 5: A department head has four tasks to be performed with three subordinates who differ in efficiency. The estimates of time each subordinate will take to perform is given below in the matrix. How should he allocate the tasks one to each man so as to minimize the total manhours? I II III A 9 26 15 B 13 27 6 C 35 20 15 D 18 30 20 Solution: Since we do not have a square matrix, we add a dummy column whose entries are zero. I 9 13 35 18 II 26 27 20 30 III 15 6 15 20 IV 0 0 0 0

A B C D

Row Reduction: 9 13 35 18 Column Reduction: 0 4 26 9 6 7 0 10 9 0 9 14 0 0 0 0 26 27 20 30 15 6 15 20 0 0 0 0

Since the total number of lines=order of the matrix therefore optimal solution is: A I, B III, C II Minimum time= 9+ 20+ 6= 35 hours. Example 6: A company has five jobs A, B, C, D, E to be done on five machines I, II, III, IV, V. The following matrix shows the cost in Rs. of assigning a job to a machine. Assign the five jobs to the five machines to maximize the profit. I 5 2 3 6 7 II 11 4 12 14 9 III 10 6 5 4 8 IV 12 3 14 11 12 V 4 5 6 7 5

A B C D E

Solution: The maximization problem has to be changed to minimization before the Hungarian method may be applied. Subtracting all the elements form the largest element of the matrix we get

9 12 11 8 7 Row Reduction: 7 4 11 8 5 Column Reduction: 3 0 7 4 1 2 0 6 3 0 2 0 6 3 0

3 10 2 0 5

4 8 9 10 6

2 11 0 3 2

10 9 8 7 9

1 2 2 0 3

2 0 9 10 4

0 3 0 3 0

8 1 8 7 7

1 2 2 0 3 1 3 2 0 3 1 4 2 0 3

2 0 9 10 4 1 0 8 9 3 0 0 7 8 2

0 3 0 3 0 0 4 0 3 0 0 5 0 3 0

7 0 7 6 6 6 0 6 5 5 5 0 5 4 4

Now the no. lines=order of the matrix. Therefore the optimal assignment of jobs to the machines is A III, B V, C IV, D II, E I and maximum profit = Rs. 50.

Example 7: Four new machines , , , and are to be installed in a shop. There are five empty spaces. Because of limited space problem cannot be placed at C and cannot be placed at A. installation costs of machines to various places are given in the following table: A 4 7 9 B 6 4 6 3 C 10 9 7 D 5 5 6 2 E 6 4 2 3

Find the optimal assignment of machines to various places and the total cost. Solution: 0 3 7 0 0 3 7 0 2 0 4 1 0 2 0 4 1 0 6 7 5 0 6 7 5 0 1 1 4 0 0 1 1 4 0 0 2 0 0 1 0 2 0 0 1 0 A, B,

Now the no. lines=order of the matrix. Therefore the optimal solution is E, D . Total assignment cost = Rs. 12

UNSOLVED PROBLEMS
Problem 1: Five men are available to do five different jobs. Form the past records, the time (in 2 hours) that each man takes to do each job is given in the following table: I 2 6 4 4 5 II 9 8 6 2 3 III 2 7 5 7 9 IV 7 6 3 3 5 V 1 1 1 1 1

A B C D E

Find the assignment of men to jobs that will minimize the total time taken. Answer: A III, B V, C I, D IV, E V Optimal value=13 hours Problem 2: A company has four machines on which three jobs have to be done. Each job can be assigned to one and only one machine. The cost of each job on each machine is given below: P 18 8 10 Q 24 13 15 R 28 17 19 S 32 19 22

A B C

What are the job assignments which will minimize the cost? Answer: A P, B Q, C R, D S Optimal cost=50

Problem 3: A company has a team of four salesman and there are four places where the company wants to start its business. After taking in to account the capabilities of salesmen it estimates that the profit per day in rupees for each salesman at each place is as follows: I 16 14 15 13 II 10 11 15 12 III 14 15 13 14 IV 11 15 12 15

A B C D

Find the assignment of salesman to various places which will make maximum profit. Answer: A I, B III, C II, D IV Max. profit per day= Rs. 61 Problem 4: A company has taken the third floor of a multi-storied building for rent with a view to locate one of their zonal offices. There are five main rooms in this floor to be assigned to five managers. Each room has its own advantages and disadvantages. The rooms are all of different sizes and shapes. Each of five managers were asked to rank their room preferences amongst the rooms A, B, C, D and E. Their preferences were recorded in a table as indicated below: Manager B C D B D E A C A D E B B E D C A B D

Most of the managers did not list all five rooms since they were not satisfied with some of these rooms. Assuming that their preferences can be quantified by numbers, find out as to

which manager should be assigned to which room so that their total preference ranking is minimum. Answer: A ,B ,C ,D ,E Total minimum ranking= 1+ 2+ 1+ 1+ 2= 7 Problem 5: A marketing manager has 5 salesman and 5 districts. Considering the capabilities of the salesman the marketing manager estimates that the sale per month (in hundreds of rupees) for each salesman in each district would be as follows: I 32 40 41 22 29 II 38 24 27 38 33 III 40 28 33 41 40 IV 28 21 30 36 35 V 40 36 37 36 39

A B C D E

Find the assignment of salesman to districts that would result in the maximum sales. Answer: Multiple optimal solutions A II, B I, C V, D III, E A II, B V, C I, D III, E A II, B I, C V, D IV, E A II, B V, C I D IV, E Max. Profit= Rs. 191

IV IV III III

Problem 6: A fast food chain wants to build four stores. In the past the chain has used six different construction companies, and having been satisfied with each, has invited them to bid for each job. The final bids (in thousands of rupees) are shown in the following table: I II III IV V VI

A B C D

85.3 78.9 82.0 84.3

90 84.5 31.3 34.6

87.5 99.4 28.5 86.2

82.4 80.4 66.5 83.3

89.1 89.3 80.4 85.0

91.3 88.4 109.7 85.5

Since the fast-food chain wants to have each of the new stores ready as quickly as possible, it will allot at most one job to a construction company. What assignment will result in the minimum total cost? Answer: A IV, B I, C III, D II Minimum total cost= Rs. 2,24,400 Problem 7: A small garment making unit has five tailors stitching five different types of garments. All the five tailors are capable of stitching all the five types of garments. The output per day per tailor and the profit in Rs. for each type of garment are given below: GARMENTS II III 9 4 9 5 5 2 5 8 8 10 3 2

A B TAILORS C D E Profit(Rs.)/garment i) ii)

I 7 4 8 6 7 2

IV 8 7 9 10 9 3

V 6 8 8 10 9 4

Which type of garment should be assigned to which tailor in order to maximize the profit? If tailor D is absent and no other substitute tailor is available what should be the optimal assignment?

Answer: i) A I, B II, C IV, D V, E III Maximum profit= Rs. 128

ii) A II, B V, C IV, E III Maximum profit= Rs. 106 Problem 8: Six salesmen are to be allocated to six sales regions so that the cost of allocation of the job will be the minimum. Each salesman is capable of doing the jobs at different costs in each region. The cost matrix is given below: I II III IV V VI A 15 35 0 25 10 45 B 40 5 45 20 15 20 C 25 60 10 65 25 10 D 25 20 35 10 25 60 E 30 70 40 5 40 50 F 10 25 30 40 50 15 a) Find the allocation to give the minimum cost. What is the cost? b) Now suppose the table gives earning of each salesman at each region. How can you find an allocation so that the earning will be maximum? c) There are restrictions for commercial reasons that A cannot be posted to region V and E cannot be posted to region II. Write down the cost matrix suitably after imposing the restrictions. Find the optimal solution that minimizes the cost. Answer: A III, B II, C VI, D V, E IV, F I Minimum cost= Rs. 55 b) A I, B III, C IV, D VI, E II, F V or A VI, B I, C IV, D III, E II, F V Maximum cost= Rs. 305 c) A III, B II, C VI, D V, E IV, F I Minimum cost= Rs. 55 Problem 9: Assign 4 trucks I, II, III and IV to vacant spaces A, B, C, D, E and F so that the distance travelled is minimized. The matrix below shows the distance:

A B C D E F

I 4 8 4 7 6 6

II 7 2 9 5 3 8

III 3 5 6 4 5 7

IV 7 5 9 8 4 3

Answer: A III, B II, C I, F IV Minimum cost= Rs. 12 Problem 10: The captain of a cricket team has to allot five middle batting positions to five batsmen. The average runs scored by each batsman at these positions are as follows: Batting position II III IV 40 35 25 30 16 25 48 40 60 19 20 18 60 59 55

Batsman

A B C D E

I 40 42 50 20 58

V 50 27 50 25 53

a) Find the assignment of batsmen to positions which would give the maximum number of runs. b) If another batsman F with the following average runs in batting positions as given below is added to the team, should he be included in the team? If so, who will be replaced by him? Batting positions : I II III IV V Average runs : 45 52 38 50 49

Answer: a) A V, B I, C IV, D III, E II No. of runs= 232 b) A V, B I, C IV, E III, F II No. of runs= 263, batsman D will be replaced by F.

Você também pode gostar