# hbs1 - CS 473 Algorithms Fall 2009 HBS 1 1 a b c d e f g h...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 473: Algorithms, Fall 2009 HBS 1 1. a b c d e f g h Draw the DFS tree rooted at A for the above graph. Use alphabetic ordering to break ties. Label the vertices of the tree with their pre(v) : post(v) time. Add in the remaining edges of the graph and label them as forward (F), backward (B), and cross (C) edges. Sort the vertices by their post visit order. 2. Let G be a directed graph and G SCC its strong connected component meta-graph (which is a DAG). Prove or disprove the following. For any DFS of G the vertex with smallest post-visit number is in a sink component of G SCC . 3. Let G = ( V,E ) be an undirected graph with n vertices ( | V | = n ) and m edges ( | E | = m ). Give an O ( n ) time algorithm to check if G has at least two distinct cycles and output them if it does. Assume that the graph is represented using adjacency lists. Note that m can be much larger than n so the algorithm should not check all edges. Hint: What is the structure of a minimal connected graph that has two cycles? Use DFS.of a minimal connected graph that has two cycles?...
View Full Document

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

### Page1 / 2

hbs1 - CS 473 Algorithms Fall 2009 HBS 1 1 a b c d e f g h...

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

View Full Document
Ask a homework question - tutors are online