Unformatted text preview: might be two kinds of edges: i.e., it might be useful to “label” the edges. As usual, feel free to ignore this hint and come up with an algorithm from scratch.) 3. (15 points ) Exercise 8 in Chapter 3. 4. ( Do NOT turn this problem in ) Given a directed graph G = ( V,E ), a vertex s ∈ V is called a sink if there are incoming edges from every other vertex to s but no outgoing edge from s , i.e. { ( u,s ) ∈ E } =  V  1 and { ( s,u ) ∈ E } = 0. • As a warmup present an O ( n 2 ) algorithm to ﬁnd out if G has a sink and if so, to output it. (Recall that n =  V  ). • Now present an O ( n ) time algorithm for the same problem. 1...
View
Full Document
 Fall '11
 RUDRA
 Graph Theory, Algorithm Analysis and Design, general homework policies

Click to edit the document details