A cycle in a graph that is not a simple cycle (visits a vertex more than once) is called a:
Closed Walk
Trail
Path
Circuit
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
Which type of graph is MOST suitable for representing a one-way system on a city map?
Tree
Weighted Graph
Undirected Graph
Directed 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.
How does the iterative implementation of Depth-First Search (DFS) typically differ from its recursive counterpart?
The iterative approach uses a stack to mimic the function call stack used in recursion.
The iterative approach is not suitable for traversing graphs with cycles.
The iterative and recursive approaches produce fundamentally different traversal orders.
The iterative approach is generally less efficient in terms of space complexity than recursion.
Which algorithm is typically used to find the shortest path in a weighted graph where edge weights are non-negative?
Breadth First Search (BFS)
Bellman-Ford Algorithm
Dijkstra's Algorithm
Depth First Search (DFS)
Which of the following statements accurately describes a key difference between Depth-First Search (DFS) and Breadth-First Search (BFS)?
DFS is always more efficient than BFS in terms of time complexity.
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.
In a connected graph, a path that visits every edge exactly once is known as:
Critical Path
Hamiltonian Path
Eulerian Path
Shortest Path
Which data structure is most efficient for checking if an edge exists between two vertices in a sparse graph?
Adjacency Matrix
Adjacency List
Queue
Linked List
Removing a vertex from a graph also requires you to remove:
The vertex with the highest degree.
All edges connected to it.
All cycles in the graph.
All vertices connected to it.