CSC C73 Midterm Exam
Oct 29, 2004
NAME:
0L lbw/7
When you are asked to justify your answer, it means that you must explain why your answe
true.
Calculators are not permitted (nor would they be useful).
This is a closed book exam.
Ask an invigilator
Computer Science C73
Scarborough Campus
Fall 2016
University of Toronto
Algorithm to find the closest pair of points
Vassos Hadzilacos
Let P be the set of p
coordinates of n points on the plane. For any pair of points p = (x, y) and
q = (x , y ), let d(p,
Computer Science C73
Scarborough Campus
Fall 2015
University of Toronto
Proof of Flow Theorem
Vassos Hadzilacos
Let F = (G, s, t, c) be a flow graph, where G = (V, E). The theorem below relates the value of an
arbitrary flow f in F to the traffic on the e
Computer Science B36
Scarborough Campus
Fall 2015
University of Toronto
The cut property of
Minimum Spanning Trees
Vassos Hadzilacos
In this handout we use graph to mean undirected, connected graph, and tree to mean free tree
(i.e., an undirected, connect
Computer Science B36
Scarborough Campus
Fall 2014
University of Toronto
Running time of
Kruskals and Prims algorithms
for minimum spanning trees
Vassos Hadzilacos
Let G = (V, E) be an undirected, connected graph, and w(u, v) be an edge weight function, wh
Computer Science B36
Scarborough Campus
Fall 2016
University of Toronto
Dijkstras shortest paths algorithm
Vassos Hadzilacos
Shown below is pseudocode for Dijkstras algorithm. The input is a directed graph G = (V, E) with nonnegative edge weights wt(u, v)
Mengers theorem
Vassos Hadzilacos
University of Toronto
November 2013
Mengers Theorem. Let G = (V, E) be a digraph and s, t V . The maximum number of edge-disjoint
s t paths in G is equal to the minimum number of edges whose removal from G disconnects s a
Computer Science B36
Scarborough Campus
Fall 2016
University of Toronto
Fractional knapsack
Vassos Hadzilacos
A thief breaks into a store holding a knapsack that can carry up to a maximum weight W > 0. The store
contains items 1, 2, . . . , n, where item
Computer Science C73
Scarborough Campus
November 9, 2010
University of Toronto
Homework Assignment #4
Due: November 30, 2010, by 10:30 am
(in the drop box for your CSCC73 tutorial section, near room SW-626A)
Appended to this document is a cover page for y
Computer Science C73
Scarborough Campus
September 14, 2016
University of Toronto
Homework Assignment #2
(worth 6% of the course grade)
Due: September 23, 2016, by 5 pm
You must submit your assignment as a PDF file through the MarkUs system by logging in
Computer Science B36
Scarborough Campus
Fall 2016
University of Toronto
Correctness and running time of
Huffmans algorithm
Vassos Hadzilacos
We prove the correctness of Huffmans algorithm by induction on the number of symbols n in the
alphabet.
The base c