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 16–20 of 86
In a directed acyclic graph with a source vertex s, the quality-score of a directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex v other than s, the quality-score of v is defined to be the maximum among the quality-scores of all the paths from s to v. The quality-score of s is assumed to be 1.
The sum of the quality-scores of all vertices on the graph shown above is ______
The sum of the quality-scores of all vertices on the graph shown above is ______
Answer: 929
Process the vertices in topological order. For each vertex, keep the largest product of weights reaching it:
- s = 1, c = 1, a = 9
- f = c 9 = 9, and b = a 1 = 9
- d = max(c 1, a 1) = 9
- g = max(f 1, d 9) = 81
- e = max(d 9, b 1) = 81
- t = max(g 1, e 9) = 729
Add all the scores: 1 + 1 + 9 + 9 + 9 + 9 + 81 + 81 + 729 = 929
Answer: 929
- s = 1, c = 1, a = 9
- f = c 9 = 9, and b = a 1 = 9
- d = max(c 1, a 1) = 9
- g = max(f 1, d 9) = 81
- e = max(d 9, b 1) = 81
- t = max(g 1, e 9) = 729
Add all the scores: 1 + 1 + 9 + 9 + 9 + 9 + 81 + 81 + 729 = 929
Answer: 929
Graph G is obtained by adding vertex s to and making s adjacent to every vertex of . The minimum number of colours required to edge-colour G is _______
Answer: 7
Let the sides of be and . The vertex is adjacent to all 7 of them, so . The 7 edges at must get different colours, so at least 7 colours are needed.
7 colours are enough:
- Colour edge with colour . At each the colours 1 to 4 all appear once. At each the three edges get different colours, and the colour is missing.
- Give the three edges the colours 5, 6, 7.
- Give edge the colour missing at . These 4 colours are different for different .
Now the 7 edges at have 7 different colours, each sees 1 to 4 and one of 5 to 7, and each sees all of 1 to 4. So this is a proper edge colouring with 7 colours.
Answer: 7
7 colours are enough:
- Colour edge with colour . At each the colours 1 to 4 all appear once. At each the three edges get different colours, and the colour is missing.
- Give the three edges the colours 5, 6, 7.
- Give edge the colour missing at . These 4 colours are different for different .
Now the 7 edges at have 7 different colours, each sees 1 to 4 and one of 5 to 7, and each sees all of 1 to 4. So this is a proper edge colouring with 7 colours.
Answer: 7
Let G be an undirected complete graph on n vertices, where n2. Then, the number of different Hamiltonian cycles in G is equal to
Answer: (D) or (C)
Choose any one vertex as the starting point. The other n 1 vertices can be placed in (n 1)! different orders. Every cycle gets counted two times, once for each direction.
So the number of Hamiltonian cycles
Answer:
So the number of Hamiltonian cycles
Answer:
The chromatic number of the following graph is _______.
Answer: 3
Vertices a, b and c form a triangle, so we need at least 3 colours.
One valid 3-colouring is: a = 1, b = 2, c = 3, e = 2, d = 1, f = 3. Every edge joins two vertices with different colours.
Answer: 3
One valid 3-colouring is: a = 1, b = 2, c = 3, e = 2, d = 1, f = 3. Every edge joins two vertices with different colours.
Answer: 3
Let G be a simple undirected graph. Let TD be a depth first search tree of G. Let TB be a breadth first search tree of G. Consider the following statements.
(I) No edge of G is a cross edge with respect to TD. (A cross edge in G is between two nodes neither of which is an ancestor of the other in TD.)
(II) For every edge (u,v) of G, if u is at depth i and v is at depth j in TB, then |i-j|=1.
Which of the statements above must necessarily be true?
(I) No edge of G is a cross edge with respect to TD. (A cross edge in G is between two nodes neither of which is an ancestor of the other in TD.)
(II) For every edge (u,v) of G, if u is at depth i and v is at depth j in TB, then |i-j|=1.
Which of the statements above must necessarily be true?
Answer: (A)
Check each statement in turn:
- (I): In a DFS tree of an undirected graph, every non-tree edge joins a vertex to one of its ancestors (a back edge). So cross edges cannot occur. True
- (II): In BFS, an edge can join two vertices at the same depth (for example, in a triangle). So |i j| can be 0. False
Answer: I only
- (I): In a DFS tree of an undirected graph, every non-tree edge joins a vertex to one of its ancestors (a back edge). So cross edges cannot occur. True
- (II): In BFS, an edge can join two vertices at the same depth (for example, in a triangle). So |i j| can be 0. False
Answer: I only
Keep practising