This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS648 Randomized Algorithms Semester II, 2007-08. Assignment 3 Due on : 7 March Note : Give complete details of the analysis of your solution. Be very rigorous in providing any mathematical detail in support of your arguments. Also mention the Lemma/Theorem you use. 1. (10) Computing exact distances from partial distance information Consider an undirected unweighted graph G on n vertices. For simplicity, assume that G is connected. We are also given a partial distance matrix M c for some c < 1 : For a pair of vertices i,j , M c [ i,j ] stores exact distance if i and j are separated by distance ≤ cn , otherwise M c stores a symbol # indicating that distance between vertex i and vertex j is greater than cn . Unfortunately, there are Θ( n 2 ) # entries in M c , i.e., for Θ( n 2 ) pairs of vertices, the distance is not known. Design a Monte Carlo algorithm to compute “exact distance” matrix for G in O ( n 2 log n ) time. (Each entry of the distance matrix has to be correct with probability exceeding 1- 1 /n 2 ). Hint : Consider a breadth first search (BFS) tree B v rooted at a vertex v in G . Since the graph is undirected unweighted, B v stores distances from v to all the other vertices (level of a vertex in the BFS tree is its distance from...
View Full Document
This note was uploaded on 11/24/2009 for the course CS CS648 taught by Professor Surenderbaswana during the Spring '08 term at University of Massachusetts Boston.
- Spring '08