

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Due at 11:59 pm Mar 27 (Thursday) Name_____________________________ R-7.2 (15 points) R-7.5 (20 points) R-7.6 (20 points) Question A. (15 points) Draw a graph with 5 vertices and 7 edges that is connected but not bi-connected. Question B. (15 points) Bob loves foreign languages and wants to plan his course schedule for the following years. He is interested in the following nine language courses: LA15, LA16, LA22, LA31, LA32, LA126, LA127, LA141, and LA169. The course prerequisites are: LA15: (none) LA16: LA LA22: (none) LA31: LA LA32: LA16, LA LA126: LA22, LA LA127: LA LA141: LA22, LA LA169: LA Find the sequence of courses that allows Bob to satisfy all the prerequisites.Describe your method briefly. Question C. (15 points) Dijkstra’s algorithm computes the shortest distances from a given vertex s to all the other vertices. It grows a cloud of vertices, beginning with s and eventually covering all the vertices. The figure below shows an intermediate step (step i ) of Dijkstra’s algorithm that grows a cloud starting from s. The integers in parenthesis are the distance labels of vertices. The integers along the edges are edge weights. The dashed circle shows the cloud. 1
In step i+1 , the algorithm will pull one vertex into the cloud and update the distance labels. In the graph below, show the result of step i+1 (i.e., show the cloud and fill in the distances).