I was wondering if you might have some insight into a problem, where we consider an optimization problem:
max ∑f*j*(x*j*) from j=1 to n of s.t. ∑ j=1 to n of xj <=B
xj>=0, integers
where B is a positive integer and fj is real to real
I am trying to formulate a solution using dynamic programming and to figure out the time complexity of this method.
Im a bit confused about the dynamic programming approach, how would you implement it for a function such as f1(x)=sqrt(x) if n=5 and B=10
kind regards