Data Structures & AlgorithmsHardGATE CS · ICPC regional
Simple undirected graph on vertices 0 to 6 with edges: 2–4, 4–5, 0–6, 1–4, 0–5, 0–2, 1–2, 3–5, 2–3, 2–5. What is its chromatic number, the fewest colours that colour every vertex so that adjacent vertices get different colours?
- A. 4
- B. 3
- C. 6
- D. 5
Correct answer: B. 3
An exhaustive search finds 3 colours suffice and are necessary. Colouring greedily in index order uses 4 colours, and the clique number 3 gives only a lower bound.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- A bipartite graph has left vertices 0 to 3 and right vertices 0 to 3. Its edges, as (left, right) pairs in this listed order, are: (1,1)…
- A bipartite graph has left vertices 0 to 3 and right vertices 0 to 4. Its edges, as (left, right) pairs in this listed order, are: (1,0)…
- A bipartite graph has left vertices 0 to 4 and right vertices 0 to 4. Its edges, as (left, right) pairs in this listed order, are: (1,4)…
- A bipartite graph has left vertices 0 to 3 and right vertices 0 to 4. Its edges, as (left, right) pairs in this listed order, are: (2,3)…
- A bipartite graph has left vertices 0 to 3 and right vertices 0 to 3. Its edges, as (left, right) pairs in this listed order, are: (3,0)…
- A bipartite graph has left vertices 0 to 2 and right vertices 0 to 2. Its edges, as (left, right) pairs in this listed order, are: (1,2)…