UMBC CMSC441, Design & Analysis of Algorithms, Fall 2014

Homework 8

Due Thursday, October 23, 2014

  1. 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.)

  2. Universal sink. Exercise 22.1-6, page 593.

  3. Not a BFS tree. Exercise 22.2-6, page 602.

Last Modified: 16 Oct 2014 10:44:36 EDT by Richard Chang
to Fall 2014 CMSC 441 Section 2 Homepage