Question: Trying to solve a Dynamic Programming question by hand, what am I getting wrong? You have a sideline business buying and selling vintage jukeboxes. You
Trying to solve a Dynamic Programming question by hand, what am I getting wrong?
You have a sideline business buying and selling vintage jukeboxes. You have room to store up to two jukeboxes and feel certain that the following prices will prevail over the next four months:
| Month | 1 | 2 | 3 | 4 |
| Sell (Ask) Price | $2500 | $2800 | $2000 | $2700 |
| Buy (Bid) Price | $2600 | $2900 | $2100 | $2800 |
Each month, you have a choice of one of the following three actions:
- Buy: buy one jukebox at the bid price (unless you already have two in storage)
- Hold: do nothing (allowable with any number of jukeboxes in storage, including zero)
- Sell: sell one jukebox at the ask price (unless you do not have any left in storage).
Thus, you may buy or sell at most one jukebox per month. You have a direct holding cost of $100 for each jukebox in storage at the end of each month (for maintenance and cleaning), and want to maximize your profit from trading jukeboxes over the next four months. Assume that you do not have any jukeboxes currently in storage, and that you ascribe a salvage value of $2000 to each jukebox left over after the end of the four months (holding cost at the end of month four still applies to any such jukeboxes).
My work: v4(2) = max[(0 200 +4000), (2700 100 + 2000)] = $4600 v4(1) = max[ (-2800 200 + 4000), (0 100 + 2000), 2700] = $2700 v4(0) = max[ (-2800 100 + 2000), 0] = $0
v3(2) = max[(0 - 200) + 4600, (2000 100 + 2700)] = $4600 v3(1) = max[(-2100 200 + 4600), (0-100 + 2700), 2000] = $2600 v3(0) = max[(-2100 100 + 2700), 0] = $500
v2(1) = max[(-2900 200 + 4600), (0-100 + 2600), 2800 + 500] = $3300 v2(0) = max[-2900 100 + 2600, 500] = $500 v1(0) = max[500, (-2600 100 + 3300)] = $600
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
