Skip to content
Official PYQ · 2024

GATE CS 2024 Set 2 Q41 — Graphs: Connectivity, Matching, Colouring

Explain with AI

Let G\text{G} be an undirected connected graph in which every edge has a positive integer weight. Suppose that every spanning tree in G\text{G} has even weight. Which of the following statements is/are TRUE for every such graph G\text{G}?

Choose one option
View worked solution

Answer: D

Let TT be any spanning tree of GG. By the given condition, its weight w(T)w(T) must be even.

For any cycle CC in GG, we can find a spanning tree TT that contains all edges of CC except for one edge e∈Ce \in C. For any other edge e′∈Ce' \in C (where e′≠ee' \neq e), the subgraph T′=T∪{e}∖{e′}T' = T \cup \{e\} \setminus \{e'\} is also a spanning tree of GG, meaning its weight w(T′)w(T') must also be even.

The relationship between the weights of these two spanning trees is: w(T′)=w(T)+w(e)−w(e′)w(T') = w(T) + w(e) - w(e') Since both w(T)w(T) and w(T′)w(T') are even, their difference must also be even: w(e)−w(e′)≡0(mod2)  ⟹  w(e)≡w(e′)(mod2)w(e) - w(e') \equiv 0 \pmod 2 \implies w(e) \equiv w(e') \pmod 2 Since this holds for any choice of e′∈Ce' \in C, all edges in the cycle CC must have the same parity. Thus, either all edges in CC have even weight, or all edges in CC have odd weight. This makes Option D correct.

Counterexamples for other options:

  • A & B: Let GG be a tree with edge weights 2,1,12, 1, 1. The only spanning tree is GG itself with an even weight of 44. Here, some edges are odd and some are even, disproving both A and B.
  • C: Let GG be a cycle of length 3 with edge weights 1,1,11, 1, 1. Every spanning tree has weight 22 (even), but the cycle contains odd-weighted edges, disproving C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Graphs: Connectivity, Matching, Colouring questions