GATE Computer ScienceHardGATE CSE · NIELIT

The interference graph of six variables v0–v5 has edges v0 with each of v1–v5, plus the cycle v1–v2–v3–v4–v5–v1. What is the minimum number of registers needed for a conflict-free allocation (graph colouring)?

  1. A. 4
  2. B. 3
  3. C. 5
  4. D. 6

Correct answer: A. 4

The hub v0 needs its own colour, and the odd 5-cycle needs 3 more colours, so the chromatic number is 4.

More Compiler Design questions

Exams that ask this topic