True or False: Adjacency lists are implemented using an array of pointers to linked lists.
TRUE
What is the time complexity to check if an edge (u, v) exists in an Adjacency Matrix?
A. O(n)
B. O(log n)
C. O(1)
D. O(n²)
C. O(1)
True or False: An adjacency matrix for an undirected graph is always symmetric along the main diagonal.
TRUE
In an Adjacency List, the space complexity is proportional to:
A. n²
B. n + m
C. m²
D. n − m
B. n + m
Given the following Adjacency Matrix for a directed graph (A: 010, B: 001, C: 100), what is the out-degree of vertex B (Row 2)?
A. 0
B. 3
C. 1
D. 2
C. 1
A graph with very few edges relative to the number of vertices is called:
A. Sparse
B. Regular
C. Complete
D. Dense
A. Sparse
Given the following Adjacency Matrix for a directed graph (A: 010, B: 001, C: 100), what is the in-degree of vertex A?
A. 2
B. 1
C. 0
D. 3
B. 1
True or False: Removing an edge in an Adjacency List takes O(1) time in the worst case.
FALSE
For a sparse graph, which representation is generally more space-efficient?
A. Incidence Matrix
B. Adjacency Matrix
C. Adjacency List
D. Edge Matrix
C. Adjacency List
A graph where the number of edges is close to n² is called:
A. Acyclic
B. Sparse
C. Dense
D. Bipartite
C. Dense
Fill in the Blanks: In an adjacency matrix M, the entry M{ij} is set to 1 (or true) specifically if vertex i is _____ to vertex j.
adjacent
In an Adjacency Matrix representation of a graph with n vertices, the space complexity is:
A. O(n²)
B. O(log n)
C. O(n)
D. O(n + m)
A. O(n²)
The diagonal entries of an adjacency matrix for a simple graph (no self-loops) are all:
A. 0
B. 1
C. n
D. Undefined
A. 0
Fill in the Blanks: Check if edge (u, v) exists (Matrix) to _____.
O(1)
Fill in the Blanks: Iterate all neighbors of u (List) to _____.
O(degree(u))
Fill in the Blanks: Space Complexity (Matrix) to _____.
O(n^2)
Fill in the Blanks: Space Complexity (List) to _____.
O(n+m)
Fill in the Blanks: Iterate all neighbors of u (Matrix) to _____.
O(n)
In an adjacency matrix M for an unweighted undirected graph, if M₍ᵢⱼ₎ = 1, then:
A. There is no edge between i and j
B. There is an edge between i and j
C. i has degree zero
D. j has degree zero
B. There is an edge between i and j
Fill in the Blanks: Unlike unweighted graphs which use binary values, an adjacency matrix for a weighted graph stores the specific _____ (such as cost, distance, or capacity) in the corresponding matrix cell.
weight