For indexed occurrences with positive integer weights, let record whether a subset of the first entries has sum . The recurrence chooses whether the last occurrence is absent or present: , with an out-of-range term false. Initialize only sum zero true. Descending one-dimensional updates prevent reusing the current occurrence. Time is for target and space ; positivity permits immediate rejection above the total. With weights bounded by , the total is at most , making the bound polynomial in .
Articles by others on the same topic
There are currently no matching articles.