A boy has a box that can hold 20,000 jellybeans. In day 1, there are 6,000 jellybeans initially. Each day, the boy can buy or sell jellybeans at given prices.
Day 1: Selling Price $3, Purchase Price $8
2: 6,8
3: 7,2
4: 1,3
5: 4,4
6: 5,3
7: 5,3
8: 1,2
9: 3,5
10: 2,5
- The boy can sell any amount of jellybeans up to his initial stock at the current day's selling price
- He can buy as many jellybeans (at the current day's purchase price) from other kids as he wants, but this is subject to the capacity of the box
What buying/selling plan should the boy pursue to maximize profits?