GateAI
Graph Theory

GATE CSE 2023 · Q55

MSQ2 marksMedium

Time

Let GG be a simple, finite, undirected graph with vertex set {v1,…,vn}\{v_1, \ldots, v_n\}. 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: no neighbour of vi is colored j} \text{color}(v_i) \leftarrow \min\{j \in \mathbb{N} : \text{ no neighbour of } v_i \text{ is colored } j\} Which of the following statements is/are TRUE?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: A) This procedure results in a proper vertex coloring of G.; B) The number of colors used is at most (G) + 1.

Graph Theory

Let us analyze the given greedy coloring procedure step-by-step:

  1. Statement (A) is TRUE: At each step ii, the vertex viv_i is assigned the smallest color j∈Nj \in \mathbb{N} that has not been assigned to any of its adjacent vertices that have already been colored. Consequently, no two adjacent vertices ever receive the same color, guaranteeing a proper vertex coloring of GG.

  2. Statement (B) is TRUE: The maximum degree of any vertex in GG is Δ(G)\Delta(G). Therefore, each vertex viv_i has at most Δ(G)\Delta(G) neighbors. When vertex viv_i is being colored, at most Δ(G)\Delta(G) distinct colors are unavailable. In the set of the first Δ(G)+1\Delta(G) + 1 colors, {1,2,…,Δ(G)+1}\{1, 2, \ldots, \Delta(G) + 1\}, there must always be at least one available color. Hence, the greedy coloring algorithm will use at most Δ(G)+1\Delta(G) + 1 colors.

  3. Statement (C) is FALSE: For a complete graph KnK_n, the maximum degree is Δ(Kn)=n−1\Delta(K_n) = n - 1. Since every pair of vertices is connected, n=Δ(Kn)+1n = \Delta(K_n) + 1 colors are required. Thus, the greedy algorithm will use Δ(G)+1\Delta(G) + 1 colors, which is strictly greater than Δ(G)\Delta(G).

  4. Statement (D) is FALSE: The number of colors used by greedy coloring depends heavily on the ordering of the vertices and is not guaranteed to achieve the chromatic number χ(G)\chi(G). For instance, for a path graph P4P_4 with vertices u1,v1,u2,v2u_1, v_1, u_2, v_2 and edges (u1,v1),(v1,u2),(u2,v2)(u_1, v_1), (v_1, u_2), (u_2, v_2), if the vertices are ordered as u1,u2,v1,v2u_1, u_2, v_1, v_2, the greedy coloring uses 33 colors even though χ(P4)=2\chi(P_4) = 2.

Therefore, statements A and B are correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Graph Theory previous year question is Q55 of the GATE CSE 2023 paper. Find more GATE CSE PYQs on Graph Theory in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Graph Theory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Graph Theory in GATE CSE

Graph Theory has 21 GATE CSE PYQs across 14 papers from 2012 to 2026. 4 of them are 2-mark MSQs like this one, and it is the only one in GATE CSE 2023.

How GATE tests Graph Theory

More from GATE CSE 2023

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2023 · Q55 · MSQ

Let G be a simple, finite, undirected graph with vertex set {v1, , vn}. Let (G) denote the maximum degree of G and let N = {1, 2, } denote the set of all possible colors. Color the vertices of G using the following greedy strategy: for i = 1, , n color(vi) min{j ∈ N : no neighbour of vi is colored j} Which of the following statements is/are TRUE?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.