Q1
Which graph representation is generally preferred for sparse graphs due to its space efficiency?
- Adjacency Matrix
- Incident Matrix
- Adjacency List
- Incidence List
Q2
What data structure is typically used to implement Breadth-First Search in a graph?
- Stack
- Queue
- Priority Queue
- Heap
Q3
Which of the following algorithms can be used to detect cycles in a directed graph?
- Dijkstra's Algorithm
- Prim's Algorithm
- Topological Sorting
- Bellman-Ford Algorithm
Q4
Dijkstra's algorithm finds the shortest path from a single source to all other vertices. What key property must the edge weights have for Dijkstra's algorithm to work correctly?
- Must be negative
- Must be positive
- Must be non-negative
- Can be any value
Q5
Which algorithm is used to find the minimum spanning tree of a weighted, undirected graph?
- Bellman-Ford Algorithm
- Depth-First Search
- Kruskal's Algorithm
- Breadth-First Search
Q6
Which of the following algorithms can handle graphs with negative edge weights and detect negative cycles?
- Dijkstra’s algorithm
- Prim's algorithm
- Bellman-Ford Algorithm
- Kruskal’s algorithm
Q7
In a directed graph, what is a strongly connected component?
- A subgraph with no cycles
- A subgraph where every vertex is reachable from every other vertex
- A subgraph with a single source node
- A subgraph with a single sink node
Q8
Which of these real-world applications makes use of graph algorithms to calculate efficient routes?
- Social media platforms
- Database management systems
- Navigation systems
- Operating systems
Q9
What is the time complexity of Depth-First Search for a graph represented using an adjacency list, where V is the number of vertices and E is the number of edges?
- O(V)
- O(E)
- O(V + E)
- O(V * E)
Q10
Which algorithm is commonly used to perform topological sorting on a directed acyclic graph?
- Dijkstra's Algorithm
- Bellman-Ford Algorithm
- Depth-First Search
- Breadth-First Search
Q11
In graph theory, what is the definition of a 'cut'?
- A path that visits every vertex exactly once
- A path that visits every edge exactly once
- A partition of the vertices of a graph into two disjoint sets
- A cycle that includes all vertices
Q12
Which of the following describes Prim's algorithm's approach to finding a minimum spanning tree?
- Starts with a set of isolated vertices and iteratively adds edges with minimum weight.
- Starts with all edges and iteratively removes the edge with highest weight.
- Randomly selects edges until a spanning tree is formed.
- Always selects the edge connected to the starting node.
Q13
What distinguishes a directed graph from an undirected graph?
- Directed graphs have no edges.
- The edges in a directed graph have a specific direction, while edges in an undirected graph do not.
- Undirected graphs have no cycles.
- Directed graphs can have more than one edge between two vertices.
Q14
What is the primary advantage of using an adjacency matrix representation for a graph?
- Space efficiency for sparse graphs
- Easy to iterate through all edges
- Fast lookup of the existence of an edge between two vertices
- Simple implementation of DFS
Q15
Which algorithm is used to determine whether a graph is bipartite?
- Dijkstra's
- Kruskal's
- Breadth-First Search
- Depth-First Search