UGC-NET Jun 2012 · Introduction to Graph Theory

MCQ · 2 marks · Problem PROG-GRPH-0031

The upper bound of computing time of m colouring decision problem is
  1. A
    $O(nm)$
  2. B
    $O(n^m)$
  3. C
    $O(nm^n)$
  4. D
    $O(n^mm^n)$

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionBacktracking for the \(m\)-colouring decision problem assigns a colour to vertices \(1,2,\dots,n\) in turn. The state-space tree has at most\[\sum_{i=0}^{n}m^i=O(m^n)\]nodes, and at each node checking whether the new colour clashes with the adjacent vertices takes \(O(n)\).\[\text{Time}=O(n\,m^n).\]Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com