Question: If using Adjacency matrix representation for a Graph G=(V, E), which of the following statements is true? The *worst* case time complexity of checking if
If using Adjacency matrix representation for a Graph G=(V, E), which of the following statements is true? The *worst* case time complexity of checking if an edge exists between any two random vertices is some function (i.e. of the order of Big Theta() of ). ***Hint: any two random vertices can be chosen in a total of n choose 2 ways, the highest degree is n-1 and the lowest degree is 0 for any vertex.
1 point
a) O(1), i.e Is independent of both the total number of edges and vertices
b) O(V*V), depends on the quadratic bound on the total number of vertices
c) O (V), i.e. Depends on the number of vertices
d) O(E+V) It depends on both the number of edges and vertices
e) Min(deg(u), deg(v)), where u - highest degree vertex, v - lowest degree vertex
f) O(E), i.e. Depends on the number of edges
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
