You are on page 1of 84

Network Models

Slide
1
Network Models

 A network model is one which can be represented by


 a set of nodes,
 a set of arcs,
 and functions (e.g. costs, supplies, demands, etc.)
associated with the arcs and/or nodes.

 Transportation, assignment, transshipment problems


shortest route, minimal spanning tree, maximal flow
problems and PERT/CPM problems are all examples of
network problems.

Slide
2
Network Models…..

 Each of the three models can be formulated as linear


programs and solved by general purpose linear
programming Algorithms (simplex method).

 For each of the models, if the right-hand side of the linear


programming formulations are all integers, the optimal
solution will be in terms of integer values for the decision
variables.

Slide
3
Slide
4
Transportation Problem

 The transportation problem seeks to minimize the total shipping


costs of transporting goods from m origins or sources (each with a
supply ai) to n destinations (each with a demand bj), when the unit
shipping cost from source, i, to a destination, j, is cij.

 The network representation for a transportation problem with two


sources and three destinations is given on the next slide.

Slide
5
Transportation Problem

Network Representation

1 b1
c11
a1 1 c12
c13
2 b2
c21 c
22

a2 2
c23
3 b3

SOURCES DESTINATIONS

Slide
6
Transportation Problem

 LP Formulation
The linear programming formulation in terms of the
amounts shipped from the sources to the destinations, xij ,
can be written as:
Min cijxij (total transportation cost)
ij
s.t. xij < ai for each source i (supply constraints)
j
xij ≥ bj for each destination j (demand constraints)
i
xij > 0 for all i and j (non-negativity constraints)

Slide
7
Transportation Problem
 Basic requirement to solve the transportation problem by
its special purpose algorithm is
• the sum of the supplies at the sources should be
equal to the sum of the demands at the destinations.
 If the total supply is greater than the total demand
• a dummy destination is added with demand equal
to the excess supply, and shipping costs from all
sources are zero.
 Similarly, if total supply is less than total demand
• a dummy source is added.
 When solving a transportation problem by its special
purpose algorithm, unacceptable shipping routes are
given a cost of +M (a large number).

Slide
8
Transportation Problem

 A transportation tableau is given below. Each cell


represents a shipping route (which is an arc on the network
and a decision variable in the LP formulation), and the unit
shipping costs are given in an upper right hand box in the
cell.

D1 D2 D3 Supply
15 30 20
S1 50

30 40 35
S2 30

Demand 25 45 10

Slide
9
Problem formulation
The LP model for this problem is as follows:

Min Z = 15 X11 + 30 X12 + 20 X13 + 30 X21 + 40X22 + 35X23


S.t.
X11 + X12 + X13 ≤ 50
X21 + X22 + X23 ≤ 30 supply constraints

X11 + X21 = 25
X12 + X22 = 45
X13 + X23 = 10 demand constraints

X11, …, X23  0 non-negativity constraints

Slide
10
Why not Simplex Method to Solve transportation
problem

Slide
11
Transportation Problem
 The transportation problem is solved in two phases:
• Phase I -- Obtaining an initial feasible solution
• Phase II -- Moving toward optimality
 In Phase I,
• the Minimum-Cost Procedure can be used to establish an
initial basic feasible solution without doing numerous
iterations of the simplex method.
 In Phase II,
• MODI method is used for evaluating the reduced costs
which hepls to move from the initial feasible solution to the
optimal one.
• the Stepping Stone path can be used for transformation of
basic variables.

Slide
12
PHASE I
Methods to obtain an initial feasible solution
(Initial Tableau)

 There are three popular method for finding the initial tableau
for the transportation problem which are:
1. Northwest corner
2. Least cost
3. Vogle’s approximation method

Slide
13
Northwest corner

 Northwest corner:
• Begin by selecting X11 (that is, start in the northwest corner of
the transportation tableau).

• Therefore, if Xij was the last basic variable (occupied cell)


selected, then select Xij+1 (that is, move one column to the right)
if source I has any supply remaining.

• Otherwise, next select Xi+1 j (that is, move one row down).

Slide
14
Northwest corner

 Northwest corner: Begin by selecting X11 (that is, start in the


northwest corner of the transportation tableau). Therefore, if X ij
was the last basic variable (occupied cell) selected, then select X ij+1
(that is, move one column to the right) if source I has any supply
remaining. Otherwise, next select Xi+1 j (that is, move one row
down). D1 D2 D3 Supply
15 30 20
S1 25 25 50

30 40 35
S2 20 10 30

Demand 25 45 10

Total cost is $2275


Slide
15
Least-Cost Method

Step 1:
• Select the cell with the least cost.
• Assign to this cell the minimum of its remaining row
supply or remaining column demand.
Step 2:
• Decrease the row and column availabilities by this amount
and remove from consideration all other cells in the row
or column with zero availability/demand.
• (If both are simultaneously reduced to 0, assign an
allocation of 0 to any other unoccupied cell in the row or
column before deleting both.) GO TO STEP 1.

Slide
16
Least-Cost Method

Step 1: Select the cell with the least cost. Assign to this cell the
minimum of its remaining row supply or remaining column demand.
Step 2: Decrease the row and column availabilities by this amount
and remove from consideration all other cells in the row or column
with zero availability/demand. (If both are simultaneously reduced
to 0, assign an allocation of 0 to any other unoccupied cell in the row
or column before deleting both.) GO TO STEP 1.

D1 D2 D3 Supply
15 30 20
Total S1 25 15 10 50
cost is 30 40 35
$2225 S2 30 30

Demand 25 45 10 Slide
17
3. Vogel’s Method

Step 1:
• Begin with computing each row and column a penalty.
• The penalty will be equal to the difference between the two
smallest shipping costs in the row or column.
Step 2:
• Identify the row or column with the largest penalty.
• Find the first basic variable which has the smallest
shipping cost in that row or column.
• Then assign the highest possible value to that variable, and
cross-out the row or column as in the previous methods.
Step 3:
• Compute new penalties and use the same procedure.

Slide
18
An example for Vogel’s Method
Step 1: Compute the penalties.

Supply Row Penalty

6 7 8
10 7-6=1

15 80 78
15 78-15=63

Demand 15 5 5

Column Penalty 15-6=9 80-7=73 78-8=70

19 19
Copyright © 2003 Brooks/Cole, a division of Thomson Learning, Inc.
Step 2: Identify the largest penalty and assign the
highest possible value to the variable.

Supply Row Penalty

6 7 8
5 8-6=2
5
15 80 78
15 78-15=63

Demand 15 X 5

Column Penalty 15-6=9 _ 78-8=70

20 20
Copyright © 2003 Brooks/Cole, a division of Thomson Learning, Inc.
Step 3: Identify the largest penalty and assign the
highest possible value to the variable.

Supply Row Penalty

6 7 8
0 _
5 5
15 80 78
15 _

Demand 15 X X

Column Penalty 15-6=9 _ _

21 21
Copyright © 2003 Brooks/Cole, a division of Thomson Learning, Inc.
Step 4: Identify the largest penalty and assign the
highest possible value to the variable.

Supply Row Penalty

6 7 8
X _
0 5 5
15 80 78
15 _

Demand 15 X X

Column Penalty _ _ _

22 22
Copyright © 2003 Brooks/Cole, a division of Thomson Learning, Inc.
Step 5: Finally the bfs is found as X11=0, X12=5,
X13=5, and X21=15

Supply Row Penalty

6 7 8
X _
0 5 5
15 80 78
X _
15

Demand X X X

Column Penalty _ _ _

23 23
Copyright © 2003 Brooks/Cole, a division of Thomson Learning, Inc.
Phase II – MODI Method
Step 1: For each unoccupied cell, calculate the reduced cost by
the MODI method described below.
• Select the unoccupied cell with the most negative reduced
cost.
• For maximization problems select the unoccupied cell with
the largest reduced cost.
• If none, STOP.
Step 2: For this unoccupied cell,
• generate a stepping stone path by forming a closed loop
with this cell and occupied cells by drawing connecting
alternating horizontal and vertical lines between them.
• Determine the minimum allocation where a subtraction is
to be made along this path.

Slide
24
Phase II – MODI Method(continued……)

Step 3:
• Add this allocation to all cells where additions are to be
made,
• and subtract this allocation to all cells where
subtractions are to be made along the stepping stone
path.
• (Note: An occupied cell on the stepping stone path
now becomes 0 (unoccupied). If more than one cell
becomes 0, make only one unoccupied; make the
others occupied with 0's.)
• GO TO STEP 1.

Slide
25
Phase II – MODI Method(continued……)

 For obtaining reduced costs


Associate a number,
ui - each row and
vj - each column.

• Step 1: Set u1 = 0.

• Step 2: Calculate the remaining ui's and vj's by


solving the relationship ( cij = ui + vj ) for occupied cells.

• Step 3: For unoccupied cells (i,j),


the reduced cost = cij - ui - vj.
Slide
26
Example1: BBC

• Building Brick Company (BBC) has orders for 80


tons of bricks at three suburban locations as follows:
Northwood -- 25 tons, Westwood -- 45 tons, and
Eastwood -- 10 tons. BBC has two plants, each of which
can produce 50 tons per week.
• How should end of week shipments be made to fill
the above orders given the following delivery cost per ton:

Northwood Westwood Eastwood


Plant 1 24 30 40
Plant 2 30 40 42

Slide
27
Example1: BBC (Solution)

 Initial Transportation Tableau


Since total supply = 100 and total demand = 80, a
dummy destination is created with demand of 20 and 0 unit
costs.
Northwood Westwood Eastwood Dummy Supply
24 30 40 0
Plant 1 50

30 40 42 0
Plant 2 50

Demand 25 45 10 20

Slide
28
Phase I

 Least Cost Starting Procedure


• Iteration 1: Tie for least cost (0), arbitrarily select x14.
Allocate 20. Reduce s1 by 20 to 30 and delete the Dummy
column.
• Iteration 2: Of the remaining cells the least cost is 24 for x11.
Allocate 25. Reduce s1 by 25 to 5 and eliminate the
Northwood column.
• Iteration 3: Of the remaining cells the least cost is 30 for x12.
Allocate 5. Reduce the Westwood column to 40 and
eliminate the Plant 1 row.
• Iteration 4: Since there is only one row with two cells left,
make the final allocations of 40 and 10 to x22 and x23,
respectively.

Slide
29
Phase I (solution)

 Initial tableau

Northwood Westwood Eastwood Dummy Supply


24 30 40 0
Plant 1 25 5 20 50

30 40 42 0
Plant 2 40 10 50

Demand 25 45 10 20

Total transportation cost is $2770

Slide
30
Phase II

 MODI Method
• Iteration 1
1. Set u1 = 0
2. Since u1 + vj = c1j for occupied cells in row 1,
then
v1 = 24, v2 = 30, v4 = 0.
3. Since ui + v2 = ci2 for occupied cells in column 2,
then u2 + 30 = 40, hence u2 = 10.
4. Since u2 + vj = c2j for occupied cells in row 2,
then
10 + v3 = 42, hence v3 = 32.

Slide
31
Example: BBC

 Iteration 1
• MODI Method (continued)
Calculate the reduced costs (circled numbers on
the next slide) by cij –( ui + vj)

Unoccupied Cell Reduced Cost


(1,3) 40 - 0 - 32 = 8
(2,1) 30 - 24 -10 = -4
(2,4) 0 - 10 - 0 = -10
•Since some of the reduced cost are negative, the current
solution is not optimal.
•Cell (2,4) has the most negative; therefore, it will be the basic
variable that must be occupied in the next iteration.
Slide
32
Example: BBC

 Iteration 1 Tableau

Northwood Westwood Eastwood Dummy ui


24 30 40 0
Plant 1 25 5 +8 20 0

30 40 42 0
Plant 2 -4 40 10 -10 10

vj 24 30 32 0

Slide
33
Example: BBC

 Iteration 1
• Stepping Stone Path
The stepping stone path for cell (2,4) is (2,4), (1,4),
(1,2), (2,2). The allocations in the subtraction cells are 20
and 40, respectively. The minimum is 20, and hence
reallocate 20 along this path. Thus for the next tableau:
x24 = 0 + 20 = 20 (0 is its current allocation)
x14 = 20 - 20 = 0 (blank for the next tableau)
x12 = 5 + 20 = 25
x22 = 40 - 20 = 20
The other occupied cells remain the same.

Slide
34
Example: BBC

 Iteration 1 Tableau

Northwood Westwood Eastwood Dummy ui

Plant 1
24 + 30 40 - 0
0
25 5 20

30 - 40 42 + 0
Plant 2 40 10 - 10

vj 24 30 32 0

Slide
35
Example: BBC

Northwood Westwood Eastwood Dummy Supply


24 30 40 0
Plant 1 25 25 50

30 40 42 0
Plant 2 20 10 20 50

Demand 25 45 10 20
New
quantity
Total transportation cost is $2570 = 2770 – 10 (20)
Reduced cost of cell
(2,4) Slide
36
Example: BBC

 Iteration 2
• MODI Method
The reduced costs are found by calculating
the ui's and vj's for this tableau.
1. Set u1 = 0.
2. Since u1 + vj = cij for occupied cells in row 1, then
v1 = 24, v2 = 30.
3. Since ui + v2 = ci2 for occupied cells in column 2,
then u2 + 30 = 40, or u2 = 10.
4. Since u2 + vj = c2j for occupied cells in row 2, then
10 + v3 = 42 or v3 = 32; and, 10 + v4 = 0 or v4 = -10.

Slide
37
Example: BBC

 Iteration 2
• MODI Method (continued)
Calculate the reduced costs (circled numbers on
the next slide) by cij - ui + vj.

Unoccupied Cell Reduced Cost


(1,3) 40 - 0 - 32 = 8
(1,4) 0 - 0 - (-10) = 10
(2,1) 30 - 10 - 24 = -4
Since there is still negative reduced cost for cell (2,1), the
solution is not optimal.
Cell (2,1) must be occupied
Slide
38
Example: BBC

 Iteration 2 Tableau

Northwood Westwood Eastwood Dummy ui


24 30 40 0
Plant 1 25 25 +8 +10 0

30 40 42 0
Plant 2 -4 20 10 20 10

vj 24 30 36 -6

Slide
39
Example: BBC
 Iteration 2
• Stepping Stone Path
The most negative reduced cost is = -4 determined
by x21. The stepping stone path for this cell is (2,1),(1,1),
(1,2),(2,2). The allocations in the subtraction cells are 25
and 20 respectively. Thus the new solution is obtained by
reallocating 20 on the stepping stone path. Thus for the
next tableau:
x21 = 0 + 20 = 20 (0 is its current allocation)
x11 = 25 - 20 = 5
x12 = 25 + 20 = 45
x22 = 20 - 20 = 0 (blank for the next tableau)
The other occupied cells remain the same.
Slide
40
Example: BBC

Northwood Westwood Eastwood Dummy Supply


24 30 40 0
Plant 1 5 45 50

30 40 42 0
Plant 2 20 10 20 50

Demand 25 45 10 20

Total cost is $2490 = 2570 - 4(20)

Slide
41
Example: BBC

 Iteration 3
• MODI Method
The reduced costs are found by calculating
the ui's and vj's for this tableau.
1. Set u1 = 0
2. Since u1 + vj = c1j for occupied cells in row 1, then
v1 = 24 and v2 = 30.
3. Since ui + v1 = ci1 for occupied cells in column 2,
then u2 + 24 = 30 or u2 = 6.
4. Since u2 + vj = c2j for occupied cells in row 2, then
6 + v3 = 42 or v3 = 36, and 6 + v4 = 0 or v4 = -6.

Slide
42
Example: BBC

 Iteration 3
• MODI Method (continued)
Calculate the reduced costs (circled numbers on
the next slide) by cij - ui + vj.

Unoccupied Cell Reduced Cost


(1,3) 40 - 0 - 36 = 4
(1,4) 0 - 0 - (-6) = 6
(2,2) 40 - 6 - 30 = 4

Since all the reduced cost are nonnegative, the current


solution is optimal
Slide
43
Example: BBC

 Iteration 3 Tableau
Since all the reduced costs are non-negative, this
is the optimal tableau.

Northwood Westwood Eastwood Dummy ui


24 30 40 0
Plant 1 5 45 +4 +6 0

30 40 42 0
Plant 2 20 +4 10 20 6

vj 24 30 36 -6

Slide
44
Example: BBC

 Optimal Solution

From To Amount Cost


Plant 1 Northwood 5 120
Plant 1 Westwood 45 1,350
Plant 2 Northwood 20 600
Plant 2 Eastwood 10 420
Total Cost = $2,490

Slide
45
Determination of the Starting Solution

 A general transportation model with m sources and n


destinations has m + n constraint equations, one for each
source and each destination.
 However, because the transportation model is always
balanced (sum of the supply = sum of the demand), one of
these equations is redundant.
 Thus, the model has m + n - 1 independent constraint
equations, which means that the starting basic solution
consists of m + n - 1 basic variables.
 For example if a problem has m= 3 and n =4 , the starting
solution has 3 + 4 - 1 = 6 basic variables.

Slide
46
What happens if basic solution consists of more than m + n - 1
basic variables?
Then the allocations are not independent. It results in loops
which has to be broken.

What happens if basic solution consists of less than m + n - 1


basic variables?
Then it will leads to degeneracy. The number of variables that
are less than m + n - 1 basic variables should be set to zero.

Slide
47
Simplex Method Explanation of the MODI
method
 The relationship between the MODI method and the
simplex method can be explained based on the primal-
dual relationships . From the special structure
 of the LP representing the transportation model the
associated dual problem can be written as

Slide
48
the objective-function coefficients (reduced costs) of the variable
Xij equal the difference between the left- and right-hand sides
of the corresponding dual constraint-that is, Ui + Vj - Cij
However, we know that this quantity must equal zero for each
basic variable, which then produces the following result:

Slide
49
 There are m + n - 1 such equations whose solution (after
assuming an arbitrary value Ui = 0) yields the multipliers Ui
and Vj.
 Once these multipliers are computed, the entering variable is
determined from all the nonbasic variables as the one having
the largest positive Ui + Vj – Cij.

Slide
50
Example1: A department store wishes to purchase the following
quantities of ladies dresses per month:
Dress Type A B C D
Quantity 100 300 200 100
Tenders are submitted by 3 different manufacturers who
undertake to supply not more than the quantities below (all
types of dress combined)
The store estimates that its profit per dress will vary the
manufacturer as shown in Table. How should orders be placed.
Manufacturers W X Y
Quantity 500 600 400

Dress
Manufacturers A B C D

W 2 3 4 2
X 1 3 3 2
Y 3 4 5 4 Slide
51
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
52
Assignment Problem

 Network Representation

c11
1 1
c12
c13

c21
2 c22 2
c23

c32
c31
3 c33 3

WORKERS JOBS

Slide
53
Assignment Problem

 Linear Programming Formulation

Min cijxij
ij
s.t. xij = ai for each worker i
j
xij = bj for each job j
i
xij = 0 or 1 for all i and j.

• ai , bi = 1
• Note: A modification to the right-hand side of the first
constraint set can be made if a worker is permitted to
work more than 1 job.

Slide
54
Example: Hungry Owner
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
distance (and total cost)?

Slide
55
Example: Hungry Owner

 Network Representation
50
West. 36
A

16

28
30
Fed. B
18

35 32
20
Gol. C

25 25
14
Univ.

Slide
56
Example: Hungry Owner

 LP Formulation
• Decision Variables Defined
xij = 1 if subcontractor i is assigned to project
j
= 0 otherwise

where: i = 1 (Westside), 2 (Federated),


3 (Goliath), and 4 (Universal)
j = 1 (A), 2 (B), and 3 (C)

Slide
57
Example: Hungry Owner

 LP Formulation
• Objective Function
Minimize total distance:
Min 50x11 + 36x12 + 16x13 + 28x21 + 30x22 + 18x23
+ 35x31 + 32x32 + 20x33 + 25x41 + 25x42 + 14x43

Slide
58
Example: Hungry Owner

 LP Formulation
• Constraints
x11 + x12 + x13 < 1 (no more than one
x21 + x22 + x23 < 1 project assigned
x31 + x32 + x33 < 1 to any one
x41 + x42 + x43 < 1 subcontractor)
x11 + x21 + x31 + x41 = 1 (each project must
x12 + x22 + x32 + x42 = 1 be assigned to just
x13 + x23 + x33 + x43 = 1 one subcontractor)
all xij > 0 (non-negativity)

Slide
59
Example: Hungry Owner

 Optimal Assignment

Subcontractor Project Distance


Westside C 16
Federated A 28
Universal B 25
Goliath (unassigned)
Total Distance = 69 miles

Slide
60
Variations of Assignment Problem

 Total number of agents not equal to total number of


tasks
 Maximization objective function
 Unacceptable assignments

Slide
61
Hungarian Method

 The Hungarian method solves minimization


assignment problems with m workers and m jobs.
 Special considerations can include:
• number of workers does not equal the number of
jobs -- add dummy workers or jobs with 0
assignment costs as needed
• worker i cannot do job j -- assign cij = +M

Slide
62
Hungarian Method

 Step 1: For each row, subtract the minimum number in that


row from all numbers in that row.
 Step 2: For each column, subtract the minimum number in
that column from all numbers in that column.
 Step 3: Draw the minimum number of lines to cover all
zeroes. If this number = m, STOP -- an assignment can be
made. If not go to step 4
 Step 4: Determine the minimum uncovered number (call it
d).
• Subtract d from uncovered numbers.
• Add d to numbers covered by two lines.
• Numbers covered by one line remain the same.
• Then, GO TO STEP 3.

Slide
63
Hungarian Method

 Finding the Minimum Number of Lines and Determining


the Optimal Solution
• Step 1: Find a row or column with only one unlined
zero and circle it. (If all rows/columns have two or
more unlined zeroes choose an arbitrary zero.)
• Step 2: If the circle is in a row with one zero, draw a line
through its column. If the circle is in a column with one
zero, draw a line through its row. One approach, when
all rows and columns have two or more zeroes, is to
draw a line through one with the most zeroes, breaking
ties arbitrarily.
• Step 3: Repeat step 2 until all circles are lined. If this
minimum number of lines equals m, the circles provide
the optimal assignment.

Slide
64
Example: Hungry Owner

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.
Projects
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?

Slide
65
Example: Hungry Owner

 Network Representation (note the dummy project)


50
West. 36
A

0 16

28
30
Subcontractors

Fed. B
18

Projects
0

35 32
20
Gol. C
0

25 25
14
Univ. Dum.
0
Slide
66
Example: Hungry Owner

 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:

A B C Dummy
Westside 50 36 16 0
Federated 28 30 18 0
Goliath 35 32 20 0
Universal 25 25 14 0

Slide
67
Example: Hungry Owner

 Step 1: Subtract minimum number in each row from all


numbers in that row. Since each row has a zero, we
would simply generate the same matrix above.
 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:

A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0

Slide
68
Example: Hungry Owner

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


zeroes. 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.
A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0
 Step 4: The minimum uncovered number is 2 (circled).

Slide
69
Example: Hungry Owner

 Step 5: Subtract 2 from uncovered numbers; add 2 to all


numbers covered by two lines. This gives:

A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2

Slide
70
Example: Hungry Owner

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


zeroes.
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
71
Example: Hungry Owner

 Step 5: Subtract 1 from uncovered numbers. Add 1 to


numbers covered by two lines. This gives:

A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3

Slide
72
Example: Hungry Owner

 Step 4: The minimum number of lines to cover all 0's is


four. Thus, there is a minimum-cost assignment of 0's
with this tableau. The optimal assignment is:

Subcontractor Project Distance


Westside C 16
Federated A 28
Goliath (unassigned)
Universal B 25
Total Distance = 69 miles

Slide
73
Example: Timing of the trains services
Train Number Departure(Hours) Arrival (Hours)
2243/2244 09.45 16.45
2429/2430 21.00 06.00
6033/6034 12.00 12.00
5033/5034 22.15 05.15
2651/2652 18.30 08.30
6021/6022 07.30 13.30

Gap of 2 hours between arrival and departure.


Optimum assignment for the train problem

Slide
74
1 2 3 4 5 6
1 17 4.15
2
3
4
5
6

Slide
75
Example Problem

Chore
Child 1 2 3 4

1 $1 4 6 3
2 9 7 10 9
3 4 5 11 7
4 8 7 8 5

Slide
76
Note:
Assignment problem becomes LPP when the 0-1 constraint is
removed.
Similarities between TP and AP
Objective function and coefficient matrix are same
Difference between TP and AP
AP has a square and ai =1, bj =1.
Why not transportation algorithms?
It becomes degenerate TP. Degenerate problem take long time
to get solution.

Slide
77
A feasible solution to the n * n assignment problem has exactly
n assignments while LP has n square decision variables and 2n
constraints.
Out of 2n constrains there are 2n-1 basic variables because the
coefficient matrix represents a linear dependent system of
equations
Since assignment solution has n allocations out of 2n-1 basic
variables. It means n-1 basic variables take value 0 indicating
degeneracy.

Slide
78
Properties of optimal solution
Property 1: If the cost coefficents Cij >= 0, a feasible solution
with Z =0 is optimal.
Property 2: If all the elements of row or column is increased
or decreased by same constant, the optimal solution to the
assignment problem does not change. Only the value of the
objective function changes.

Slide
79
Optimality of the Hungarian Algorithm

 Dual of the assignment problem is below.


 Let the dual variable be ui and vj for the row and
column feasibility constraints.

Slide
80
 Example
Cost of assigning a job
5 9 3 6
8 7 8 2
6 10 12 7
3 10 8 6

Row minimum substraction


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

 Assign u1 = 3, u2 = 2, u3 = 6 and u4 = 3 and v1 = 0, v2


=4, v3 =0, v4 = 0.

Slide
81
 U and v are feasible solution to the dual because it satisfies
the constraints.
Column minimum subtraction
2 2 0 3
6 1 6 0
0 0 6 1
0 3 5 3

Hungarian Algorithm is an example of Dual Algorithm

Slide
82
 M/s Cow and calf Dairies make threetypes of milk
products.. They own three plants , one of which is to be
selected foe each product. Data given below.
Unit processing costs (Rs./Litre)
I II II
SM 5.50 5.0 6.0
FM 6.0 7.0 6.50
Y 6.50 6.0 7.0

Unit Distribution Costs(Rs./Litre)


I II II
SM 1.00 2.00 1.00
FM 0.50 1.00 1.30
Y 0.60 0.50 0.80

Slide
83
Daily production and selling price of products

Product Planned Planned


production(Litres Price(Rs./Litre)
)
SM 8k 13
FM 5k 18
Y 2k 20

Find the optimal solution and profit associated with it.

Slide
84

You might also like