(k, W
i,k
) k
I
i
k
I
i
TRIPLE
i
|TRIPLE
i
| ≤
i
X
j=1
c
j
+ 1.
TRIPLE
i+1
TRIPLE
i
O(TRIPLE
i
)
TRIPLE
i+1
SET
i+1
= TRIPLE
i
∪ {(k + c
i+1
, W
i,k
+ w
i+1
, T
i,k
∪ {i + 1}) |
(k, W
i,k
, T
i,k
) ∈ TRIPLE
i
W
i,k
+ w
i+1
≤ b}
(i + 1) TRIPLE
i
b
TRIPLE
i+1
SET
i+1
k TRIPLE
n
I = I
n
DPR
I = (w
1
, w
2
, . . . , w
n
, c
1
, . . . , c
n
, b) ∈ IN
2n+1
n ∈ IN
TRIPLE(1) = {(0, 0, ∅)} ∪ {(c
1
, w
1
, {1})} | w
1
≤ b}
i = 1 n − 1
SET(i + 1) := TRIPLE(i)
(k, w, T ) ∈ TRIPLE(i)
w + w
i+1
≤ b
SET(i + 1) := SET(i + 1 )
∪ {(k + c
i+1
, w + w
i+1
, T ∪ {i + 1})}
TRIPLE(i + 1)
SET(i + 1)
k
SET(i + 1)
k
k
c := max{k ∈ {1, 2 , . . . ,
n
X
i=1
c
i
} | (k, w, T ) ∈ TRIPLE(n)}.
5
k W
i,k