Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

8. Consider the following graph. Which edges, and in which order, are selected b

ID: 666433 • Letter: 8

Question

8. Consider the following graph. Which edges, and in which order, are selected by Prim?s algorithm if it stars at vertex 1? (A) (1,3), (3,7), (2,7), (3,6), (1,4), (3,5) (B) (1,3), (3,7), (2,7), (7,6), (1,4), (3,5) (C) (1,3), (2,7), (3,7), (3,5), (7,6), (1,4) (D) (1,3), (2,7), (3,7), (1,4), (3,6), (3,5) (E) (1,3), (3,7), (2,7), (3,5), (7,6), (1,4) 9. Consider the following graph. Which one of the following is a valid ordering of the vertices if the graph is traversed using depth first search (DFS)? (A) 1, 2, 6, 3, 5, 4 (B) 4, 3, 2, 1, 5, 6 (C) 2, 3, 1, 4, 6, 5 (D) 5, 4, 6, 2, 3, 1 (E) 3, 6, 1, 5, 4, 2

Explanation / Answer

8. (A) (1,3), (3,7), (2,7), (3,6), (1,4), (3,5)

9. (E) 3, 6, 1, 5, 4, 2