The Assignment Problem - ICAI Knowledge Gateway€¦ ·  · 2014-07-10The Assignment Problem CA...

62
The Assignment Problem CA Final Paper 5 Advanced Management Accounting Chapter 12 Prof( Dr.) P.R.Vittal

Transcript of The Assignment Problem - ICAI Knowledge Gateway€¦ ·  · 2014-07-10The Assignment Problem CA...

The Assignment Problem

CA Final Paper 5 Advanced Management Accounting Chapter 12 Prof( Dr.) P.R.Vittal

Assignment

Consider the problem of assigning n jobs to n persons such that each job can be assigned to only one person and each person can be allotted only one job.

Suppose all the n persons are capable of doing any one the n jobs but the time taken by them to perform the jobs varies fro job to job.

The following table represents the times taken by the n persons to perform the n jobs.

Persons/Jobs

j1 j2 j3 ……. ….. …… jn

P1 t11 t12 t13 ……. …… …… t1n

P2 t21 t22 t23 …… …… ……. t2n

P3 t31 t32 t33 …… …… ……. t3n

….. ….. ….. ….. …… …… ……. …….

….. ….. ….. ….. …… …… ……. …….

….. ….. ….. ….. …… …… ……. …….

pn tn1 tn2 tn3 …… …… ……. tnn

Assignment

Algorithm to Solve an Assignment Problem

Step-1 Choose the least element in each row and subtract it from all the elements of that row.

Step-2 Choose the least element in each column and subtract it from all the elements of that column. Step-2 has to be performed from the table obtained in step-1.

Step-3 Test whether we can choose only one zero in each one row and in each column.

Step-4 Draw minimum number of lines covering all these zeros . These lines can be drawn horizontally and vertically.

Algorithm to Solve an Assignment Problem

Step-5 Now choose the least uncovered element; subtract it from all the uncovered elements, add it with the elements at the intersection of lines and leave the other elements unaltered. Thereby we create at least one zero in a new position.

Step-6 Now test whether we can choose only one zero in each row and in each column. If this is possible, we can obtain an optimal solution to the problem. If this is not possible then repeat the steps 4 and 5 until optimal solution is obtained.

Unbalanced Assignment Problem

In an assignment problem if the number of persons is less than the number of jobs or the number of jobs is less than the number of persons , the (C ij) matrix will not be a square matrix. Such an assignment problem is called an unbalanced assignment problem .

We have to convert this into a balanced assignment problem for finding an optimal solution . For this we have to introduce dummy persons or dummy jobs so that it becomes a balanced assignment problem .

But we have to take all the assignment costs in those rows or columns as zeros .

Thus we arrive at a balanced assignment problem.

Then we proceed to obtain an optimal solution by applying the algorithm mentioned earlier .

From the optimal solution obtained , we can also determine the persons who will not be assigned job(or jobs in case there are more persons than the jobs) or the job or jobs that will be left out unattended to (in case there are more jobs than persons).

Restricted Assignment Problem

In assignment problems we can also come across situation wherein no assignment can be made in some of the places. Such problems are called restricted assignment problem.

We want to avoid assignment in these places in our optimal solution. In order to avoid assignment in these places we take the assignment costs in these places as very large(untenable).These costs are denoted by ∞ so that there is no possibility of getting zero in these places till our final table.

Solving a Maximization Problem in Assignment

Step-I choose the largest element in each row and subtract all the other elements from it.

Step-II Choose the smallest element in each column and subtract it from all the elements of that column.

Rest of the steps are the same as in minimisation problem.

Examples

• 1.Four operators A,B,C,D are available to a manager who has to get jobs j1,j2,j3,j4 done by assigning one job to each operator. Given the times needed by different operators for different jobs in the matrix below :

j1 j2 j3 j4

A 12 10 10 8

B 14 12 15 11

C 6 10 16 4

D 8 10 9 7

Question

(i) How should the manager assign the jobs so that the total time needed for all the four jobs is minimum?

(ii) If job j2 is not to be assigned to operator B, what should be the assignment and how much additional time will be required?

Solution

4 2 2 0 3 1 4 0 2 6 12 0 1 3 2 0

3 1 0

2 2 0

1 5 10

2 0 0

0

0

0

0

Solution Continued

Operator Job Time Taken (Hours )

A J3 10 B J2 12 C J4 4 D J1 8

34

We are Able to Choose one zero in each Row and in each Column . Therefore the Optimal Assignment is

Therefore the total Minimum time taken to Finish all the Four Jobs is 34 Minutes.

(ii)Consider the following table:

j1 j2 j3 j4

O1 12 10 10 8 O2 14 ? 15 11

O3 6 10 16 4

O4 8 10 9 7

Solution Continued

4 2 2 0 3 ? 4 0 2 6 12 0 1 3 2 0

If the Assignment of j2 to o2 is to be Avoided Allot ∞ at the Place (O2,j2) and Solve the Assignment Problem

3 0 0 0 2 ? 2 0 1 4 10 0 0 1 0 0

Solution Continued

3 0 1 1 1

3 9 0 0 1 1

Solution Continued

0

0

0

0

Therefore the Optimal Assignment Table is

• Operator Job Time taken • O1 j2 10 • O2 j4 11 • O3 j1 6 • O4 j3 9 • --------- • 36 • Additional total time required = 36-34 = 2 units of

time

Example-2

• The secretary of a school is taking bids on the city’s four school bus routes. Four companies have made the bids as detailed in the following table :

Bids Route - 1 Route - 2 Route - 3 Route - 4

company 1

Rs4000 Rs5000 …… …….

company 2

…….. Rs4000 ……. Rs4000

company 3

Rs3000 …….. Rs2000 …….

company 4

……. …….. Rs4000 Rs5000

Example 2 Continued

Suppose Each Bidder can be Assigned Only One Route. Use

the Assignment Model to Minimize the School’s Cost of

Running the Four Bus Routes.

Solution:

0

0 1000 8 0 0 0 1000 0 8 8 0 1000

0 1000 0 0 0 1000 0

0 1000

1000 0

0 0

0

0

0

0

The Optimal Assignment is

• Company Route Bids • 1→ 1 4000 • 2→ 2 4000 • 3→ 3 2000 • 4→ 4 5000 • Total minimum amount for running 4 bus

routes is Rs 15,000.

Example-3

• A city corporation has decided to carry out road repairs on four main arteries of the city.

• The Government has agreed to make special grant of Rs50 lakhs towards the cost with a condition that the repairs must be done at the lowest cost and quickest time.

• If the conditions warrant, then a supplementary total grant will also be considered favourably.

• The corporation has floated tenders and 5 contractors have sent in their bids.

• In order to expedite work, one road will be awarded to only one contractor.

Cost of Repair (Rs lakhs)

Road Contractors R 1 R 2 R 3 R 4

C 1 9 14 19 15 C 2 7 17 20 19 C 3 9 18 21 18 C 4 10 12 18 19 C 5 10 15 21 16

Example 3 Continued

(i) Find the best way of assigning the repair work to the contractors and the costs.

(ii) If it is necessary to seek supplementary grants, then what should be the amount sought?

(iii) Which of the five contractors will be unsuccessfull in his bid?

Solution

Step-1 This is unbalanced assignment problem To convert this into a balanced assignment problem, introduce one dummy road R5 with all costs in that column zero.

R 1 R 2 R 3 R 4 R 5

C 1 9 14 19 15 0 C 2 7 17 20 19 0 C 3 9 18 21 18 0 C 4 10 12 18 19 0 C 5 10 15 21 16 0

Step1 Same as Given in the Above Table

2 2 1 0 0 0 5 2 4 0 2 6 3 3 0 3 0 0 4 0 3 3 3 1 0

Step2 Table as Given Below :

Optimal Assignment is not Possible here. Draw Minimum number of Lines Covering all Zeros :

2 1 0 0 0 0 4 1 3 0 2 5 2 2 0 4 0 0 4 1 4 3 3 1 1 Optimal assignment

Is not possible

here. Again draw

Lines covering

Zeros :

3 1 0 1 3 0 2

2 4 1 1 0 5 0 4 2 4 2 2 1

0

0

0

0

0

The Optimal Assignment is

• Contractors Route Costs • C1→ R3 19 • C2→ R1 7 • C3→ R5 0 • C4→ R2 12 • C5→ R4 16 • ------

------ • Total minimum cost 54

Solution

(ii) It is necessary to take supplementary grants. The amount to be sought =54-50=Rs 4 lakhs

(iii) To the contractor C3, we have assigned route R5 which is dummy. Contractor C3 will be unsuccessfull in his bid.

Example-4

• A well done company has taken the third floor of a multistoried 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. • Some have windows, some are closer to the washrooms or to

the canteen or secretarial pool. • The rooms are of all different sizes and shapes. • Each of the five managers were asked to grant their room

preference amongst the rooms 301,302,303,304 and 305. • Their preferences were recorded in a table as indicated below:

Manager

M 1 M 2 M 3 M 4 M 5

302 302 303 302 301 303 304 301 305 302 304 305 304 304 304

301 305 303 302

Example Continued

Most of the managers did not list all the rooms since they were not satisfied with some of these rooms and they have left these from the list.

Assuming that their preferences can be quantified by their numbers, find out as to which manager should be assigned to which room so that their total preference ranking is a minimum.

Solution :

• Here we have used to find the optimal solution to the problem by making assignment with minimum total ranking. First allot ranks to the rooms according to their preferences :

Table-I M1 M2 M3 M4 M5

301 ∞ 4 2 ∞ 1

302 1 1 5 1 2

303 2 ∞ 1 4 ∞

304 3 2 3 3 3

305 ∞ 3 4 2 ∞

Table-II

301 ∞ 3 1 ∞ 0

302 0 0 4 0 1

303 1 ∞ 0 3 ∞

304 1 0 1 1 1

305 ∞ 1 2 0 ∞

Table-III

301 ∞ 3 1 ∞

302 0 4 0 1

303 1 ∞ 1 ∞

304 1 1 1 1

305 ∞ 1 2 ∞

0

0

0

0

0

The Optimal Assignment is

• Rooms Manager Rank • 301→ M5 1 • 302→ M1 1 • 303→ M2 1 • 304→ M3 2 • 305→ M4 2 • ----------

-- • Total minimum Rank 7

Example-5 Five different machines can do any of the five required jobs , with different profits resulting from each assignment as shown below :

Machines

Job A B C D E

1 30 37 40 28 40

2 40 24 27 21 36

3 40 32 33 30 35

4 25 38 40 36 36

5 29 62 41 34 39

Example 5 Continued

• Find out maximum profit possible through optimal assignment

Solution :Choose the Largest in Each row and Subtract All the Elements from it :

10 3 0 12 0 0 16 13 19 4 0 8 7 10 5 15 2 0 4 4 33 0 21 28 23

Choose the Least Element in Each Column and Subtract it from Each Element of that Column :

10 3 0 8 0 0 16 13 15 4 0 8 7 6 5 15 2 0 0 4 33 0 21 24 23

14 3 8 0 0 12 9 11

4 3 2 1 19 2 0 4

37 21 22 23

0

0

0

0

0

The Optimal Assignment is

Job Machines Profit 1 C 40

2 E 36 3 A 40 4 D 36 5 B 62 Total maximum Profit is 214

Optimal Solution

Example-6

• Alpha corporation has four plants each of which can manufacture any one of four products .

• Production costs differ from one plant to another as do sales revenue.

• Given the revenue and cost data below, obtain which product each plant should produce to maximize profit :

Example 6 Continued

Sales revenue (Rs.’ooo)

product

plant 1 2 3 4

A 50 68 49 62

B 60 70 51 74

C 55 67 53 70

D 58 65 54 69

Example 6 Continued

Production Costs (Rs’000)

product

Plant 1 2 3 4

A 49 60 45 61

B 55 63 45 69

C 52 62 49 58

D 55 64 48 66

Profit Matrix

Profit = Sale Price – Production Cost Subtracting the Second Matrix from the First we get the Profit Matrix

product plant 1 2 3 4 A 1 8 4 B 5 7 6 5 C 3 5 4 D 3 1 6 3

1

12

Choose the Highest in each Row and Subtract All the Elements in that Row from it :

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

Subtract the Least in Each Column from All the Elements of that Column

5 4 7 0 1 2

7 7 8 1 5 3

0

0

0

0

The Optimal Solution is

plant product Profit(1000)

A 2 8

B 1 5

C 4 12

D 3 6

Total Maximum Profit is Rs31000

Profit 31

Example-7

• Imagine yourself to be the Executive Director of a 5-star Hotel which has four banquet halls that can be used for all functions including weddings .

• The halls were all about the same size and the facilities in each hall differed.

• During a heavy marriage season, 4 parties approached you to reserve a hall for the marriage to be celebrated on the same day.

• These marriage parties were told that the first choice among these four halls would costs Rs10,000 for the day.

• They were also required to indicate the second, third and fourth preferences and the price that would be willing to pay.

• Marriage party A &D indicated that they won’t be interested in Halls 3 &4. Other particulars are given in the following table :

Example-7 cont..

Revenue

Hall Marriage party

1 2 3 4

A 10,000 9000 …. ….. B 8000 10000 8000 5000 C 7000 10000 6000 8000 D 10000 8000 ….. ……

Where … indicates that the party does not want the hall. Decide on the allocation that will maximise the revenue to your hotel.

Solution: This is the Maximisation Problem Since Executive Director is Interested in Maximising the Revenue. A 10000 9000

B 8000 10000 8000 5000

C 7000 10000 6000 8000

D 10000 8000

A 0 1000

B 2000 0 2000 5000

C 3000 0 4000 2000

D 0 2000

A 0 1000

B 2000 0 0 3000

C 3000 0 2000 0

D 0 2000

A 0

B 3000 0 3000

C 4000 0 2000

D 1000 0 0

0 0

0

The Optimal Solution is

Marriage party Hall Revenue A 2 9000 B 3 8000 C 4 8000 D 1 10000

Total maximum revenue 35,000

Example-7

• A company has four territories open and four salesmen available for assignment. The territories are not equally rich in their sales potential; it is estimated that a typical sales man operating in each territory would bring in the following annual sales:

• Territory Annual sales (Rs) • I 60,000 • II 50,000 • III 40,000 • IV 30,000

The Four Salesmen are also Considered to Differ in their Ability ; it is Estimated that Working under the same Conditions, their Yearly sales would be Proportionately as follows :

Salesman: A B C D

Proportion : 7 5 5 4

If the criterion is maximum expected sales, find the assignment of salesmen to the territories that results in optimum expected sales.

Solution: (Sales in 10,000Rs)

6 5 4 3 salesman I II III IV

Proportion 7 A 42/21 35/21 28/21 21/21

B 30/21 25/21 20/21 15/21

C 30/21 25/21 20/21 15/21

D 24/21 20/21 16/21 12/21

5

5

4

Solution

Assignment is Unaltered if Each Value in the Table is Multiplied by a Constant Multiply all the Elements by 21

Table I II III IV

A 42 35 28 21

B 30 25 20 15

C 30 25 20 15

D 24 20 16 12

Step-I 0 7 14 21

0 5 10 15

0 5 10 15

0 4 8 12

Step-II 0 2 6 9

0 1 2 3

0 1 2 3

0 0 0 0

Step-III 0 1 5 8

0 0 1 2

0 1 1 2

0 0 0 0

Step-IV 1 4 7

0 0 1

0 0 1

1 1 0

0 0

0 0

The Optimal Solution is

Maximum Expected Sales = 99x10000/21 =47143 Note that there is Also Another Optimal Assignment A→I,B→II,C→III,D→IV

salesman Territory Sales A I 42 B II 25 C III 20 D IV 12

99

Exercises • 1 A company has 5 machines and 5 jobs to

be done. The return in Rs of assigning ith machine to jth job , i, j=1,2,3,4,5 is as follows

• Assign the 5 jobs to the 5 machines so as to maximise the total profit.

Job

1 2 3 4 5

A 5 11 10 12 4

Machine B 2 4 6 3 5

C 3 12 5 14 6

D 6 14 4 11 7

E 7 9 8 12 5

Ans : A-3,B-5,C-4,D-2,E-1 Total Profit : 50 • 2.Five lathes are to be alloted to five operators (one for

each).The following table gives weekly output figures (in pieces) :

• Profit per piece is Rs25. Find the maximum profit per week Weekly output in lathe

operator L1 L2 L3 L4 L5

P 20 22 27 32 36

Q 19 23 29 34 40

R 23 28 35 39 34

S 21 24 31 37 42

T 24 28 31 36 41

Ans : P-L1,Q-L5,R-L3,S-L4,T-L2 Maximum Profit = 160x25=Rs4000

• 3. Solve the following assignment problem: The data given in the table refer to production in certain units:

operators

machines

A B C D

1 10 5 7 8

2 11 4 9 10

3 8 4 9 7

4 7 5 6 4

5 8 9 7 5

No. of production units : 38

Lesson Summary

Thank you