Return to main page
Design and Analysis of Algorithms
CMSC 441 - Fall 2021
Homework 5
Due: Wednesday, November 17th by 11:59:00 PM EST (on blackboard)
Musical Selection: Le Carnival des Animaux — Camille Saint-Saëns
Respond to the questions below with appropriate responses as directed.
-
(15 points) Show the d and π values for each vertex for running Breadth-First Search on the following
graph starting at node u. Assume that vertices and adjacency lists are stored in alphabetical
order.
-
(20 points) Show the d, f, and π values for running Depth-First Search on the same graph as in
the question above. Make the same assumption as above with regard to vertex and adjacency list ordering.
-
(15 points) Provide a pseudocode implementation for Prim's Algorithm if the graph is stored with an
adjacency matrix rather than with adjacency lists. Your solution must run in O(V2) time.
Some questions adapted from "Introduction to Algorithms" 3rd edition.
Last modified Wednesday, 10-Nov-2021 17:19:34 EST