1/10
Practice questions covering graph definitions, searching complexities, adjacency matrices, degrees of nodes, spanning trees, and traversal algorithms based on the lecture notes.
What is an adjacency matrix in the context of a graph?
A square matrix used to represent a finite graph, where the elements indicate whether pairs of vertices are adjacent or not.
In a graph, how are adjacent nodes defined?
Two nodes are considered adjacent if there is an edge connecting them directly.
Define the process of Searching.
Searching is the process of locating a specific element or value within a data structure.
What is the time complexity of a Linear search?
The time complexity of a Linear search is O(n). outdoor
What is the time complexity of a Binary search?
The time complexity of a Binary search is O(log(n)), which is more efficient than linear search for sorted data.
Given the specification V(G)={1,2,3,4} and E(G)={(1,2),(1,3),(3,3),(3,4),(4,1)}, what is the adjacency matrix for this undirected graph?
A 4×4 matrix where entries are 1 if an edge exists between nodes i and j (treating (3,3) as a self-loop) and 0 otherwise.
What is the difference between a directed graph and an undirected graph?
In a directed graph, edges have a specific direction (arcs), whereas in an undirected graph, edges have no direction and represent a bidirectional relationship.
How do you determine the in-degree and out-degree of a node in a directed graph?
In-degree is the number of edges coming into a node, while out-degree is the number of edges leaving a node.
What is a spanning tree?
A spanning tree is a subset of graph G that includes all the vertices of G and is a tree, meaning it is connected and has no cycles.
What is the objective of an algorithm used to find a minimum cost-spanning tree?
To find a spanning tree where the sum of the weights of the edges is minimized.
What do the acronyms BFS and DFS represent in graph traversal?
BFS stands for Breadth-First Search and DFS stands for Depth-First Search.