hw3 - CS 573: Graduate Algorithms, Fall 2011 HW 3 (due in...

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

View Full Document Right Arrow Icon
CS 573: Graduate Algorithms, Fall 2011 HW 3 (due in class on Tuesday, October 18th) This homework contains five 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 students can work in groups of up to three students each. Only one copy of the homework is to be submitted for each group. Make sure to list all the names/netids clearly on each page. Note on Proofs: Details are important in proofs but so is conciseness. Striking a good balance between them is a skill that is very useful to develop, especially at the graduate level. 1. (20 pts) Given a directed graph G = ( V,E ) and two nodes s,t , an s - t walk is a sequence of nodes s = v 0 ,v 1 ,...,v k = t where ( v i ,v i +1 ) is an edge of G for 0 i < k . Note that a node may be visited multiple times in a walk — this is how it differs from a path. Given G,s,t and an integer k n , design a linear time algorithm to check if there is an s - t walk in G that visits at least k distinct nodes including s and t . Hint: You need to use a linear time algorithm to find all strong connected components of a directed graph. Moreover you need to understand the DAG representation of the strong connected components of a graph. You can assume that you have an algorithm for giving you such a representation. Read Chandra’s CS 473 lecture notes if you are unfamiliar with this. 2. (20 pts) You are given a directed graph G = ( V,E ) where each edge e has a length/cost c e (which may be negative) and you want to find shortest path distances from a given node s to all the nodes in V . The Bellman-Ford algorithm takes O ( nm ) time where n = | V | and m = | E | while Dijkstra’s algorithm can be implemented in
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.

Page1 / 3

hw3 - CS 573: Graduate Algorithms, Fall 2011 HW 3 (due in...

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

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