It is NP-complete to determine whether an arbitrary graph has chromatic number k, where k ≥ 3. However, determining whether an arbitrary graph has chromatic number 2 is in P. Given a graph G on n vertices, create an algorithm that will return TRUE if χ(G) = 2 and FALSE if χ(G) 6= 2. Clearly explain how your algorithm works, why it guarantees the correct output, and determine the running time of your algorithm.
In this question you will explore Graph Colouring algorithms. Given a graph G, we say that G is k-colourable if every vertex of G can be assigned one of k colours so that for every pair u, v of adjacent vertices, u and v are assigned different colours. The chromatic number of a graph G, denoted by χ(G), is the smallest integer k for which graph G is k-colorable. To show that χ(G) = k, you must show that the graph is k-colourable and that the graph is not (k − 1)-colourable.
Question: It is NP-complete to determine whether an arbitrary graph has chromatic number k, where k ≥ 3. However, determining whether an arbitrary graph has chromatic number 2 is in P. Given a graph G on n vertices, create an
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images