How many undirected graphs (not necessarily connected) can be constructed out of a given set V= {V 1, V 2,…V n} of n vertices ? Group of answer choices 2^(n(n-1)/2) 2^n n(n-l)/2 n! Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph? Adding a vertex in adjacency list representation is easier than adjacency matrix representation. In adjacency list representation, space is saved for sparse graphs. DFS and BSF can be done in O(V + E) time for adjacency list representation. These operations take O(V^2) time in adjacency matrix representation. Here is V and E are number of vertices and edges respectively. All of the above
How many undirected graphs (not necessarily connected) can be constructed out of a given set V= {V 1, V 2,…V n} of n vertices ?
Group of answer choices
2^(n(n-1)/2)
2^n
n(n-l)/2
n!
Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph?
Adding a vertex in adjacency list representation is easier than adjacency matrix representation.
In adjacency list representation, space is saved for sparse graphs.
DFS and BSF can be done in O(V + E) time for adjacency list representation. These operations take O(V^2) time in adjacency matrix representation. Here is V and E are number of vertices and edges respectively.
All of the above
Given the starting vertex A, what is the visit order of the graph shown in Fig. 1 under
the DFS traversal
ABDCFE
ACBDFE
ABCDFE
ADBCEF
Assume you have the adjacency matrix representing a graph. 1 represents a connection while -1 represents a lack of one:
[-1, 1, - 1]
[-1, -1, 1]
[1, -1, -1]
Trending now
This is a popular solution!
Step by step
Solved in 3 steps