Engineering Questions with Answers - Multiple Choice Questions
Data Structure MCQ – Undirected Graph
The number of possible undirected graphs which may have self loops but no multiple edges and have n vertices is ________
Explanation: There can be at most, n*n edges in an undirected graph.
Given a plane graph, G having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?
Explanation: Euler’s Identity says V – E + R = 1+ number of connected components.
Number of vertices with odd degrees in a graph having a eulerian walk is ________
b) Can’t be predicted
d) either 0 or 2
Explanation: If the start and end vertices for the path are same the answer would be 0 otherwise 2.
How many of the following statements are correct?
i) All cyclic graphs are complete graphs.
ii) All complete graphs are cyclic graphs.
iii) All paths are bipartite.
iv) All cyclic graphs are bipartite.
v) There are cyclic graphs which are complete.
Explanation: Statements iii) and v) are correct.
All paths and cyclic graphs are bipartite graphs.
Explanation: Only paths and even cycles are bipartite graphs.
What is the number of vertices of degree 2 in a path graph having n vertices,here n>2.
Explanation: Only the first and the last vertex would have degree 1, others would be of degree 2.
All trees with n vertices consists of n-1 edges.
Explanation: A trees is acyclic in nature.
What would the time complexity to check if an undirected graph with V vertices and E edges is Bipartite or not given its adjacency matrix?
Explanation: A graph can be checked for being Bipartite by seeing if it is 2-colorable or not, which can be obtained with the help of BFS.