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 61–65 of 86
If all the edge weights of an undirected graph are positive, then any subset of edges that connects all the vertices and has minimum total weight is a
Answer: (D)
- Hamiltonian cycle This is a cycle. A cycle connects all vertices, but it has edge more than needed. We can remove that edge and still connect all vertices with a lower cost "subset of edges". So this option is FALSE.
- grid A grid graph has cycles, so this is FALSE for the same reason as option A.
- Hypercube A hypercube graph also has cycles. So this is also FALSE.
- Tree A cheapest connecting set cannot contain a cycle: with positive weights, removing one edge of a cycle keeps all vertices connected and lowers the total weight. So it has no cycle and is connected, which means it is a tree (in fact a minimum spanning tree). This is TRUE.
Answer: (D)
The vertices of graph G correspond to all subsets of a set of size n, for . Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly two elements.
The number of connected components in G is
The number of connected components in G is
Answer: (B)
Isolated vertices: two sets are adjacent only if they share two elements, so a set with fewer than 2 elements has no neighbour. The empty set and the n single-element sets are isolated. That gives components.
All other sets are in one component.
- A set A with is adjacent to {x, y} for any two elements x, y of A, because has exactly 2 elements. So every set of size 3 or more is joined to a 2-element set.
- Two 2-element sets {x, y} and {x, z} are joined through {x, y, z}: and , each of size 2. Any two 2-element sets, such as {a, b} and {c, d}, are joined by the chain {a, b}, {b, c}, {c, d}.
So all sets with 2 or more elements form one component.
Total .
Answer: (B)
All other sets are in one component.
- A set A with is adjacent to {x, y} for any two elements x, y of A, because has exactly 2 elements. So every set of size 3 or more is joined to a 2-element set.
- Two 2-element sets {x, y} and {x, z} are joined through {x, y, z}: and , each of size 2. Any two 2-element sets, such as {a, b} and {c, d}, are joined by the chain {a, b}, {b, c}, {c, d}.
So all sets with 2 or more elements form one component.
Total .
Answer: (B)
The vertices of graph G correspond to all subsets of a set of size n, for . Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly two elements.
The maximum degree of a vertex in G is
The maximum degree of a vertex in G is
Answer: (C)
Let a vertex be a set A with . Its neighbours are the sets B with .
- Choose which 2 elements of A are in B: ways.
- The other elements of A must not be in B.
- Each of the elements outside A can be in B or not: ways.
So the degree is (for the set A itself is counted once, which only lowers that degree by 1 and does not matter for the maximum).
Compare values: , , , . In general , which is at least 1 only for , so f grows up to and then falls. The maximum is .
Option D, , is larger than this and is not reached by any vertex.
Answer: (C)
- Choose which 2 elements of A are in B: ways.
- The other elements of A must not be in B.
- Each of the elements outside A can be in B or not: ways.
So the degree is (for the set A itself is counted once, which only lowers that degree by 1 and does not matter for the maximum).
Compare values: , , , . In general , which is at least 1 only for , so f grows up to and then falls. The maximum is .
Option D, , is larger than this and is not reached by any vertex.
Answer: (C)
The vertices of graph G correspond to all subsets of a set of size n, for . Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly two elements.
The number of vertices of degree zero in G is
The number of vertices of degree zero in G is
Answer: (C)
Two vertices (sets) are adjacent when they share exactly two elements.
Sets of size at most have degree zero. Such a set has for every set , so it can never share exactly two elements with another set. These sets are the empty set and the single-element sets, which is sets.
Sets of size or more have degree at least .
- If , then is adjacent to for any (this exists because ). The two sets share exactly the two elements of .
- If , then is adjacent to any of its -element subsets, which share exactly two elements with .
So the number of vertices of degree zero is .
Answer: (C)
Sets of size at most have degree zero. Such a set has for every set , so it can never share exactly two elements with another set. These sets are the empty set and the single-element sets, which is sets.
Sets of size or more have degree at least .
- If , then is adjacent to for any (this exists because ). The two sets share exactly the two elements of .
- If , then is adjacent to any of its -element subsets, which share exactly two elements with .
So the number of vertices of degree zero is .
Answer: (C)
Let T be a depth first search tree in a undirected graph G Vertices u and v are leaves of this tree T. The degrees of both u and v in G are at least 2. Which one of the following statements is true?
Answer: (D)
Key fact: in a DFS of an undirected graph, every non-tree edge joins a vertex to one of its ancestors (back edge). There are no cross edges.
Why D is true. The leaf u has no children, so all its neighbours are ancestors of u, which all lie on the tree path from the root to u. Let w be the neighbour of u closest to the root. The tree path from w down to u contains every neighbour of u, and the edge (u, w) closes it into a cycle. The parent of u is one neighbour, and u has at least 2 neighbours, so w is above the parent and the cycle has length at least 3. So there is a cycle through u and all its neighbours.
Why the others are not always true (each example has two leaves u and v of degree 2):
- Take two triangles {1, 2, u} and {3, 4, v} joined by the edge 2-3. A DFS from 1 has leaves u and v. They have no common neighbour, so A fails. No cycle contains both u and v, since the bridge 2-3 would be used twice, so C fails.
- Take the complete bipartite graph with parts {x, y} and {a, b, c}. A DFS from x going x, a, y, b, then c has leaves b and c. Removing any one vertex leaves them connected, so B fails.
Answer: (D)
Why D is true. The leaf u has no children, so all its neighbours are ancestors of u, which all lie on the tree path from the root to u. Let w be the neighbour of u closest to the root. The tree path from w down to u contains every neighbour of u, and the edge (u, w) closes it into a cycle. The parent of u is one neighbour, and u has at least 2 neighbours, so w is above the parent and the cycle has length at least 3. So there is a cycle through u and all its neighbours.
Why the others are not always true (each example has two leaves u and v of degree 2):
- Take two triangles {1, 2, u} and {3, 4, v} joined by the edge 2-3. A DFS from 1 has leaves u and v. They have no common neighbour, so A fails. No cycle contains both u and v, since the bridge 2-3 would be used twice, so C fails.
- Take the complete bipartite graph with parts {x, y} and {a, b, c}. A DFS from x going x, a, y, b, then c has leaves b and c. Removing any one vertex leaves them connected, so B fails.
Answer: (D)
Keep practising