Which type of graph is MOST suitable for representing a one-way system on a city map?
Tree
Weighted Graph
Directed Graph
Undirected Graph
In an undirected graph with 5 vertices, what is the maximum number of edges possible?
5
25
10
20
Which algorithm is typically used to find the shortest path in a weighted graph where edge weights are non-negative?
Depth First Search (DFS)
Breadth First Search (BFS)
Bellman-Ford Algorithm
Dijkstra's Algorithm
In a connected graph, a path that visits every edge exactly once is known as:
Eulerian Path
Hamiltonian Path
Shortest Path
Critical Path
In an undirected graph with 5 vertices, what is the maximum number of edges you can add without creating a cycle?
6
4
A graph where edges have a direction associated with them is called a:
Cyclic Graph
How does the iterative implementation of Depth-First Search (DFS) typically differ from its recursive counterpart?
The iterative approach is generally less efficient in terms of space complexity than recursion.
The iterative approach is not suitable for traversing graphs with cycles.
The iterative approach uses a stack to mimic the function call stack used in recursion.
The iterative and recursive approaches produce fundamentally different traversal orders.
Which of the following is an advantage of using an adjacency matrix representation for a graph?
Efficient for sparse graphs.
Less memory usage for large graphs.
Faster to find all neighbors of a vertex.
Constant time edge existence check.
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.
Neither DFS nor BFS can determine if a path exists between two nodes.
Depth-First Search (DFS)
Breadth-First Search (BFS)
Which of the following graph traversal algorithms is generally more suitable for finding the shortest path in an unweighted graph?
Both DFS and BFS are equally suitable.
Neither DFS nor BFS can find shortest paths in unweighted graphs.