28
Assignment Problems

Ch-4 Assignment Problems

Embed Size (px)

DESCRIPTION

ASSGNMENT

Citation preview

Assignment Problems

The Assignment Problem

• In many business situations, management needs to assign - personnel to jobs, - jobs to machines, - machines to job locations, or - salespersons to territories.

• Consider the situation of assigning n jobs to n machines.

• When a job i (=1,2,....,n) is assigned to machine j (=1,2, .....n) that incurs a cost Cij.

• The objective is to assign the jobs to machines at the least possible total cost.

The Assignment Problem

• This situation is a special case of the Transportation Model And it is known as the assignment problem.

• Here, jobs represent “sources” and machines represent “destinations.”

• The supply available at each source is 1 unit And demand at each destination is 1 unit.

4

Let m be the number of jobs as well as the operators, and tij be the processing time of the job i if it is assigned to the operator j. Here the objective is to assign the jobs to the operators such that the total processing time is minimized.

Operators

Job

1 2 … j … m1 t11 t12 t1j t1m

2.i ti1 tij tim

.m tm1 tm2 tmj tmm

General format of assignment problem

5

• Examples of assignment problem

Row entity Column entity Cell entity

jobs operators Processing time

Programmer program Processing time

operators machine Processing time

Drivers Routes Travel time

Teachers Subjects Students pass percentage

The Assignment Problem• The assignment problem can be represented by

nxn or n2 matrix which constitutes n! ways of making assignments.

• One can find optimal solution by enumerating all possible ways and evaluating value of cost for each way.

• This process is extremely laborious even for small number like 10.

• The value of 10! is 3628800. So there is need of simpler computational technique.

The Assignment Problem

The assignment model can be expressed mathematically as follows:Xij= 0, if the job j is not assigned to machine i

1, if the job j is assigned to machine i

Comparison with Transportation Model

Comparison with Transportation Model

• Here m = n• Facilities represents the Sources• Jobs represents the Destinations• Supply available at each source is 1 i.e. ai =1, for all i.

• Demand at each destination is 1 i.e. bj = 1, for all j.

• The cost of transporting (assigning) facility i to job j is Cij • The assignment model can be expressed mathematically as follows:

Xij= 0, if the job j is not assigned to machine i• 1, if the job j is assigned to machine i• Here number of constraints is 2n.• The number of allocations at optimal solution is n.

The Assignment Problem

11

Assignment problem as a zero-one ( Binary) programming problem .

• Min Z= c11x11++cijXij+.+cmmXmm =

• Subject to x11+…………...+x1m =1 x21+…………...+x2m =1 …….. xm1+…………...+xmm =1 x11+…………...+xm1 =1 x12+…………...+xm2 =1 ……………….. x1m+…………...+xmm =1 xij.=0 or 1 for i=1,2….m and j=1,2…..m.

mjforX

miforX

XCZMin

m

iij

m

jij

m

i

m

jijij

,....11

,....11

1

1

1 1

12

Types of assignment problems

• As in transportation problems assignment problems also can be balanced ( with equal number of rows and columns) or unbalanced.

• When it is unbalanced the necessary number of row/s or column/s are added to balance it. That is to make a square matrix.

• The values of the cell entries of the dummy rows or columns will be made equal to zero.

Theorems Associated with Assignment Problem

In an assignment problem, if we add or subtract a constant to every element of row ( or column) in the cost matrix, then an assignment which minimizes the total cost on one matrix also minimizes the total cost on the other matrix.

If all Cij ≥ 0 and we can find out a set of Xij = xij such that

m

i

m

jijijXCZ

1 1

0

Then the solution is optimal.

14

Example : Assign the 5 operators to the 5 jobs such that the total processing time is minimized.

Operator job

1 2 3 4 5

1 10 12 15 12 8

2 7 16 14 14 11

3 13 14 7 9 9

4 12 10 11 13 10

5 8 13 15 11 15

15

Hungarian method

• Consists of two phases.• First phase: row reductions and column

reductions are carried out.• Second phase :the solution is optimized in

iterative basis.

16

Phase 1: Row and column reductions

• Step 0: Consider the given cost matrix• Step 1: Subtract the minimum value of each row

from the entries of that row, to obtain the next matrix.

• Step 2: Subtract the minimum value of each column from the entries of that column , to obtain the next matrix.

• The matrix obtained after this step is initial feasible solution and there will be at least one zero in each row and column.

• Treat the resulting matrix as the input for phase 2.

Phase 1: Row and column reductions

• Step 3 : Scan each row. If there is only one zero, Put “□” mark and put “х” mark to all zeros in the corresponding column. Further assignment in that column cannot be done.

• Examine each column. If there is only one zero unmarked, put “□” and put “х” mark to all zero in the corresponding row.

• After this, we will reach a condition when there is no unmarked zero and number of assignments is equal to the number of rows or column. So, the optimal solution is reached.

18

Operator job

1 2 3 4 5

1 10 12 15 12 8

2 7 16 14 14 11

3 13 14 7 9 9

4 12 10 11 13 10

5 8 13 15 11 15

Example : Assign the 5 operators to the 5 jobs such that the total processing time is minimized.

19

Operator job

1 2 3 4 5

1 2 4 7 4 0

2 0 9 7 7 4

3 6 7 0 2 2

4 2 0 1 3 0

5 0 5 7 3 7

Example : Assign the 5 operators to the 5 jobs such that the total processing time is minimized.

20

Operator job

1 2 3 4 5

1 2 4 7 2 0

2 0 9 7 5 4

3 6 7 0 0 2

4 2 0 1 1 0

5 0 5 7 1 7

Example : Assign the 5 operators to the 5 jobs such that the total processing time is minimized.

21

Phase 2: Optimization• Step3: Draw a minimum number of lines to cover all the

zeros of the matrix.• Procedure for drawing the minimum number of lines:• 3 Row scanning 3.1 Mark all rows that do not have assignment.3.2 If marked row has zero, then mark the corresponding

column3.3 If the marked column has assignment, then mark the

corresponding row. 3.4 Repeat step 3.2 and 3.3 till no marking is possible.3.5 Draw lines through marked column and unmarked rows.

22

• Step 4: check whether the number of squares marked is equal to the number of rows/columns of the matrix.

• If yes go to step 7. Otherwise go to step 5.• Step 5: Identify the minimum value out of all cells which

are not covered by any line, say ‘x’. Obtain the next matrix by the following steps.

5.1 Copy the entries covered by the lines ,but not on the intersection points.

5.2 add x to the intersection points 5.3 subtract x from the undeleted cell values/ not covered

by lines.Step 6: go to step 3.Step 7: optimal solution is obtained as marked by the

squares

Unbalanced Assignment Problem• A manufacturer of complex electronic equipment has just received a sizable

contract and plans to subcontract part of the job. He has solicited bids for 6 subcontracts from 3 firms. Each job is sufficiently large and any firm can take only one job. The table below shows the bids as well the cost estimates (in lakhs of rupees) for doing the job internally. Not more than three jobs can be performed internally.

JobFirm

1 2 3 4 5 6

1 44 67 41 53 48 64

2 46 69 40 45 45 68

3 43 73 37 51 44 62

Internal 50 65 35 50 46 63

Find the optimal assignment that will result in minimum total cost.

Maximization Problem

• A company has a team of four salesmen and there are four districts where the company wants to start its business. After taking into account the capabilities of salesmen and nature of districts, the company estimates that the profit per day in rupees for each salesman in each district is as below:

DistrictsSalesman

1 2 3 4

A 16 10 14 11

B 14 11 15 15

C 15 15 13 12

D 13 12 14 15

Find the assignment of salesmen to various districts which will yield maximum profit.

Restrictions on Assignments

• Four new machines M1, M2, M3 and M4 are to be installed in a machine shop. There are five vacant places A,B,C, D and E available. Because of limited space, machine M2 cannot be placed at C and M3 cannot be placed at A. The cost of locating machines is shown in the table. Find the optimal assignment schedule.

PlaceMachine

A B C D E

M1 4 6 10 5 6

M2 7 4 ---- 5 4

M3 ---- 6 9 6 2

M4 9 3 7 2 3

Additional Problem

• 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 (Rs) for each type of garment are given below:

Tailors Garments

1 2 3 4 5

A 7 9 4 8 6

B 4 9 5 7 8

C 8 5 2 9 8

D 6 5 8 10 10

E 7 8 10 9 9

Profit 2 3 2 3 4

The Traveling Salesman Problem• In the traveling salesman problem, there are m locations

(or nodes) • And unit costs (Cij) are associated with traveling

between locations i and j.• The goal is to find the cycle that minimizes the total

(traveling) distance required to visit all locations (nodes) without visiting any location twice.

• The Traveling salesman begins its journey from his/her home city And visits other cities (in no particular order) before returning home city.

• The nature of the problem is similar to assignment problem but with additional constraint that no city is to be visited twice before the tour of all cities is completed.

Example• A salesman wants to visit cities A, B, C, and D. he does not want

to visit ant city twice before completing the tour of all the cities and wishes to return to his home city, starting station. Cost of going from one city to another city is given in the table. Find the least cost route.

To City

From city

A B C D

A 0 30 80 50

B 40 0 140 30

C 40 50 0 20

D 70 80 130 0