This is a dynamic programming question. Details can be found in the body(Including an image)

62 Views Asked by At

enter image description here

  1. Write the optimal profit of the problem as a function of $z_{k}{(i)}.$
  2. Solve $z_{1}(i)$ for all i ∈ {0,...,α}.
  3. Write a recurrence equation satisfied by $z_{k}(i)$ for all (k,i) ∈ {1,...,n} × {0,...,α}.

For the first question, I wrote $z_{3}(6)$. For the second, I wrote $z_{1}{(i)} =p_{1}{(i)}$ But for the third one, I don't know how to represent this, I try to write like $ \max_{m\leq i}(z_{k-1}(m)+p_{k}(i-m)), {k \in \{1,...,n\}, i \in \{0,...,\alpha\}} $, but I think there must be something wrong with this expression. Can someone help me out on this?

1

There are 1 best solutions below

0
On

I would answer this question by finding the place incremental profit for each cell and then selecting the highest ones

P1 3, 1, 0, 0, 0, 0
P2 4, 2, 1, 1, 0, 0
P3 2, 2, 2, 1, 1, 1

So the second answer would be $Z\{i\} = \{0, 4, 7, 9, 11, 13, 15\}.$

What I did can be easily written in to an expression.