Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Quiz; Class: OBJECT-ORIENTED PROG II; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;
Typology: Quizzes
1 / 1
CMSC 132 Quiz 4 Worksheet
The fourth quiz for the course will be on Wednesday, Nov 8, during your lab session. The following list provides more information about the quiz:
The following exercises cover the material to be included in this quiz. Solutions to these exercises will not be provided, but you are welcome to discuss your solutions with the TA or instructor during office hours.
Exercises
Using the following graph answers the questions that follow. For BFS and DFS pick vertices to process using alphabetical order.
For each of the following exercises, specify the nodes visited after performing the appropriate traversal. When several node choices are available, use alphabetical order to choose a node to process.
a. Run Dijkstra’s algorithm using A as the start vertex. Indicate the cost and predecessor for each node in the graph after completing the algorithm.
b. Run Dijkstra’s algorithm using B as the start vertex. Indicate the cost and predecessor for each node in the graph, after four nodes have been added to the set of processed nodes (set S in the lecture slides).