6 Simon makes playhouses which he sells through an agent. Each Sunday the agent orders the number of playhouses she will need Simon to deliver at the end of each day. The table below shows the order for the coming week.
| Day | Monday | Tuesday | Wednesday | Thursday | Friday |
| 2 | 3 | 2 | 2 | 4 |
Simon can make up to 3 houses each day, except for Wednesday when he can make at most 2 houses. Because of limited storage space, Simon can store at most 2 houses overnight from one day to the next, although the number in store does not restrict how many houses Simon can make the next day.
The process is modelled by letting the stages be the days and the states be the numbers of houses stored overnight.
Simon starts the week, on Monday morning, with no houses in storage. This means that the start of Monday morning has (stage; state) label ( \(0 ; 0\) ). Simon wants to end the week on Friday afternoon with no houses in storage, so the start of Saturday morning will have (stage; state) label ( \(5 ; 0\) ).
- Explain why the (stage; state) label ( \(4 ; 0\) ) is not needed.
Simon wants to draw up a production plan showing how many houses he needs to make each day. He prefers not to have to make several houses on the same day so he assigns a 'cost' that is the square of the number of houses made that day, apart from Monday when the 'cost' is the cube of the number of houses made. So, for example, if he makes 3 houses one day the cost is 9 units, unless it is Monday when the cost is 27 units.
- Complete the diagram in the answer book to show all the possible production plans and weight the arcs with the costs.
Simon wants to find a production plan that minimises the sum of the costs.
- Set up a dynamic programming tabulation, working backwards from ( \(5 ; 0\) ), to find a production plan that solves Simon's problem.
- Write down the number of houses that he should make each day with this plan.