The Assignment Problem: Math 20 Linear Algebra and Multivariable Calculus October 13, 2004
The Assignment Problem: Math 20 Linear Algebra and Multivariable Calculus October 13, 2004
Math 20
Linear Algebra and Multivariable
Calculus
October 13, 2004
Three air
conditioners need to
be installed in the
same week by three
different companies
Bids for each job are
solicited from each
company
To which company
should each job be
assigned?
The Problem
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave Solution
There are only 6
possible
assignments of
companies to jobs
Check them and
compare
Nave SolutionGuess #1
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionGuess #2
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionGuess #3
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionGuess #4
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionGuess #5
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionGuess #6
Bldg1 Bldg2 Bldg3
A 53
B 47
C 60
96
87
92
37
41
36
Nave SolutionCompletion
1
A 53
96
37
B 47
87
C 60
A 53
96
37
41
B 47
87
92
36
C 60
A 53
96
37
B 47
87
C 60
92
A 53
96
37
41
B 47
87
41
92
36
C 60
92
36
A 53
96
37
A 53
96
37
41
B 47
87
41
B 47
87
41
36
C 60
92
36
C 60
92
36
Disadvantages of Nave
Solution
How does the time-
6000
5000
4000
n
n2
en
n!
3000
2000
1000
0
0
10
to-solution vary
with problem size?
Answer: O(n!)
Rates of Growth
n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
log(n)
0.00000
0.30103
0.47712
0.60206
0.69897
0.77815
0.84510
0.90309
0.95424
1.00000
1.04139
1.07918
1.11394
1.14613
1.17609
n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
n2
1
4
9
16
25
36
49
64
81
100
121
144
169
196
225
en
2.7
7.4
20.1
54.6
148.4
403.4
1096.6
2981.0
8103.1
22026.5
59874.1
162754.8
442413.4
1202604.3
3269017.4
n!
1
2
6
24
120
720
5040
40320
362880
3628800
39916800
479001600
6227020800
8.7178E+10
1.3077E+12
Mathematical Modeling of
the Problem
Given a Cost Matrix C which lists for each
c total =
i, j=1
ij
x ij
entries
An possible
assignment of
zeroes, one in each
row and column
In this case the
minimal cost is
apparently zero!
0 3 0
0
0
10
8 0 0
QuickTime and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
Critical Observation
Let C be a given cost
Critical Observation
Same is true of
columns
So: we can subtract
minimum entry
QuickTime and a
from each row and
TIFF (Uncompressed) decompressor
are needed to see this picture.
column to insure
nonnegative entries
96 37
87 41a
47
60
92 36
16
13 0
59 0 10
6 46 0a 0 0 0
24
10 0
56 0 18
10
13 0
0
0
0
18
10 0
10
13 0
0
0
0
18
10 0
10
13 0
0
0
0
18
10 0
10
13 0
0
0
0
18
10 0
10
13 0
0
0
0
18
? 10 0
0 3 10
0
0
0
8 0 10
in this matrix
Still, we can create new
zeroes by subtracting
the smallest entry from
some rows
Now we can preserve
nonnegativity by adding
that entry to columns
which have negative
entries
0 3 0
0
0
10
8 0 0
Solutions
0 3 0 0 3 0
0
0
10
0
0
10
8 0 0 8 0 0
Nave SolutionCompletion
1
A 53
96
37
B 47
87
C 60
A 53
96
37
41
B 47
87
92
36
C 60
A 53
96
37
B 47
87
C 60
92
A 53
96
37
41
B 47
87
41
92
36
C 60
92
36
A 53
96
37
A 53
96
37
41
B 47
87
41
B 47
87
41
36
C 60
92
36
C 60
92
36
2.
QuickTime and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
10
13 0
0
0
0
18
10 0
10
13 0
0
0
0
18
10 0
Otherwise,
determine the
smallest entry not
covered by any line.
Subtract this entry
from all uncovered
entries
Add it to all doublecovered entries
Return to Step 3.
10
00 331310
00
0
0
0
0
0
10
0
0
18
88 331010
00
0 3 0
0
0
10
8 3 0
0 3 0
0
0
10
8 3 0
0 3 0
0
0
10
8 3 0
0 3 0
0
0
10
8 3 0
Solutions
0 3 0 0 3 0
0
0
10
0
0
10
8 0 0 8 0 0
Example 2
Customer
7.5
7.5
3.5
8.5
5.5
6.5
12.5 9.5
9.0
10.5
4.5
11.0 9.5
11.5
3.5 8.5 5.5 6.5 a 35
12.5
4.5 10 9.5 11.5 45
75
85
95
10
75 80
55 65
90 105
95 115
35
125
45
75
85
95
10
75 80 15
0 0 5 15
0 0 0
55 65 0 50 20 30 0 50 20 25
a
a
90 105 35
5 0 15 25
5 0 10
95 115 0 65 50 70 0 65 50 65
15
0 0 0
0
50
20
25
25
5 0 10
0 65 50 65
Can do it with three!
15
0 0 0
0
50
20
25
25
5 0 10
0 65 50 65
30
0 0 0
0
30
0
5
55
5 0 10
0 45 30 45
Cover Again
30
0 0 0
0
30
0
5
55
5 0 10
0 45 30 45
Still three!
30
0 0 0
0
30
0
5
55
5 0 10
0 45 30 45
40
0 5 0
0
25
0
0
55
0 0 5
0 40 30 40
Cover Again
40
0 5 0
0
25
0
0
55
0 0 5
0 40 30 40
Done!
Solutions
40
0 5 0
0 25 0 0
55
0 0 5
0 40 30 40
Done!
40
0 5 0
0 25 0 0
55
0 0 5
0 40 30 40
Solutions
9
7.5 7.5 8 9
7.5 7.5 8
Other Applications of AP
Assigning teaching
QuickTime and a
TIFF (Uncompressed) decompressor
are needed to see this picture.