Which of the following graph properties can be determined using BFS in time?
GATE CSE · Algorithms
Master topic for Graph Traversal. Includes Breadth First Search (BFS), Depth First Search (DFS), Topological Sorting.
152 questions · 0 PYQs · 20 AI practice · GATE CSE 2027
Which of the following graph properties can be determined using BFS in time?
DFS traversal order depends on:
Consider an unweighted undirected graph G with 6 vertices {1, 2, 3, 4, 5, 6} and edges: (1,2), (1,3), (2,4), (2,5), (3,5), (3,6). A Breadth-First Search (BFS) is performed starting from vertex 1. If, during the BFS, neighbors are enqueued in increasing order of their vertex labels, which of the following sequences represents a valid BFS traversal?
Breadth First Search (BFS) on a graph with vertices and edges uses which data structure to track the order of vertex exploration?
Which of the following statements about topological sorting are TRUE?
Topological sorting of a Directed Acyclic Graph (DAG) using DFS is based on which of the following principles?
Which of the following statements about the rank in Union-Find with union by rank are TRUE?
Which of the following problems can be solved efficiently using Union-Find?
Consider BFS on the following graph starting from vertex . Vertices: . Edges: . What is the shortest path distance from to ?
Consider a sequence of n-1 UNION operations and m FIND operations on n elements using Union-Find with union by rank and path compression. Which of the following correctly summarizes the total time complexity?
Consider a graph with vertices and edges. The number of connected components found by running BFS from every unvisited vertex is . How many total edges does the BFS forest (union of all BFS trees) contain?
Consider a directed graph G = (V, E). Depth First Search (DFS) is performed on G starting from vertex s. Which of the following statements about DFS traversal is correct?
BFS starting from vertex in an unweighted graph computes the shortest path distance from to all reachable vertices. Why does BFS guarantee shortest paths in unweighted graphs?
An unweighted, undirected graph G has N vertices and M edges. A BFS algorithm is typically implemented using an adjacency list representation. If the graph is represented by an adjacency matrix instead, how would the worst-case time complexity of BFS change, assuming N is large?
Consider performing the following sequence on a Union-Find structure with 6 elements {1,...,6} using union by rank with path compression. Operations: UNION(1,2), UNION(3,4), UNION(5,6), UNION(1,3), UNION(1,5), FIND(6). After FIND(6) with path compression, what is parent[6]?
The time complexity of topological sorting using DFS on a graph with V vertices and E edges is:
The inverse Ackermann function α(n) used in the complexity analysis of Union-Find is practically considered constant. Which of the following best describes α(n)?
The BFS tree of a graph rooted at source has the property that for every vertex in the tree, represents the shortest path distance from to in the original graph. Which of the following are TRUE about the BFS tree?
In the iterative implementation of DFS using an explicit stack, which of the following issues may arise compared to the recursive implementation?
In Kosaraju's algorithm for finding Strongly Connected Components (SCCs), DFS is performed twice. Which of the following correctly describes the two phases?
Want unlimited AI-generated Graph Traversal questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →