Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q6: The time complexity to calculate the number of edges in a graph whose information in stored in form of an adjacency matrix is a)
Q6: The time complexity to calculate the number of edges in a graph whose information in stored in form of an adjacency matrix is a) O(V) b) O(E) c) O(E) d) O(V2) Q7: On which of the following statements does the time complexity of checking if an edge exists between two particular vertices is not depends? a) Depends on the number of edges b) Depends on the number of vertices c) Is independent of both the number of edges and vertices d) It depends on both the number of edges and vertices Q8: Space complexity for an adjacency list of an undirected graph having large values of V (vertices) and E (edges) is a) O(E) b) O(V*V) c) O(E + V) d) O(V) Q9: Indicate which, of the following graphs G = (V, E), IVI = 5, is not connected. a) E = {{1, 2}, {1, 2}, {2,3}, {3,4}, {1,5}, {1,5}} b) E = {{4, 5}, {1, 3}, {1, 3}, {2, 3}, {2, 5}, {4, 5}} c) E = {{4, 5}, {1, 3}, {1, 3}, {2,3}, {2,4}, {4, 5}} d) E = {{1, 2}, {2,3}, {1, 2}, {1, 3}, {2, 3}, {4,5}} Q10: Draw the directed graph that corresponds to this adjacency matrix: 0 1 2 3 0 | true false true false 1 | true false false false 2 | false false false true 3 | true false true false Q11: Draw the edge lists that correspond to the graph from the previous question. Q12: Apply Dijkstra's algorithm to find the shortest path from a given vertex to each other vertex in the given graph
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started