You are on page 1of 7

ISyE/Math/CS/Stat 525 – Linear Optimization

Assignment 6 – Chapter 7

Instructions and policy: Undergraduate students should handle in the five exercises that are marked
with [U]. Graduate students should handle in the five exercises that are marked with [G]. All other exercises
are optional for keen students and should not be handled in. The assignment should be submitted
electronically in Canvas. Late submission policy: 20% of total points will be deducted per hour. Each student is
encouraged to solve all the exercises in the assignment to practice for the exams.
Students are strongly encouraged to work in groups of two on homework assignments. To find a partner
you can post on the “Discussions” section in Canvas. Only one file should be submitted for both group
members. In order to submit the assignment for your group please follow these steps in Canvas: Step 1. Click
on the “People” tab, then on “Groups”, and join one of the available groups named “Assignments Group 1”,
“Assignments Group 2”, . . . ; Step 2. When also your partner has joined the same group, one of the two can
submit the assignment by clicking on the “Assignments” tab, then on the assignment to be submitted, and
finally on “Submit assignment”. The submission will count for everyone in your group.
Groups must work independently of each other, may not share answers with each other, and solutions
must not be copied from the internet or other sources. If improper collaboration is detected, all groups
involved will automatically receive a 0. Students must properly give credit to any outside resources they use
(such as books, papers, etc.). In doing these exercises, you must justify all of your answers and cite every
result that you use. You are not allowed to share any content of this assignment.

Exercise 1 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Each of n teams plays against every single other team a total of k games. Assume that every game
ends in a win or a loss (no draws) and let xi be the number of wins of team i. Let X be the set of all
possible outcome vectors (x1 , . . . , xn ). Given an arbitrary vector (x1 , . . . , xn ), we would like to determine
whether it belongs to X, that is, whether it is a possible tournament outcome vector. Provide a network
flow formulation of this problem to test the feasibility of x.

Solution: We introduce nodes T1 , . . . , Tn that correspond to the different teams. These are supply
nodes and node Ti has a supply of xi , the total number of games won by team i. For every unordered
pair i, j of teams, we introduce a node Gij . These are demand nodes, with demand k, the total
number of games played between these two teams.Pn Since the total number of games must be equal
to the total number of wins, we assume that i=1 xi = kn(n − 1)/2.
There are two arcs that come into a node Gij ; one from Ti and one from Tj . The flow from Ti to
Gij represents the total number of games between teams i and j that was won by team i.
The above constructed network flow problem is feasible if and only if the vector (x1 , . . . , xn ) belongs
to the set of possible outcome vectors.

Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
Consider an uncapacitated network flow problem and assume that cij ≥ 0 for all arcs. Let S+ and S−
be the sets of source and sink nodes, respectively. Let dij be the length of a shortest directed path from
node i ∈ S+ to node j ∈ S− . (Let dij = ∞ if no path exists.) We construct a transportation problem
with the same source and sink nodes, and the same values for the supplies and the demands. For every
source node i and every sink node j, we introduce a direct link with cost dij . Show that the two problems
have the same optimal cost.

Page 1 of 7
Solution: Two things need to be shown:

1. A feasible solution of the transportation problem (T) can be mapped to a feasible solution of
the uncapacitated network flow problem (UNF) of the same or lower cost.

2. A feasible solution of (UNF) can be mapped to a feasible solution of (T) of the same or lower
cost.

Let G = (V, A) be the graph in (UNF).


S ×S−
1. Let x ∈ R++ be a feasible solution to (T). We construct f ∈ RA
+ by following this procedure:

1. Initialize f := 0.

2. For each (i, j) ∈ S+ × S− ,

(a) Find the shortest (i, j)-path in the network G; define it as the sequence of visited nodes
i1 ≡ i, i2 , . . . , it−1 , it ≡ j.
(b) Set fik ik+1 := fik ik+1 + xik ik+1 for each k = 1, . . . , t − 1. (Restatement: For each arc (i, j)
in the path, increase fij by xij .)

3. Return f .

f is feasible to (UNF). Moreover,


X X
ca fa = dij xij
a∈A (i,j)∈S+ ×S−

by construction.
2. Let f ∈ RA
+ be a feasible solution to (UNF). There exist (i, j)-flows f
ij
∈ RA
+ for each i ∈ S+ , j ∈
S− such that
X
f= f ij .
(i,j)∈S+ ×S−

S ×S−
We construct x ∈ R++ by assigning
X ij
xij := fik
(i,k)∈S+ ×V

for each i ∈ S+ , j ∈ S− (i.e., xij is how much flow travels from i to j in flow f ij ). x is feasible to
(T).
It suffices to show X
ca faij ≥ dij xij
a∈A

for each i ∈ S+ , j ∈ S− .
Let Pij = {P : P is an (i, j)-path}, and for the sake of dropping superscripts, let fˆ denote f ij . fˆ
can be decomposed into flows along (i, j)-paths P ∈ Pij , i.e., there exist flows fˆP ∈ RA+ for each
P ∈ Pij such that
X
fˆ = fˆP
P ∈Pij

Page 2 of 7
and fˆaP > 0 if and only if arc a is in the path P ∈ Pij . For each path P ∈ Pij given by the sequence
of visited nodes i1 ≡ i, i2 , . . . , it−1 , it ≡ j, we have
t−1
X
cik ik+1 ≥ dij
k=1

by definition of dij as the length of a shortest (i, j)-path. Therefore, we have


t−1
X
cik ik+1 fˆiPk ik+1 ≥ dij xP
ij
k=1

where xP ˆP
ij is how much flow travels along path P in (i, j)-flow f ; note that
X
xij = xP
ij .
P ∈Pij

As fˆP is defined as a flow along an (i, j)-path P , we can rewrite the lefthand side of the above
inequality to obtain X
ca fˆaP ≥ dij xP
ij .
a∈A

By summing both sides of the above inequality over all paths P ∈ Pij , we obtain
X X X X X X X
ca fˆaP = ca fˆaP = ca fˆa ≥ dij xP
ij = dij xP
ij = dij xij ,
P ∈Pij a∈A a∈A P ∈Pij a∈A P ∈Pij P ∈Pij

the desired result.

Exercise 3 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider a network flow problem in which we impose an additional constraint fij ≥ dij for every arc
(i, j). Construct an equivalent network flow problem in which there are no nonzero lower bounds on the
arc costs, i.e., we have f¯ij ≥ 0 for new flow variables f¯ij ’s.
Hint: Let f¯ij = fij − dij and construct a new network for the arc flows f¯ij . How should bi be changed?

Solution: Let fij = fij − dij . The capacity constraints dij ≤ fij ≤ uij become 0 ≤ fij ≤ uij − dij .
The flow conservation constraint at node i is
X X
fij = fji + bi ,
j j

and can be rewritten as X X


(f¯ij + dij ) = (f¯ji + dji ) + bi ,
j j
or X X X X
fij = f¯ji + (bi + dji − dij ).
j j j j
P P
This is a flow conservation constraint, for the new variables, with bi replaced by bi + j dji − j dij .

Page 3 of 7
Exercise 4 [U] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points
Consider a transportation problem in which all cost coefficients cij are positive. Suppose that we increase
the supply at some source nodes and the demand at some sink nodes. (In order to maintain feasibility,
we assume that the increases are such that total demand is equal to total supply.) Is it true that the
value of the optimal cost will also increase? Prove or provide a counterexample.

Solution: The answer is no.


Consider the transportation problem with supply centers 1 and 2 with supplies S1 = 2, S2 = 1, and
demand centers 3, 4 with demands D3 = 2, D4 = 1. Denote the cost of each arc (i, j) by cij > 0, and
∗ ∗ ∗
let c13 = 10, c23 = c24 = c14 = 1. We see that one optimal solution is given by f13 = f23 = f14 = 1,
and the minimum cost is 12.
Now consider the case when we add S2 and D4 by 2. We see that one optimal solution is given by
f¯23

= f¯14

= 2, f¯24

= 1, and the minimum cost is 5.

Exercise 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 points
Consider the uncapacitated network flow problem in the figure below. The label next to each arc is its
cost.

(a) What is the matrix A corresponding to this problem?

Solution: We consider the arc ordering (1, 3), (2, 1), (3, 2), (3, 6), (4, 1), (7, 4), (2, 5), (5, 4),
(8, 5), (6, 8), (8, 7), (7, 6) and the node ordering 1, 2, 3, 4, 5, 6, 7, 8.
 
1 −1 0 0 −1 0 0 0 0 0 0 0
 0
 1 −1 0 0 0 1 0 0 0 0 0 
 −1 0 1 1 0 0 0 0 0 0 0 0 
 
 0 0 0 0 1 −1 0 −1 0 0 0 0 
A= 
 0
 0 0 0 0 0 −1 1 −1 0 0 0 
 0
 0 0 −1 0 0 0 0 0 1 0 −1 
 0 0 0 0 0 1 0 0 0 0 −1 1 
0 0 0 0 0 0 0 0 1 −1 1 0

Page 4 of 7
(b) Solve the problem using the network simplex algorithm. Start with the tree indicated by the dashed
arcs in the figure.

Solution: Solving along the tree to find the values of the basic arc flows, we obtain f32 = 2,
f25 = 1,f41 = 2,f76 = 0,f74 = 5,f85 = 0,f54 = 3. We note that the reduced cost of arc (2, 1)
is 3 − 1 − 2 − 2 < 0. We push one unit of flow around the corresponding cycle and arc (2, 5)
exists the tree.
The reduced cost of arc (1, 3) is 0+0+3 > 0. The reduced cost of arc (3, 6) is 1−1+4+1−3−0 >
0. The reduced cost of arc (6, 8) is 1 + 3 + 2 − 4 + 1 > 0. Finally, the reduced cost of arc (8, 7)
is 0 + 4 − 2 − 3 < 0. We bring that arc into the basis and arc (8, 5) exists. Note that this is
a degenerate pivot. At this point, it can be checked that all the reduced costs are nonnegative
and we have an optimal solution.

Exercise 6 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points

Consider the uncapacitated network flow problem shown in the figure above. The label next to each
arc is its cost. Consider the spanning tree indicated by the dashed arcs in the figure and the associated
basic solution.
(a) (1 point) What are the values of the arc flows corresponding to this basic solution? Is this a basic
feasible solution?

Solution: We have f15 = 3, f56 = 3, f62 = 1, f68 = 2, f89 = 2. All other arcs carry zero flow.
All flow variables are nonnegative and this is a basic feasible solution.

(b) (1 point) For this basic solution, find the reduced cost of each arc in the network.

Page 5 of 7
Solution:
c̄14 = 1 + 3 + 1 + 3 − 2 − 2 − 1 − 2 = 1
c̄46 = 4 + 2 + 2 − 3 − 1 − 3 = 1
c̄67 = 2 + 3 − 2 − 2 = 1
c̄52 = 4 − 1 − 1 = 2
c̄28 = 1 − 2 + 1 = 0.

(c) (1 point) Is this basic solution optimal?

Solution: It is optimal because all reduced costs are nonnegative.

(d) (1 point) Does there exist a nondegenerate optimal basic feasible solution?

Solution: There are multiple optimal solutions because we could bring arc (2, 8) into the basis
and remove arc (6, 8). Nevertheless, any optimal solution would have zero flow through node
3, and would therefore be degenerate.

(e) (1 point) Find an optimal dual solution.

Solution: Let node 9 be the root. We have p9 = 0, p7 = 3, p3 = 4, p4 = 7, p8 = 2, p6 = 4, p2 =


3, p5 = 5, p1 = 7.

(f) (2 points) By how much can we increase c56 (the cost of arc (5, 6)) and still have the same optimal
basic feasible solution?

Solution: If we increase c56 by δ, we obtain c̄52 = 2 − δ, which limits us to δ ≤ 2. Note that


c̄46 , c̄67 , and c̄28 remain unchanged. Finally, c̄14 becomes 1 − δ, which limits us to δ ≤ 1.

(g) (2 points) If we increase the supply at node 1 and the demand at node 9 by a small positive amount
δ, what is the change in the value of the optimal cost?

Solution: The additional flow should be routed along the arcs of the (optimal) tree at a cost
of 7δ.

(h) (1 point) Does this problem have a special structure that allows us to solve it by solving few
instances of a different network optimization problem seen in class?

Solution: Since there is only one source node, the problem amounts to shipping two units of
flow along a shortest path from 1 to 9, and one unit of flow from 1 to 2. Since the supplies
are integer, the optimal solution is integer. Thus, we only need to solve three shortest path
problems.

Exercise 7 [U][G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Consider a transportation problem with two source nodes s1 , s2 , and n demand Pn nodes 1, . . . , n. All arcs
(si , j) are assumed to be present and to have infinite capacity. Let D = i=1 di be the total demand.
Let the supply at each source node be equal to D/2. Assume that di > 0 for all i.
(a) (4 points) How many basic variables are there in a basic feasible solution?

Page 6 of 7
Solution: Since there are n + 2 nodes, there are n + 1 basic variables.

(b) (6 points) Show that there exists


P a degenerate basic feasible solution if and only if there exists some
set S ⊂ {1, . . . , n} such that i∈S di = D/2.
P
Solution: Suppose that for some S ⊂ {1, . . . , n} we have i∈S di = D/2. We can ship the
supply from node s1 to the nodes in S and the supply from s2 to the nodes in the complement
of S. Then, there are only n arcs that carry positive flow, and this a degenerate basic feasible
solution.
Conversely, if we have a degenerate basic feasible solution, we have at most n arcs that carry
positive flow. This implies that each sink node is associated with either s1 or s2 , but not both.
Thus, the total supply D/2 at node s1 is equal to the sum of the demands at the associated
nodes.

Exercise 8 [G] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 points


Suppose that we are given a noninteger optimal solution to an uncapacitated network flow problem with
integer data.
(a) (5 points) Show that there exists a cycle with every arc on the cycle carrying a positive flow. What
can you say about the cost of such cycle?

Solution: Suppose that there is no cycle with every arc on the cycle carrying a positive flow.
This means that the set A = {(i, j) : fij > 0} is acyclic, i.e. it consists of one or more trees. If
it consists of more than one tree, we can add few more arcs, in order to obtain a spanning tree
(Theorem 7.2). Thus, we have a feasible tree solution (Definition 7.1), and by Theorem 7.4,
the flow vector is a basic feasible solution. Since all the supplies are integer, by Theorem 7.5
our basic feasible solution must be integer, a contradiction.
We have proven that that there is a cycle with every arc on the cycle carrying a positive flow.
Let c̄ the cost of this cycle. If c̄ < 0, we can push a positive amount of flow along the cycle.
Similarly, if c̄ > 0, we can push a negative amount of flow along the cycle. In both cases we
obtain a feasible solution of smaller cost, which contradict optimality. Thus, it must be that
c̄ = 0.

(b) (5 points) Suggest a method for constructing an integer optimal solution, without solving the prob-
lem from scratch. (Hint: Look at the cycles having all arcs carrying a positive flow, and try to
change the flow on these cycles.)

Solution: Consider a cycle with every arc on the cycle carrying a positive flow. We have
proved that the cost of the cycle is 0. Choose an orientation for the cycle such that we have
at least a backward arc. We now push a positive amount of flow along the cycle, until the
first backward arc becomes 0. At this point, we have obtained a feasible solution of the same
cost (hence optimal). The number of arcs with positive cost has decreased by at least one. We
repeat this procedure we get to the point where there is no cycle such that every arc on the
cycle carries a positive flow. Then, reasoning as in (a), we have a basic feasible solution, and
by Theorem 7.5 this basic feasible solution must be integer.

Page 7 of 7

You might also like