In the context of Breadth-First Search (BFS), what does it mean for a node to be at 'level i' from the starting node?
The node is at a distance of 'i' edges away from the starting node.
The node has a priority value of 'i' in the BFS traversal order.
The node is the i-th node discovered by the BFS algorithm.
The node has 'i' neighbors in the graph.
Which of the following is an advantage of using an adjacency matrix representation for a graph?
Faster to find all neighbors of a vertex.
Efficient for sparse graphs.
Constant time edge existence check.
Less memory usage for large graphs.
Which data structure is most efficient for checking if an edge exists between two vertices in a sparse graph?
Linked List
Adjacency Matrix
Adjacency List
Queue
Which of the following graph traversal algorithms is generally more suitable for finding the shortest path in an unweighted graph?
Neither DFS nor BFS can find shortest paths in unweighted graphs.
Depth-First Search (DFS)
Breadth-First Search (BFS)
Both DFS and BFS are equally suitable.
Which graph traversal algorithm uses a queue to visit vertices?
Breadth First Search (BFS)
Dijkstra's Algorithm
Depth First Search (DFS)
Bellman-Ford Algorithm
In a directed graph, if vertex A has an outgoing edge to vertex B, then:
There must be an edge from vertex B to vertex A.
Vertex A is adjacent to vertex B.
Vertex B is adjacent to vertex A.
Vertex A and B have the same degree.
Which of these scenarios is BEST represented using a weighted graph?
Modeling the flow of information in a computer network.
Storing the friendship relations between people on a social media platform.
Finding the shortest path between two cities on a road network with distances.
Representing the hierarchical structure of a company.
What is the degree of a vertex in a graph?
The total number of vertices in the graph.
The number of self-loops on that vertex.
The number of edges connected to that vertex.
The length of the longest path starting from that vertex.
Which of the following is NOT a characteristic of a bipartite graph?
Edges can only connect vertices from different sets.
It can have an odd-length cycle.
Vertices can be divided into two disjoint sets.
It can be used to model matching problems.
Which traversal algorithm is best suited for detecting cycles in a graph?
Kruskal's Algorithm
Prim's Algorithm