The Theory of Computation

Bernard M.E. Moret

Addison-Wesley-Longman, 1998


Detailed Solutions

Chapter 8, Problem 22




The method remains essentially unchanged, but the multiplication factor may need to be much larger.

In the case of the three problems of Exercise 8.20, the size of the optimal solution (the cardinality of a set cover, the number of satisfied clauses in 2SAT, and the number of vertices removed to make the graph bipartite) is trivially no larger than the size of the input. Thus the multiplier, which remains, as before, one more than the largest tolerable difference -- here one more than the largest possible optimal solution -- is (more or less) the size of the input, so that the multiplication, while no longer by a constant, is by a linear factor and thus remains feasible within polynomial time. The result immediately follows.

In the case of the three problems of Exercise 8.21, we have to be a bit more careful. The last one (chromatic number) is similar to the three just discussed, since the chromatic number of a graph cannot exceed its number of vertices. But the other two have potentially much larger solutions, since they involve separate weights. In the case of of the bounded-degree MST, the optimal solution is bounded by |V|*wmax, where wmax is the largest weight assigned to an edge, but the input is only of order |V|+|E|log wmax. Thus we cannot afford to multiply the instance by a factor on the order of |V|*wmax. The decision tree problem suffers from the same drawback. However, recall that both problems are in fact strongly NP-complete, so that we can consider only instances where the weights are polynomial functions of the number of vertices or classes and still have an NP-hard problem. The multiplication of the instance now works as before, since the factor, while much larger than constant, is still a polynomial.