Sunteți pe pagina 1din 6

Solutions to OR Exercise Set 7

2014300950050
November 26, 2016

1
1.1

Ex.1 Re-solve the transportation problems of


Ex. 5 & Ex. 6 in Set 6 using the Excel-Solver.
Ex. 5 in Set 6

We can present decision variables above the cost matrix and use the sumproduction function to get our total cost, as the graph below

Thus we work out the solution that the optimal transportation is


x11 = 35, x13 = 5, x23 = 30, x32 = 10, x33 = 15, x44 = 30, x52 = 50, x54 =
5 with all other xi j = 0
The optimal transportation cost is :
35*2+5*5+30*2+10*3+15*4+30*1+50*4+5*3 = 490 , i.e. total cost is 490.
Actually we can report the information of sensitivity analysis and so on as
well, but for simplicity, we omit it.
1

1.2

Ex. 6 in Set 6

Again, we can present decision variables above the cost matrix and use the
sumproduction function to get our total cost, as the graph below

The optimal transportation is listed above, with


x13 = 3, x14 = 2, x22 = 4, x23 = 2, x31 = 1, x33 = 1, x41 = 3, x45 = 4
The optimal transportation cost is :
3*9+2*6+4*3+2*7+6+9+3*6+4*2= 106 , i.e. total cost is 106.

Ex.2 Hungarian Algorithm

We are required to solve the below problem by Hungarian Algorithm.

2.1

Step I

Compute c(i, j) for each component (i, j).


Specifically, for each line(Li ), subtract from each c(i, j) the minimum number in this line i.e., c(i, j) = c(i, j) minj c(i, j). And then repeat this
procedure to each column, namely c(i, j) = c(i, j) minj c(i, j).
This gives us the table of reduced cost:

4 2 0 3
0 3 5 0

2 0 0 2
1 3 3 0

2.2

Step II

Cover all the 0 with a min. number of lines+columns.


Here we use a rather ingenious method, put forward by myself independently,
to figure out how to cover all the 0 with least rows and columns. Specifically,
we start at some 0 with only other 0 in its column or row,e.g., the c(2, 1),
c(1, 3) and c(4, 4). We choose to cover them with a row or colume that
covers some other 0 as well. And iterate this algorithm, we find we need at
least 4 covering number, row 2 and row 3, column 3 and column 4, which
is equal to the total capacity. The covering number is showed in boldface
below.

4 2 0 3
0 3 5 0

2 0 0 2
1 3 3 0
Thus we pass to Step IV to find out an optimal solution (assignment).

2.3

Step IV

Notice that the optimal solution (assignment) for the above table of cost
where the minimum covering number = the total capacity 4.
Then choose the line(s)/column(s) containing only one zero, and make
the corresponding allocation(s), e.g., c(2, 1) = 0 and its the only 0 column
1. So we allocate 1 to X (2, 1) and delete row 2 and column 1, to get this:

2 0 3

0 0 2
3 3 0

Repeat what weve just done to c(3, 2) and X (3, 2) and well have this:

0 3


3 0
Repeat what weve just done to c(1, 3), X (1, 3) and c(4, 4), X (4, 4) to
make X (1, 3) = X (4, 4) = 1.

2.4

Conclusion

The only optimal assignment is


{
X (i, j) = 1, f or(i, j) = (2, 1), (3, 2), (1, 3), (4, 4);
X (i, j) = 0, f or other(i, j).
Or we put it on a table:

4 2 3
3 5 0

2 0 2
1 3 3

Ex. 3: Problem (a) in Ex. 10.3-3 of the textbook Hillier & Lieberman

The shortest-path graph has been presented in previous page. Now we


turn to why it can be formulate as a shortest-path problem. In the above
graph, O means the origin, in this case, it equals to year 0 ,or now; T
means the destination, here it represents the end of year 3. A and B are
respectively the end of year 1 and 2 when this company get its tractor
replaced, i.e., when this airline company choose to replace its tractor at the
end of year 1, it must go by vertex A, otherwise not. B has similar meaning:
when this airline company choose to replace its tractor at the end of year 2,
it must go by vertex B, otherwise not.
Hence each vertex represents a point in time (the end of an exact year)
at which the airline company deals with its tractor, specifically, purchasing
a new tractor at O, replacing it at A and/or B (or not replacing it at all),
and discarding it at T . Notice that only O and T are necessary, company
must possess a tractor at the vary beginning and trade it in at the end of
the third year.
How about edges? Each edge means a time period in which the airline
company runs and maintain an exact tractor. Notice that this period can be
one year (say, OA, AB, BT ) or two years (e.g., OB, AT ) or three years (OT ),
and every two edges must refer to different tractors without exception.
With each edge associated with a net discounted cost and a given origin
and a fixed termination, this question is obviously a shortest-path problem.

Ex. 4: Problem (a) in Ex. 10.3-7 of the textbook Hillier & Lieberman.

Since we are determining at which level to conduct each of the four


phase, we simply have our vertices divided into 4 columns (except T and
O), according to the 4 phases. And to get the graph for path, we first draw
the graph with cost restriction.
In the first graph in previous page, we find all the possible choices by
summing their costs up, then drop those beyond 30$. Next, we substitute
the required time of each corresponding edge for its cost and get our second
graph for shortest-path calculation.
Therefore, in our first graph, each number on the edge shows the cost of
that level in that phase, while each number in the node demonstrates the
total cost needed for such a choice at the end of the corresponding phase.
And our second graph, is a common weighted-graph with weights to be
the time of which we are about to minimize the sum. The four columns of
vertices (except O and T ) correspond to the ends of four phases respectively.
Hence we have a graph associated with a time cost on its edges and a pair of
fixed origin and fixed termination, it is nothing more than a shortest-path
problem.

S-ar putea să vă placă și