Skip to content
Official PYQ · 2023

GATE CS 2023 Q45 — Graphs: Connectivity, Matching, Colouring

Explain with AI

Let GG be a simple, finite, undirected graph with vertex set {v1,…,vn}\left\{v_{1}, \ldots, v_{n}\right\}. Let Δ(G)\Delta(G) denote the maximum degree of GG and let N={1,2,…}\mathbb{N}=\{1,2, \ldots\} denote the set of all possible colors. Color the vertices of GG using the following greedy strategy: for i=1,…,ni=1, \ldots, n

color⁡(vi)←min⁡{j∈N\operatorname{color}\left(v_{i}\right) \leftarrow \min \left\{j \in \mathbb{N}\right. : no neighbour of viv_{i} is colored j}\left.j\right\}

Which of the following statements is/are TRUE?\text{TRUE}?

Select all correct options
View worked solution

Answer: A;B

Let us analyze each option step-by-step to determine the correct statements.

Option A: Proper Vertex Coloring

A vertex coloring is proper if no two adjacent vertices share the same color.

  • At each step ii, the greedy algorithm assigns to viv_i the smallest color j∈Nj \in \mathbb{N} that is not already assigned to any of its neighbors.
  • This explicitly guarantees that viv_i will have a different color from all its already-colored neighbors.
  • Since this condition is maintained for every vertex, the resulting coloring is guaranteed to be a proper coloring.

Thus, Option A is TRUE.

Option B: Upper Bound of Δ(G)+1\Delta(G) + 1 Colors

  • The maximum degree of any vertex in the graph is Δ(G)\Delta(G).
  • When we color any vertex viv_i, it can have at most Δ(G)\Delta(G) neighbors. Therefore, at most Δ(G)\Delta(G) colors can be excluded from selection.
  • By the Pigeonhole Principle, among the first Δ(G)+1\Delta(G) + 1 positive integers, there must be at least one color that is not used by any neighbor of viv_i.
  • Consequently, the algorithm will never need a color larger than Δ(G)+1\Delta(G) + 1.

Thus, Option B is TRUE.

Option C: Upper Bound of Δ(G)\Delta(G) Colors

This is not always true. Consider a complete graph K3K_3 (a triangle):

  • The maximum degree is Δ(K3)=2\Delta(K_3) = 2.
  • Any proper coloring of K3K_3 requires 33 colors.
  • Here, the number of colors used is 3>Δ(G)3 > \Delta(G).

Thus, Option C is FALSE.

Option D: Equality to the Chromatic Number χ(G)\chi(G)

The greedy coloring algorithm is highly sensitive to the ordering of the vertices and does not always yield an optimal coloring (the chromatic number χ(G)\chi(G)).

Consider a path graph P4P_4 with vertices a−b−c−da - b - c - d and chromatic number χ(P4)=2\chi(P_4) = 2:

  • Suppose we order the vertices as: a,d,b,ca, d, b, c.
  • Color aa: No neighbors colored yet   ⟹  color(a)=1\implies \text{color}(a) = 1.
  • Color dd: No neighbors colored yet   ⟹  color(d)=1\implies \text{color}(d) = 1.
  • Color bb: Neighbor aa has color 1  ⟹  color(b)=21 \implies \text{color}(b) = 2.
  • Color cc: Neighbors bb (color 2) and dd (color 1) are colored   ⟹  color(c)=3\implies \text{color}(c) = 3.

The algorithm uses 33 colors, which is strictly greater than χ(P4)=2\chi(P_4) = 2.

Thus, Option D is FALSE.

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

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