Removing a vertex from a graph also requires you to remove:
The vertex with the highest degree.
All cycles in the graph.
All edges connected to it.
All vertices connected to it.
Which type of graph is MOST suitable for representing a one-way system on a city map?
Tree
Directed Graph
Undirected Graph
Weighted Graph
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?
Depth-First Search (DFS)
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.
Which data structure is most efficient for checking if an edge exists between two vertices in a sparse graph?
Adjacency List
Adjacency Matrix
Queue
Linked List
What is the time complexity of performing a Breadth-First Search on a graph with 'V' vertices and 'E' edges?
O(E)
O(V + E)
O(V)
O(V * E)
In a connected graph, a path that visits every edge exactly once is known as:
Eulerian Path
Critical Path
Hamiltonian Path
Shortest Path
What does a '1' represent in an adjacency matrix of an undirected graph?
The degree of the vertex.
The weight of the edge.
The direction of the edge.
The presence of an edge between two vertices.
A cycle in a graph that is not a simple cycle (visits a vertex more than once) is called a:
Path
Closed Walk
Trail
Circuit
Which of these scenarios is BEST represented using a weighted graph?
Storing the friendship relations between people on a social media platform.
Modeling the flow of information in a computer network.
Finding the shortest path between two cities on a road network with distances.
Representing the hierarchical structure of a company.
In a social network represented as a graph, what does the degree of a vertex signify?
The user's influence score.
The number of groups the user belongs to.
The number of friends or connections a user has.
The user's privacy settings.