Practice Final Exam: AX UT
Practice Final Exam: AX UT
0 Name 1 15
1 True or False 44 11
2 P, NP & Friends 10 1
3 Taming M AX -C UT 10 3
4 Spy Games 10 2
Total 120
Name:
6.046J/18.410J Practice Final Exam Name 2
Problem 0. Name. [1 point] Write your name on every page of this exam booklet! Don’t forget
the cover.
(b) T F [4 points] Let G = (V, E) be a flow network, i.e., a weighted directed graph
with a distinguished source vertex s, a sink vertex t, and non-negative capacity
c(u, v) for every edge (u, v) in E. Suppose you find an s-t cut C which has edges
e1 , e2 , . . . , ek and a capacity f . Suppose the value of the maximum s-t flow in G
is f .
Now let H be the flow network obtained by adding 1 to the capacity of each edge
in C. Then the value of the maximum s-t flow in H is f + k.
6.046J/18.410J Practice Final Exam Name 3
(g) T F [4 points] Suppose that a randomized algorithm A has expected running time
Θ(n2 ) on any input of size n. Then it is possible for some execution of A to take
Ω(3n ) time.
(j) T F [4 points] Suppose that you have two deterministic online algorithms, A1 and
A2 , with a competitive ratios c1 and c2 respectively. Consider the randomized
algorithm A∗ that flips a fair coin once at the beginning; if the coin comes up
heads, it runs A1 from then on; if the coin comes up tails, it runs A2 from then
on. Then the expected competitive ratio of A∗ is at least min{c1 , c2 }.
6.046J/18.410J Practice Final Exam Name 7
Problem 2. Taming Max-Cut [10 points] A C UT, in a graph G = (V, E), is a partition of V into
two non-intersecting sets A, B. An edge is said to be in the cut if one of its end points is in A and
the other is in B. In the M AX -C UT problem, the objective is to maximize the number of edges
in the cut. We intend to design an approximation scheme for M AX -C UT. Consider the following
scheme. Every vertex v ∈ V is assigned to A, B uniformly at random.
(c) Conclude that the randomized scheme presented above is a 2-approximation to the
M AX -C UT.
Problem 3. Lots of Spanning Trees. (5 parts) [25 points] Let G = (V, E) be a connected
R
undirected graph with edge-weight function w : E → . Let wmin and wmax denote the minimum
and maximum weights, respectively, of the edges in the graph. Do not assume that the edge weights
in G are distinct or nonnegative. The following statements may or may not be correct. In each case,
either prove the statement is correct or give a counterexample if it is incorrect.
(a) If the graph G has more than |V | − 1 edges and there is a unique edge having the
largest weight wmax , then this edge cannot be part of any minimum spanning tree.
6.046J/18.410J Practice Final Exam Name 9
(b) Any edge e with weight wmin , must be part of some MST.
(c) If G has a cycle and there is unique edge e which has the minimum weight on this
cycle, then e must be part of every MST.
6.046J/18.410J Practice Final Exam Name 10
(d) If the edge e is not part of any MST of G, then it must be the maximum weight edge
on some cycle in G.
(e) Suppose the edge weights are nonnegative. Then the shortest path between two ver-
tices must be part of some MST.
6.046J/18.410J Practice Final Exam Name 11
Problem 4. Traveling with the salesman. [20 points] In the traveling-salesman problem, a
salesman must visit n cities. Modeling the problem as a complete graph on n vertices, we can say
that the salesman wishes to make a tour or a hamiltonian cycle, visiting each city exactly only
once and finishing at the city he starts from. The salesman incurs a nonnegative integer cost c(i, j)
to travel from city i to city j, and the salesman wishes to make a tour whose total cost is minimum,
where the total cost is the sum of the individual costs along the edges of the tour.
TSP =
(c) Assuming that H AM -C YCLE is complete for the class NP, prove that TSP is NP-
Complete.
SCRATCH PAPER
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.