94 7 The Complexity Analysis of Problems
where all the numbers that occur are elements of N whose values are bounded
by p(n), where n is the length of the instance.
Theorem 7.2.2. The traveling salesperson problem
TSP and the champi-
onship problem
Championship with the (0, 1,a)-point rule are strongly NP-
complete.
Proof. We already know that
TSP is NP-complete even when the distances
are only allowed to take on values from the set {1, 2}. The largest number
that occurs is then n, the name of the last city.
Championship is NP-complete with the (0, 1, 3)-point rule, and so the num-
bers in the instance are bounded by the number of teams, the number of games
that remain to be played, and the current scores. In our reduction of
3-Sat to
(0, 1, 3)-
Championship in the proof of Theorem 6.7.1, no team plays more than
three additional games, so the largest point difference that can be made up
is 9 points. Thus (0, 1, 3)-Championship remains NP-complete when restricted
to small numbers.
Under the assumption that
NP = P, the notion “strong NP-completeness”
can complexity theoretically distinguish among
NP-complete problems.
Theorem 7.2.3. If
NP = P, then Knapsack is not strongly NP-complete.
Proof. The claim will be proved by giving an algorithm for
Knapsack that for
polynomially bounded weight values runs in polynomial time. The algorithm
uses the method of dynamic programming. Consider an instance of
Knapsack
with n objects and weight limit W . We will let KP(k,w)(for1≤ k ≤ n
and 0 ≤ w ≤ W ) denote the modified instance in which only the first k
objects are considered and the weight limit is w.LetU(k, w) be the largest
utility that can be achieved for the instance
KP(k, w), and let D(k, w)bethe
decision for an optimal packing of the knapsack whether we pack object k
(D(k, w) = 1) or do not pack object k (D(k, w) = 0). In addition, we give
reasonable values for extreme values of the parameters: U(k, w)=−∞,if
w<0; and U (0,w)=U(k, 0) = D(k, 0) = 0, if w ≥ 0.
The algorithm now fills out a table row by row with the values
(U(k, g),D(k, g)). If we are considering
KP(k, w), we can pack object k,win-
ning a utility of u
k
, and reduce the weight limit for the remaining objects to
w − w
k
(itispossiblethatw − w
k
< 0). So we must consider the problem
KP(k − 1,w− w
k
). If we decide not to pack object k, then we must consider
KP(k − 1,w). So
U(k, w)=max{U(k − 1,w),U(k − 1,w− w
k
)+u
k
} .
Furthermore, we can set D(k, w)=1ifU(k − 1,w− w
k
)+u
k
≥ U (k − 1,w),
and D(k, g) = 0 otherwise. The computation of (U(k, w),D(k, w)) can be done
in time O(1). The entire runtime amounts to O(n · W ) and is polynomially
bounded if W is polynomially bounded in n.