Computer Science EngineeringVery hardISRO SC

In register allocation by graph colouring, the interference graph has nodes v0..v7 and edges v0-v1, v0-v3, v0-v4, v0-v5, v1-v2, v1-v3, v1-v5, v1-v6, v1-v7, v2-v4, v2-v5, v2-v6, v3-v4, v3-v5, v3-v6, v3-v7, v5-v7, v6-v7. The minimum number of registers needed (chromatic number) is

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

Correct answer: B. 4

Brute-force colouring search shows 3 colours are insufficient and 4 suffice.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic