In an undirected graph with 5 vertices, what is the maximum number of edges possible?
20
10
25
5
In an undirected graph, if the sum of the degrees of all vertices is 30, how many edges are there in the graph?
30
Cannot be determined.
60
15
A cycle in a graph that is not a simple cycle (visits a vertex more than once) is called a:
Closed Walk
Circuit
Trail
Path
What is the time complexity of performing a Breadth-First Search on a graph with 'V' vertices and 'E' edges?
O(V + E)
O(V * E)
O(V)
O(E)
Which of the following statements accurately describes a key difference between Depth-First Search (DFS) and Breadth-First Search (BFS)?
DFS is typically used for finding shortest paths in unweighted graphs, while BFS is used for cycle detection.
DFS explores a path as far as possible before backtracking, while BFS explores all neighbors at the current level before moving to the next level.
DFS uses a queue, while BFS uses a stack for traversal.
DFS is always more efficient than BFS in terms of time complexity.
Which of the following is an advantage of using an adjacency matrix representation for a graph?
Faster to find all neighbors of a vertex.
Constant time edge existence check.
Efficient for sparse graphs.
Less memory usage for large graphs.
Removing a vertex from a graph also requires you to remove:
The vertex with the highest degree.
All cycles in the graph.
All edges connected to it.
All vertices connected to it.
If every vertex in a graph has an even degree, what can we conclude about the graph?
It must be bipartite.
It must be a tree.
It must have an Eulerian cycle.
It must be directed.
What data structure is typically used to implement the core of a Breadth-First Search (BFS) algorithm?
Queue
Linked List
Heap
Stack
Which algorithm is typically used to find the shortest path in a weighted graph where edge weights are non-negative?
Dijkstra's Algorithm
Breadth First Search (BFS)
Depth First Search (DFS)
Bellman-Ford Algorithm