So, for a practical question, we need to develop a dynamic programming algorithm that is a variation of the 0/1 backpack problem ... Basically, each element comes from 4 different sources, and this element can be taken from only one of the sources ..
Namely,
S1={(d_k, b_k) | 1 β€ k β€ n}, S2={(d_k, b_k) | n + 1 β€ k β€ 2n}, S3={(d_k, b_k) | 2n + 1 β€ k β€ 3n}, S4 = {(d_k, b_k) | 3n + 1 β€ k β€ 4n}
for n = 10 , if you select i = 16 for input, this means that you will not select 6, 26 or 36 ...
Can you help me solve this problem and develop a relapse equation?
source share