K-COLOR. Given a graph G = (V,E), a k-coloring is a function c:V -> {1, 2, … , k} such that c(u) =! c(v) for every edge (u,v) ⊆E. In other words the number 1, 2, .., k represent the k colors andadjacent vertices must have different colors. The decision problemsK-COLOR asks if a graph can be colored with at most K colors.
a. The 2-COLOR decision problem is in P. Describe an efficientalgorithm to determine if a graph has a 2-coloring. What is therunning time of your algorithm?
b. The 3-COLOR decision problem is NP-complete by using areduction from SAT. Use
PayPal Gateway not configured
PayPal Gateway not configured