GATE | GATE-CS-2009 | Question 2



What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n >= 2.
(A) 2
(B) 3
(C) n-1
(D) n


Answer: (A)

Explanation: The chromatic number of a graph is the smallest number of colours needed to colour the vertices of so that no two adjacent vertices share the same colour. These types of questions can be solved by substitution with different values of n.

1) n = 2
anil_m_1
This simple graph can be coloured with 2 colours.

2) n = 3
anil_m_2

Here, in this graph let us suppose vertex A is coloured with C1 and vertices B, C can be coloured with colour C2 => chromatic number is 2 In the same way, you can check with other values, Chromatic number is equals to 2

This solution contributed by Anil Saikrishna Devarasetty

//A simple graph with no odd cycles is bipartite graph and a Bipartite graph can be colored using 2 colors (See this)

Quiz of this Question



My Personal Notes arrow_drop_up
Article Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.