Graph Theory · Discrete Mathematics
86 questions · asked in 25 of 27 years (2000–2026)
MCQ 59 · MSQ 9 · NAT 181-mark 55 · 2-mark 31
2000Questions per year2026
Questions 21–25 of 86
Let G be a graph with 100! vertices, with each vertex labelled by a distinct permutation of the numbers 1,2,...,100. There is an edge between vertices u and v if and only if the label of u can be obtained by swapping two adjacent numbers in the label of v. Let y denote the degree of a vertex in G, and z denote the number of connected components in G. Then, y+ 10z = _____.
Answer: 109
Let us check each part:
- Degree: a permutation of 100 numbers has 99 adjacent pairs that can be swapped y = 99.
- Swapping adjacent numbers can reach every permutation (as in bubble sort), so the graph is connected z = 1.
y + 10z = 99 + 10 = 109
Answer: 109
- Degree: a permutation of 100 numbers has 99 adjacent pairs that can be swapped y = 99.
- Swapping adjacent numbers can reach every permutation (as in bubble sort), so the graph is connected z = 1.
y + 10z = 99 + 10 = 109
Answer: 109
Let T be a tree with 10 vertices. The sum of the degrees of all the vertices in T is _________.
Answer: 18
A tree that has 10 vertices has 9 edges. The sum of all degrees is 2 the number of edges, which gives 18.
Answer: 18
Answer: 18
The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph below?
Answer: (D)
In BFS, all neighbours of the start vertex are visited first, then the vertices next to them, and so on. The edges are M-N, M-Q, M-R, N-O, N-Q, O-Q, O-P, Q-P.
(A) MNOPQR: the start is M, whose neighbours are N, Q, R. The third vertex, O, is not a neighbour of M, while Q and R are still unvisited. Not BFS.
(B) NQMPOR: the start is N, whose neighbours are M, O, Q. P comes fourth, but O (a neighbour of N) is still unvisited. Not BFS.
(C) QMNROP: the start is Q, whose neighbours are M, N, O, P. R comes fourth, but O and P (neighbours of Q) are still unvisited. Not BFS.
(D) POQNMR: the start is P, whose neighbours are O and Q, visited next. The new neighbour of O is N, and the new neighbour of Q is M. Then M adds R. This order is a valid BFS.
Answer: (D)
(A) MNOPQR: the start is M, whose neighbours are N, Q, R. The third vertex, O, is not a neighbour of M, while Q and R are still unvisited. Not BFS.
(B) NQMPOR: the start is N, whose neighbours are M, O, Q. P comes fourth, but O (a neighbour of N) is still unvisited. Not BFS.
(C) QMNROP: the start is Q, whose neighbours are M, N, O, P. R comes fourth, but O and P (neighbours of Q) are still unvisited. Not BFS.
(D) POQNMR: the start is P, whose neighbours are O and Q, visited next. The new neighbour of O is N, and the new neighbour of Q is M. Then M adds R. This order is a valid BFS.
Answer: (D)
G is undirected graph with n vertices and 25 edges such that each vertex of G has degree at least 3. Then the maximum possible value of n is ___________.
Answer: 16
The degrees add up to . Each vertex has degree at least 3, so , which gives . As is a whole number, .
16 can be reached: take a cycle on 16 vertices and join vertex to vertex for . This has edges and every degree is 3. Add one edge between two non-adjacent vertices, such as 0 and 2. Now there are 25 edges, 14 vertices of degree 3 and 2 of degree 4 (sum ).
Answer: 16
16 can be reached: take a cycle on 16 vertices and join vertex to vertex for . This has edges and every degree is 3. Add one edge between two non-adjacent vertices, such as 0 and 2. Now there are 25 edges, 14 vertices of degree 3 and 2 of degree 4 (sum ).
Answer: 16
Consider the following directed graph:
The number of different topological orderings of the vertices of the graph is
The number of different topological orderings of the vertices of the graph is
Answer: 6
Vertex a has to be first, and vertex f has to be last. Between them, b has to come before c, and d has to come before e. The two chains do not depend on each other.
Ways to merge the order b c with the order d e = .
Answer: 6
Ways to merge the order b c with the order d e = .
Answer: 6
Keep practising