A graph is said to be __________ if there is a path from any vertex to any other vertex.
Disconnected
Connected
Complete
Bipartite
What is a cycle in a graph?
The longest path between any two vertices.
A path that starts and ends at the same vertex.
A vertex with a degree of 1.
A graph that is not connected.
Consider a graph where you want to find if a path exists between two given nodes. Which traversal algorithm would be generally more efficient for this task?
Both DFS and BFS have the same efficiency for this task.
Breadth-First Search (BFS)
Neither DFS nor BFS can determine if a path exists between two nodes.
Depth-First Search (DFS)
In an undirected graph with 5 vertices, what is the maximum number of edges you can add without creating a cycle?
6
4
5
10
Which of the following graph algorithms is best suited for finding the shortest path in a weighted graph?
Dijkstra's Algorithm
Breadth-First Search
Depth-First Search
Topological Sort
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 the i-th node discovered by the BFS algorithm.
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 has 'i' neighbors in the graph.
Which graph traversal algorithm uses a queue to visit vertices?
Breadth First Search (BFS)
Depth First Search (DFS)
Bellman-Ford Algorithm
If every vertex in a graph has an even degree, what can we conclude about the graph?
It must be bipartite.
It must be directed.
It must have an Eulerian cycle.
It must be a tree.
A cycle in a graph that is not a simple cycle (visits a vertex more than once) is called a:
Path
Circuit
Trail
Closed Walk
Adding an edge between two vertices in an undirected graph always:
Increases the number of connected components.
May increase or decrease the number of connected components.
Creates a cycle.
Decreases the number of connected components.