UMBC CMSC441, Design & Analysis of Algorithms, Fall 2014
Due Thursday, October 23, 2014
- Dead end removal.
Let's define the dead ends in a directed graph to be those
vertices with out-degree 0.
Suppose that you are given a directed graph G = (V, E) as
an adjacency list.
Describe the fastest algorithm that you can to identify and remove all
dead ends from G. When a vertex v is removed, all of the
edges incident of v must also be removed.
The result of your algorithm should be an adjacency
list data structure for the new graph G'. (Note: G' itself
may have dead ends, but you do not have to worry about this.)
- Universal sink.
Exercise 22.1-6, page 593.
- Not a BFS tree.
Exercise 22.2-6, page 602.
16 Oct 2014 10:44:36 EDT
to Fall 2014 CMSC 441 Section 2 Homepage