

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
Information about quiz 5 for cmsc 132, including the quiz date, format, and covered topics. The topics include threading in java and minimum spanning trees using prim's and kruskal's algorithms. Exercises for each topic, but no solutions are given. University students are encouraged to discuss their answers with tas and instructors during office hours.
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


CMSC 132 Quiz 5 Worksheet
The next quiz of the course will be on Wednesday, November 15 during your lab (discussion) 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 TAs and instructors during office hours.
Thread/Synchronization
to a queue without data races or deadlock.
Minimum Spanning Trees
Using the following graph answers the questions that follow.
When several node choices are available, use alphabetical order to choose a node to process.
a. Generate the minimum spanning tree for the above graph using Prim’s algorithm. Use a as the start vertex.
b. Run Prim’s algorithm using b as the start vertex. Indicate the cost and predecessor for each node in the graph, after three nodes have been added to the set of processed nodes (set S in the lecture slides). You don’t need to draw a tree.
a. Generate the minimum spanning tree for the above graph using Kruskal’s algorithm.
b. Run Kruskal’s algorithm in the above graph and draw the graph we will have after only four edges have been processed.