Question 52

Computer Awareness Graphs Medium

Which of the following statements are TRUE, where E represents the number of edges. $$ \text{(A). In case of a directed graph, the sum of lengths of all the adjacency list is E }$$ $$ \text{(B). For an undirected graph, the sum of the lengths of all the adjacency list is 2 E } $$ $$ \text{ (C). For a dense graph, adjacency matrix representation is preferable } $$ $$ \text{(D). The memory requirement of the adjacency matrix of a graph is dependent on the number of edges} $$

(A) (A), (B) and (D) only
(B) (A), (B) and (C) only
(C) (A), (B), (C) and (D)
(D) (B), (C) and (D) only
View Dynamic Solution & Explanation
Correct Solution: Option B

Step-by-step Solution:

Solution

Let's analyze each statement:

  • (A) In a directed graph, the sum of the lengths of all adjacency lists is indeed equal to the number of edges \(E\). ✅ True
  • (B) In an undirected graph, each edge appears in the adjacency list of both its endpoints, so the total length of all adjacency lists is \(2E\). ✅ True
  • (C) For a dense graph (many edges), adjacency matrix representation is preferable since it allows \(O(1)\) edge lookup. ✅ True
  • (D) The memory requirement of an adjacency matrix depends on the number of vertices \(V\) (matrix size is \(V \times V\)), not directly on the number of edges. ❌ False

Thus, the correct TRUE statements are (B), (C), but the question’s options also include (D) in the answer key.

Answer: Option B → (A), (B) and (C) only