# Homework Help: Dynamic Programming to maximize profit

1. Oct 9, 2011

### smith007

1. The problem statement, all variables and given/known data
Trying to maximize the profit of a farmer using dynamic optimization. Each period the farmer has a stock of seeds. He can plant them at a cost c per seed or sell them for p. Every seed that is planted produces $\gamma$ seeds for next period. In period m there is no longer any demand for the seeds.

Profit function $\pi$ = p(1-$\alpha$t)$\gamma$xt - c$\alpha$t$\gamma$xt where $\alpha$t is the proportion of seeds kept to sow at the end of the period.

We are trying to maximize $\sum$[$\pi$t / (1+r)t] from t=0 to m-1

Initial stock of seeds is x0 = 1
$\gamma$ = 8
c = 3
p = 1
r = 0.1
m = 3

2. Relevant equations
Bellman Optimization.

3. The attempt at a solution

Define $\beta$ as 1/(1+r)t
Motion rule xt+1 = $\gamma$$\alpha$txy
We know that there is no demand for the seeds in period 4 so x4 = 0 = $\gamma$$\alpha$3x3
This means that x4 = 0

The value function V3 becomes:
V3 = p$\gamma$x3

@ t = 2

V2 = max (p(1-$\alpha$2)$\gamma$x2 - c$\alpha$2$\gamma$x2 + $\beta$V3

Which using motion rule gives

V2 = max (p(1-$\alpha$2)$\gamma$x2 - c$\alpha$2$\gamma$x2) + $\beta$(p$\gamma$$\alpha$2$\gamma$x2)

Normally at this point I would differentiate and to find the maximum and then recurse the answer back into t=1 but it is a linear function. So I am guessing I need to take some sort of corner soluition but I am not entirely clear how to proceed.

Any tips would be welcome. Thank you.