Problem Set 2
Problem Set 2
Problem Set 2
This problem set is due at 9:00pm on Wednesday, February 22, 2012.
Both exercises and problems should be solved, but only the problems should be turned in.
Exercises are intended to help you master the course material. Even though you should not turn in
the exercise solutions, you are responsible for material covered by the exercises.
Mark the top of the first page of your solution with your name, the course number, the problem
number, your recitation section, the date, and the names of any students with whom you collabo
rated. The homework template (LATEX) is available on the course website.
You will often be called upon to “give an algorithm” to solve a certain problem. Your write-up
should take the form of a short essay. A topic paragraph should summarize the problem you are
solving and what your results are. The body of the essay should provide the following:
2. At least one worked example or diagram to show more precisely how your algorithm works.
Remember, your goal is to communicate. Full credit will be given only to correct solutions that
are described clearly. Convoluted and opaque descriptions will receive lower marks.
(a) Show that if an edge (u, v) is the unique light edge crossing some cut of the connected,
weighted undirected graph G, then (u, v) must be included in all minimum spanning
trees of G.
(b) Suppose that we have a connected, weighted undirected graph G = (V, E) such that
every cut of G has a unique light edge crossing the cut. Show that G has exactly one
In a graph with no duplicate edge weights, there cannot be any ties for the light edge crossing a
cut. As a result, any graph with distinct edge weights will satisfy the requirements for the theorem
in part (b), and will therefore have exactly one minimum spanning tree.
Note that as with minimum spanning trees, there is more than one shortest path tree per graph. In
addition to the variation introduced by the choice of root, it’s possible to get different shortest path
trees even for the same root vertex.
(a) Given any connected undirected graph G with positive edge weights w, does there
always exist a shortest path tree S such that S is a minimum spanning tree of G?
(b) Does there exist some connected undirected graph G with positive edge weights w
such that G has a shortest path tree S and a minimum spanning tree T that do not
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.