0% found this document useful (0 votes)
43 views23 pages

Linear Programming: Assignment Problem

The document discusses linear programming assignment problems. It defines an assignment problem as seeking to minimize the total cost of assigning m workers to m jobs given the cost of each worker performing each job. Assignment problems can be modeled as transportation problems and solved as linear programs. The document provides an example of setting up an assignment problem as a network with costs on each edge and solving it using the Hungarian method in 5 steps to find the lowest-cost assignment.

Uploaded by

Fumante Vortices
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views23 pages

Linear Programming: Assignment Problem

The document discusses linear programming assignment problems. It defines an assignment problem as seeking to minimize the total cost of assigning m workers to m jobs given the cost of each worker performing each job. Assignment problems can be modeled as transportation problems and solved as linear programs. The document provides an example of setting up an assignment problem as a network with costs on each edge and solving it using the Hungarian method in 5 steps to find the lowest-cost assignment.

Uploaded by

Fumante Vortices
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Linear Programming: Assignment Problem

Slide 1 of 27

Assignment Problem

An assignment problem seeks to minimize the


total cost assignment of m workers to m jobs,
given that the cost of worker i performing job j is
cij.
It assumes all workers are assigned and each job
is performed.
An assignment problem is a special case of a
transportation problem in which all supplies and
all demands are equal to 1; hence assignment
problems may be solved as linear programs.
The network representation of an assignment
problem with three workers and three jobs is
shown on the next slide.
Slide 2 of 27

Assignment Problem

Network Representation
11

c11
c12

11

c13
c21
22

c22

22

c23
c32

c31
33

WORKERS

c33

33

JOBS
Slide 3 of 27

Say you have three workers: Jim, Steve & Allan.


You need to have them clean the bathroom,
sweep the floors & wash the windows. Whats
the best way to assign the jobs? First we need a
matrix of the time it takes for each to do each
job.
Jim
Steve
Allan
Clean
bathroom

Sweep
floors

Wash
windows

Then the Hungarian algorithm, when applied to


the above table would give us the shortest time
it can be done in: Jim cleans the bathroom, Steve
sweeps the floors and Allan washes the windows.
Slide 4 of 27

Hungarian Method

The Hungarian method solves minimization


assignment problems with m workers and m
jobs.

Slide 5 of 27

Example 1: AP
A contractor pays his subcontractors a fixed fee plus mileage for
work performed. On a given day the contractor is faced with
three electrical jobs associated with various projects. Given
below are the distances between the subcontractors and the
projects.
Project
A
B
C
Westside
50 36 16
Subcontractors Federated
28 30 18
Goliath
35 32 20
Universal
25 25 14
How should the contractors be assigned to minimize total costs?
Note: There are four subcontractors and three projects. We
create a dummy project Dum, which will be assigned to one
subcontractor (i.e. that subcontractor will remain idle)

Slide 6 of 27

Example 1: AP

Initial Tableau Setup


Since the Hungarian algorithm requires that there be
the same number of rows as columns, add a Dummy
column so that the first tableau is (the smallest
elements in each row are marked red):

Westside
Federated
Goliath 35
Universal

50
32
25

A
36
28
20
25

B
16
30

Dummy
0
18
0
0

14

Slide 7 of 27

Example 1: AP

Step 1: Subtract minimum number in each row


from all numbers in that row. Since each row has
a zero, we simply generate the original matrix
(the smallest elements in each column are
marked red). This yields:
A

Westside
50 36 16
Federated
28 30 18
Goliath
35 32 20
Universal
25 25 14

Dummy
0
0
0
0

Slide 8 of 27

Example 1: AP

Step 2: Subtract the minimum number in each


column from all numbers in the column. For A it
is 25, for B it is 25, for C it is 14, for Dummy it is
0. This yields:

Westside
Federated
Goliath
Universal

A
25
3
10
0

B
11
5
7
0

C Dummy
2
0
4
0
6
0
0
0

Slide 9 of 27

Example 1: AP

Step 3: Draw the minimum number of lines to cover all


zeroes (called minimum cover). Although one can
"eyeball" this minimum, use the following algorithm. If a
"remaining" row has only one zero, draw a line through the
column. If a remaining column has only one zero in it,
draw a line through the row. Since the number of lines that
cover all zeros is 2 < 4 (# of rows), the current solution is
not optimal.
A
B
C
Dummy
Westside
25
11
2
Federated
3
5
4
Goliath
10
7
6
Universal
0
0
0

0
0
0
0

Step 4: The minimum uncovered number is 2 (circled).


Slide 10 of

Example 1: AP

Step 5: Subtract 2 from uncovered numbers;


add 2 to all numbers at line intersections; leave
all other numbers intact. This gives:

Westside
Federated
Goliath
Universal

A
B
C Dummy
23
9
0
0
1
3
2
0
8
5
4
0
0
0
0
2

Slide 11 of

Example 1: AP

Step 3: Draw the minimum number of lines to


cover all zeroes. Since 3 (# of lines) < 4 (# of
rows), the current solution is not optimal.
A
B
C Dummy
Westside
23
9
0
0
Federated
1
3
2
0
Goliath
8
5
4
0
Universal
0
0
0
2

Step 4: The minimum uncovered number is 1


(circled).

Slide 12 of

Example 1: AP

Step 5: Subtract 1 from uncovered numbers.


Add 1 to numbers at intersections. Leave other
numbers intact. This gives:
A
Westside
Federated
Goliath
Universal

B
23
0
7
0

C
9
2
4
0

Dummy
0
1
1
0
3
0
0
3

Slide 13 of

Example 1: AP
Find the minimum cover:
A
Westside
Federated
Goliath
Universal

B
23
0
7
0

C
9
2
4
0

Dummy
0
1
1
0
3
0
0 3

Step 4: The minimum number of lines to cover


all 0's is four. Thus, the current solution is
optimal (minimum cost) assignment.
Slide 14 of

Example 1: AP
The optimal assignment occurs at locations of
zeros such that there is exactly one zero in each
row and each column:
A
Westside
Federated
Goliath
Universal

B
23
0
7
0

C
9
2
4
0

Dummy
0
1
1
0
3
0
0 3

Slide 15 of

Example 1: AP
The optimal assignment is (go back to the original
table for the distances):
Subcontractor Project Distance
Westside
C
16
Federated
A
28
Universal
B
25
Goliath
(unassigned)
Total Distance = 69 miles

Slide 16 of

Hungarian Method

Steps:

Slide 17 of

Example 2

A building firm possesses four cranes each of


which has a distance (km) from four different
construction sites as shown in the table:
Sites-----

Construction

Crane 1
s

90

75

75

80

35

85

55

65

125

95

90

105

45

110

95

115

Place the cranes (one for each construction sites)


in such a way that the overall distance required
for the transfer is as small as possible.

Slide 18 of

Solution:

The cost matrix is


Construction

Sites-----

Sites-----

Construction

Crane 1
s

Crane 1
s

90

75

75

80

15

35

85

55

65

50

20

30

125

95

90

105

35

15

45

110

95

115

65

50

70

Construction

Sites-----

Cranes

15

50

20

25

35

10

65

50

65

Slide 19 of

Sites-----

Construction

Crane 1
s

35

30

55

10

Sites-----

45

30

45

Crane 1
s

40

25

55

40

30

40

Construction

Solution:
Crane1

- Constuction site4, Crane2 - Constuction site3, Crane3 - Constuction site2,


Crane4 - Constuction site1 ( => overall distance 275 km)
OR
Crane1 - Constuction site2, Crane2 - Constuction site4, Crane3 - Constuction site4,
Crane4 - Constuction site1 ( => overall distance 275 km)

Slide 20 of

Example 1: AP via LP

The solver formulation is:

Slide 21 of

Example 1: AP via LP

The solver solution is:


The Assignment Problem

Contractor
West Side
Federated
Goliath
Universal

Distances From
Contractors to Projects at:
A
B
C
50
36
16
28
30
18
35
32
20
25
25
14

Dummy
0
0
0
0

Contractor
West Side
Federated
Goliath
Universal
Assigned
Capacity

Assignment of Contractors
to Projects at:
A
B
C
0
0
1
1
0
0
0
0
0
0
1
0
1
1
1
1
1
1

Dummy
0
0
1
0
1
1

Total Distance:

Assigned Available
1
1
1
1
1
1
1
1

69

Slide 22 of

The End of Chapter 2C

Slide 23 of

You might also like