What is a cycle in a graph?
A graph that is not connected.
The longest path between any two vertices.
A vertex with a degree of 1.
A path that starts and ends at the same vertex.
Adding an edge between two vertices in an undirected graph always:
Increases the number of connected components.
Creates a cycle.
May increase or decrease the number of connected components.
Decreases the number of connected components.
In a connected graph, a path that visits every edge exactly once is known as:
Critical Path
Hamiltonian Path
Eulerian Path
Shortest Path
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 and B have the same degree.
Vertex B is adjacent to vertex A.
Vertex A is adjacent to vertex B.
In an undirected graph, if the sum of the degrees of all vertices is 30, how many edges are there in the graph?
60
15
30
Cannot be determined.
Which type of graph is MOST suitable for representing a one-way system on a city map?
Weighted Graph
Tree
Directed Graph
Undirected Graph
Which traversal algorithm is best suited for detecting cycles in a graph?
Breadth First Search (BFS)
Kruskal's Algorithm
Prim's Algorithm
Depth First Search (DFS)
Which algorithm is typically used to find the shortest path in a weighted graph where edge weights are non-negative?
Bellman-Ford Algorithm
Dijkstra's Algorithm
A graph where edges have a direction associated with them is called a:
Cyclic Graph
Which data structure is commonly used to represent the order of visited vertices during a Depth-First Search?
Linked List
Heap
Queue
Stack