A Place for Latest Exam wise Questions, Videos, Previous Year Papers, Study Stuff for MCA Examinations - NIMCET
Previous Year Question (PYQs)
2
Which of the following statements are TRUE, where |E| represents the number of edges.
(A). In case of a directed graph, the sum of lengths of all the adjacency list is E
(B). For an undirected graph, the sum of the lengths of all the adjacency list is 2|E|
(C). For a dense graph, adjacency matrix representation is preferable
(D). The memory requirement of the adjacency matrix of a graph is dependent on the number of edges
Choose the correct answer from the options given below:
1. (A), (B) and (D) only
2. (A), (B) and (C) only
3. (A), (B), (C) and (D)
4. (B), (C) and (D) only
Solution
- (A) ✅ True: In a directed graph, each edge appears once in exactly one adjacency list ⇒ total length = \(|E|\).
- (B) ✅ True: In an undirected graph, each edge appears twice (both endpoints) ⇒ total length = \(2|E|\).
- (C) ✅ True: For dense graphs \((|E| \approx \Theta(V^2))\), adjacency matrix is preferable (fast \(O(1)\) lookups, storage \(O(V^2)\)).
- (D) ❌ False: Adjacency matrix memory depends only on \(V^2\), not on \(|E|\).
Final Answer:Option (2) — (A), (B) and (C) only
Online Test Series, Information About Examination, Syllabus, Notification and More.