CO 351: Network Flows
Solutions to Practice Questions for the Prerequisite-Quiz
Problem 1: Simplex Method
(10 marks)
Solve the following linear program (LP) using the simplex method. For the initial basis, use the basis formed
by the slack variables (adde

CO 351: Network Flows
Solutions to Midterm Practice Questions
Problem 1: Dijkstra and Bellman-Ford algorithms
(20 marks)
(a) Use Dijkstras algorithm to compute a tree of shortest dipaths rooted at node 1 in the instance
shown below. The number labeling an

UNIVERSITY OF WATERLOO
CO 351: Network Flows
Midterm Examination FALL TERM 2014
Wednesday, October 15, 2014, 5-7 PM (conict time 7-9 PM)
CLOSED BOOK
Surname:
First Name:
Signature:
ID#:
INSTRUCTIONS:
1. Write your name and Student ID# in the blanks above.

CO 351: Midterm Solutions
Q1. Let D = (N, A) be a digraph with distinct nodes s, t and weights w RA . Let P be an
st-dipath of D.
(a) Let y RN . What does it mean for y to be a vector of feasible potentials?
Solution: It means that, for every uv A, yu + w

CO 351: Review Session
July 29, 2014
1
Modelling
Q1. Tom is in charge of processing the garbage of the city of Waterloo for the next n days. For
each day j, dj units of garbage are generated by the citizens of Waterloo. He can handle
each unit of garbage

CO 351 Network Flows, Final Exam, Winter 2007
Page 1
UNIVERSITY OF WATERLOO FINAL EXAMINATION WINTER TERM 2007
Surname: First Name: Id.#:
Course Number Course Title Instructor
CO 351 Network Flows J. K nemann o
Date of Exam Time Period Number of Exam Page

Surname:
First Name:
Id.#:
0&0 351 Network Flow Theory
Final Examination
August 13, 1998
2:00 - 5:00 pm. (3 hours)
Instructor: Joseph Cheriyan
INSTRUCTIONS: '
1. Write your name and Id.# in the blanks above.
2. No calculating aids are allowed.
3.

t u u
2(D
h~
h
h
h
t q
p
o
~
t o
fh(u
k t
T6T#
r o u o t s q o t u t o t t q t o u t t r t o u t o t t o
h#h2TTT#m#hf(#h(#2@R6h|mpfh(h$hbhhk
k t o r t r k r t r u q o t u
hTh#@H#!#hh(d(k ~
v cfw_ z x v
pD b4 X|!ywD 4
ut s r q o n k k j i

UNIVERSITY OF WATERLOO
CO 351: Network Flows
Prerequisite Quiz FALL TERM 2014
Monday Sep 22, 2014, 5-6:15 PM (conict time 6:15-7:30 PM)
CLOSED BOOK
Surname:
First Name:
Signature:
ID#:
INSTRUCTIONS:
1. Write your name and Student ID# in the blanks above.

CO 351: Assignment 6 Solutions
Q1. Consider the digraph below, where arc labels are (c, w) and node labels are b. In A5, Q4,
we found a ow for this instance. Suppose you found the ow given as follows:
xab = 2, xac = 7, xbc = 1, xda = 4, xdc = 1, xde = 1,

CO 351: Assignment 2
Due Thursday, June 5, in class
Q1. Let D = (N, A) be a digraph with node s N , where all nodes can be reached from s. Take
arbitrary weights w RA and feasible potentials y RN . The reduced weights w RA are
dened as follows:
wuv = wuv

CO 351: Assignment 4 Solutions
Q1. The table below gives data for four soccer teams. For each team, the second column gives
the number of games won already, the third column gives the number of games remaining
to be played, and the last four columns give

CO 351: Assignment 5 Solutions
Q1. The gure below shows a partitioning of an underground region into blocks i = 1, . . . , 9
where each block i is assigned a net prot wi . A set of blocks P is called a feasible pit if all
blocks vertically above a block i

CO 351: Assignment 3 Solutions
Q1. The gure below shows an instance of the maximum st-ow problem where each arc is
labeled by its capacity.
1
a
c
2
2
2
1
s
t
1
2
1
b
1
d
Run the Ford-Fulkerson algorithm on this instance to nd a maximum st-ow and a minimum

CO 351: Assignment 1 Solutions
Q1. Let D = (N, A) be a digraph with distinct nodes s, t. Color every arc of D red or blue.
Prove that exactly one of the following holds:
(i) there exists a blue st-dipath (whose arcs are all colored blue),
(ii) there exist

CO 351: Assignment 0 Solutions
Q1. (a) Let w be a vector in Rn , A an m n matrix, and b a vector in Rm . Write down the
dual (D) of the following linear program (LP):
min w x
s.t.
(P)
Ax = b
x 0.
Solution: The dual objective is to maximize b y over vector

g mr mr
cW)sy#c
r e
s
g e m
sqW
g r
Qy!EQ!Woqvqq!Qp7cx!
g r i m g e fn j sn sn f g r i g m r g m g j
0
)WvvavQz$IzWQvsh&%cv7!t shW1sWQ
0
(
IvvcWs%WIsh&svEc vsh&NULLvtvQzs yW
QQqcU|cUcU!#p)QoQh!ck W
g e r g m r f n r m g j e s r f m e r r
EQ