You are on page 1of 20

Problem 1

Jobs

1
2
3
4
5

Initial cost matrix

5
6
4
7
3

6
4
3
2
6

4
9
2
4
4

Row Reduction

A
1
2
3
4
5

B
2
2
2
5
0

3
0
1
0
3

Column Reduction
employees A

1
2
3
4
5

B
2
2
2
5
0

D
1
5
0
2
1

C
3
0
1
0
3

5
4
3
3
2

D
1
5
0
2
1

5-2.=3
2
1
1
0
-2

employees

1
2
3
4

B
2
2
2
5

C
3
0
1
0

1
5
0
2

Now check to see if the co


condition of optimality
An optimum solution is rea

since the condition of optimality is not satisified here, we continue to the next s
four steps that follow
A. identify the smallest uncovered element
B. Subtract the smallest uncovered element of the matrix from all uncovered el
C. Add the smallest uncovered element to all elements where lines interesect
D. Any element covered by a single line remains the same

employees

1
2
3
4
5

B
2
2
2
5
0

C
3
0
1
0
3

D
1
5
0
2
1

3
2
1
1
0

before

Making the assignment, assignments can only be made at the zero's and they m

employees

1
2
3
4
5

B
2
1
2
4

0X

C
4

0X
2
0
4

D
1
4

0X
1
1

3
1
1

0X
0

To begin assigning look for any row or column has a single zero and make the a

Sample two question


Now Assume that there are only four jobs that need to be assigned
(5 employees)
and that job C must not be assigned to employee 4

job c
cannot be
Emp 4

1
2
3
4
5

B
5
6
4
7
3

C
6
4
3
2
6

D
4
9
2
M
4

8
8
5
5
5

M=infinite

Column reduction

A
1
2
3
4
5

B
2
3
1
4
0

subtract 3

C
4
2
1
0
4

subtract 2

D
2
7
0
M
2

subtract 2

3
3
0
0
0
subtract 5

The condition of optimality is not satisified

since the condition of optimality is not satisified here, we continue to the next s
four steps that follow
A. identify the smallest uncovered element
B. Subtract the smallest uncovered element of the matrix from all uncovered el
C. Add the smallest uncovered element to all elements where lines interesect
D. Any element covered by a single line remains the same

A
1
2
3
4
5

B
2
3
1
4
0

C
4
2
1
0
4

D
2
7
0
M
2

3
3
0
0
0

Problem 3
Maximization

A
1
2
3

B
5
M Neg
4
0

Dummy

C
6
4
3
0

D
4
9
2
0

8
8
5
0

constraint A
cannot be
assigned to
employee 2

Because this is a max problem we must first convert it into an equivalent minim
to convert to a maximization to a minimization problem, identify the higest elem

A
1
2
3
Dummy

B
4
m
5
9

C
3
5
6
9

D
5
0
7
9

1
1
4
9

E
8
8
5
5
5

3 A would be five minus 3, B would be 6-3


5
4
3
5

Suppose a scheduler has 5 jobs that can be per


(thus n=5)

The cost of completing the 5 jobs is shown in th

0
1
1
1
2

Before doing anything else make sure you have

Row reduction
For each row subtract the smallest element of t

For each column subtract the smallest element of


0
1
2
1
2

Zero's are included two minus zero is still two

cover all zero's in the matrix using the least number of straight lines drawn hori

E
3
2
1
1

0
1
2
1

cover all zero's in the matrix using the least number of straight lin

w check to see if the condition of optimality is satisified


dition of optimality
optimum solution is reached when the minimum number of lines used to cover the zero's equals the di

continue to the next step

from all uncovered elements in the matrix


here lines interesect

employees

1
2
3
4
5

0
1
2
1
2

B
2
1
2
4
0

4
0
2
0
4
after

therefore the condition of optimality is satisfied, and these being t


we make the assignments.

t the zero's and they must be one to one

Job
0X
0
2
0
2

Employee
employee
Employee
Employee
Employee

Cost
one gets E
two B
3 gets C
4 gets D
5 Gets A
optimal total is

e zero and make the assignment at that zero

3
4
2
5
3
17

assigned
igned to employee 4
Row Column

dummy

A
0
0
0
0
0

dummy
0
0
0
0
0

continue to the next step

from all uncovered elements in the matrix


here lines interesect

1
2
3
4
5

5
6
4
7
3

dummy

A
1
2
3
4
5

0 subtract 2 from row 1


0 subtract 2 from row 2
0 subtract 1 from row 3
0
0

0
1
1
4
0

these connecting points


add 2 c it's smallest uncovered number
Identify the assignment and it's value
Employee 1 Dummy Job
Employee 2 B
Employee 3 C
Employee 4 D
Employee 5 A

A
1
2
3

B
5
M Neg
4
0

Dummy

6
4
3
0

to an equivalent minimization problem


dentify the higest element and subtract every element the matrix from that highest element
Row Reduction

A
1
2
3
Dummy

B
3
m
1
0

2
5
2
0

uler has 5 jobs that can be performed by any of 5 employees

leting the 5 jobs is shown in the initial matrix, the scheduler would like to obtain a minimum cost assig

thing else make sure you have a square matrix. (rows=columns)

tract the smallest element of that row from all elements of that row.

he smallest element of that column from all elements of that column

s still two

ber of straight lines drawn horizontally or vertically.

he least number of straight lines drawn horizontally or vertically.

cover the zero's equals the dimension of the matirx

D
1
4
0
1
1

E
3
1
1
0
0

0
0
2
0
2

is satisfied, and these being the final values of the matrix

C
6
4
3
2
6

D
4
9
2
M
4

dummy
8
8
5
5
5

0
0
0
0
0

C
2
0X
1
0
4

nment and it's value

D
0
5
0
M
2

dummy
1
1
0
0X
0

0
0
2
2
2

Costs
0
4
2
5
3
14

D
4
9
2
0

8
8
5
0

is the highest element

9-(-m)

hat highest element

Column Reduction

D
4
0
3
0

A
0
1
0
0

1
2
3
Dummy

B
3
m
1
0

2
5
2
0

Not Optimal so abcd

A
1
2
3
Dummy
Now optimal

B
2
m
0
0

1
5
1
0
employee 1
employee 2
employee 3
Dummy

a minimum cost assignment.

column

D
4
0
3
0

0
1
0
0

smallest uncovered number is 1

intersecting points add 1

D
3
0
2
0

D
C
A
B

0
2
0
1
8
9
4
0
21

C.2. contains a single zero

You might also like