Help needed in a DP problem.

Revision en1, by AdHocMan, 2020-10-19 14:42:44

As I am very new to dynamic programming I am facing many problems in understanding the states of the DP. Here is a problem which I have tried to solve by iterative method but failed. Can anyone please help me with this problem by giving me a bit description on how to understand the states of this type of problems?

Problem Statement: Find a sub-sequence $$$(a_{b1}, a_{b2}, a_{b3},\dots)$$$ of array $$$a$$$ of size $$$n(n < 1001)$$$ to maximize the following expression: $$$1*a_{b1} + 2*a_{b2} + 3*a_{b3} + \dots$$$. Print the maximum value of the expression.

Tags #dp, #dynamic_programming

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English AdHocMan 2020-10-19 14:42:44 580 Initial revision (published)