Correct 1 / 1 points 1. Consider a directed graph with distinct and nonnegative edge lengths and a source s vertex . Fix a destination vertex t , and assume that the graph contains at least one s - t path. Which of the following statements are true? [Check all that apply.] The shortest (i.e., minimum-length) s - t path might have as many as n−1 edges, where n is the number of vertices. Correct Response There is a shortest s - t path with no repeated vertices (i.e., a "simple" or "loopless" such path). Correct Response The shortest s - t path must include the minimum-length edge of G . Correct Response The shortest s - t path must exclude the maximum-length edge of G . Correct Response Correct 1 / 1 points 2. Consider a directed graph G=(V,E) and a source vertex s with the following properties: edges that leave the source vertex s have arbitrary (possibly negative) lengths; all other edge lengths are nonnegative; and there are no edges from any other vertex to the s source . Does Dijkstra's shortest-path algorithm correctly compute shortest-path distances (from s ) in this graph? Maybe, maybe not (depends on the graph) Always Correct Response One approach is to see that the proof of correctness from the videos still works. A slicker solution is to notice that adding a positive constant M to all edges incident to s increases the length of every s - v path by exactly M , and thus preserves the shortest path. Only if we add the assumption that G contains no directed cycles with negative total weight. Never Correct 1 / 1 points 3. Suppose you implement the functionality of a priority queue using a sorted array (e.g., from biggest to smallest). What is the worst-case running time of Insert and Extract-Min, respectively? (Assume that you have a large enough array to accommodate the Insertions that you face.) Θ(logn) and Θ(1) Θ(n) and Θ(1) Correct Response Θ(n) and Θ(n) Θ(1) and Θ(n) Correct 1 / 1 points 4. Suppose you implement the functionality of a priority queue using an unsorted array. What is the worst-case running time of Insert and Extract-Min, respectively? (Assume that you have a large enough array to accommodate the Insertions that you face.) Θ(1) and Θ(logn) Θ(1) and Θ(n) Correct Response Θ(n) and Θ(1) Θ(n) and Θ(n) Correct 1 / 1 points 5. You are given a heap with n elements that supports Insert and Extract-Min. Which of the following tasks can you achieve in O(logn) time? None of these. Find the median of the elements stored in the heap. Find the largest element stored in the heap. Find the fifth-smallest element stored in the heap. Correct Response