I am familiar with 0/1 knapsack problem. But if the following constraint is imposed... how do I solve the question?
- If you choose some item 'U' you won't be able to choose another item 'V'.
For example
Items are given as [Name, Weight, Value]
Items are :
A 10 20
B 50 80
C 20 30
D 30 70
E 50 50
If you choose B then you cannot choose A.
If you choose E then you cannot choose C.
If you choose D then you cannot choose A.
In the similar way the constraints are given.
Please provide me some way to solve the above problem. Any help is highly appreciated.
If you choose B then you cannot choose A.
- is that relationship symmetric? That is, if choose A first, then does that mean I still choose B second? Or does it also imply A and B can't be in the same knapsack regardless of selection order? $\endgroup$