hw_1_soln - CS 473 Algorithms Fall 2010 HW 1(due Tuesday...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 473: Algorithms, Fall 2010 HW 1 (due Tuesday, September 7th) This homework contains four problems. Read the instructions for submitting homework on the course webpage . In particular, make sure that you write the solutions for the problems on separate sheets of paper. Write your name and netid on each sheet. Collaboration Policy: For this home work, Problems 2-4 can be worked in groups of up to 3 students each. Problem 1 should be answered in Compass as part of the assessment HW1-Online and should be done individually. 1. (15 pts) Short questions to be answered on compass individually. 2. (10 pts) Let s,t be two nodes in an undirected graph G such that the distance between them (in terms of number of edges) is strictly greater than n/ 2; here n is the number of nodes in G . Show that there is a node v such that all s - t paths contain v . Solution : Consider a BFS-tree rooted at s ; let L s be the layer containing s and let L t be the layer containing t . We know that all paths between s and t are longer than n/ 2 and that the layers in the BFS tree lay out vertices by their distance from s . Therefore we have more than n/ 2 - 1 layers between L s and L t . Since s and t themselves are not in these layers, these layers can contain at most n - 2 vertices. If all of these layers contain at least two vertices, then these layers will contain more than 2( n/ 2 - 1) = n - 2 vertices; this is a contradiction. Therefore some layer between L s and L t contains a single vertex v . All paths between s and t should pass through this layer (it is a BFS-tree), thus they all will pass through v . Rubrik : 2pts: if there is just some proof that shows every two s,t -paths intersect. 5pts: if there is some kind of argument that could be converted into a perfect proof. For example grouping vertices by their distance from s in some fashion. 10pts: if there is a perfect proof. 3. (45 pts) Given a connected undirected graph G = ( V,E ), an edge e = ( u,v ) is called a bridge, or a cut-edge, if removing e disconnects the graph into two pieces, one containing u and the other containing v . A vertex u is called a separating vertex, or cut-vertex, if removing u leaves the graph into two or more disconnected pieces; note that u does not count as one of the pieces in this definition. Your goal in this problem is to develop a linear time algorithm 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
to find all the bridges and cut-vertices of a given graph using DFS. Let T be a DFS tree of G (note that it is rooted at the first node from which DFS is called). For a node v we will use the notation T v to denote the sub-tree of T hanging at v (includes v ). In the graph shown in the figure, identify all the bridges and cut-vertices. A
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2011 for the course CS 473 taught by Professor Chekuri,c during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 8

hw_1_soln - CS 473 Algorithms Fall 2010 HW 1(due Tuesday...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online