Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Dependent Knapsack Problem on DAGs

Revision en1, by pinkspace, 2024-12-04 05:06:26

Hi everyone,

Previously I learned about the Dependent Knapsack Problem on Trees, which the dependency graph of items form a tree. For a general dependency graph, we can bunch all items in the same SCC into a single item, which results in a DAG. Is there an efficient solution to this Dependent Knapsack Problem on DAGs? If it does, is it possible to come up with an $$$O(NW)$$$ solution? I searched the problem and didn't find much useful information.

A possible problem statement: We have a knapsack that can hold a maximum weight $$$W$$$. There are $$$N$$$ items to choose from, each item $$$i$$$ has its own weight $$$w_i$$$, value $$$v_i$$$ and a set of dependencies $$$S_i$$$. To choose item $$$i$$$, we must choose (all elements/at least one element) in $$$S_i$$$ if $$$S_i$$$ is non-empty. What is the maximum total value we can get in our knapsack?

Tags dp, dag, knapsack

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English pinkspace 2024-12-04 05:06:26 901 Initial revision (published)