Inventory Problem

A company knows that the deamnd for its product during each of the next four months will be as follows:
Month Demand
1 1
2 3
3 2
4 4
At the beginning of each month the company must determine how many units should be produced during the current month. During a month in which any units are produced, a setup cost of $3 is incurred. In addition, there is a variable cost of $1 for every unit produced. At the end of each month a holding cost of 50 cents per unit on hand is incurred. Capacity limitations allow a maximum of 5 units to be porduced during each month. The size of the company's warehouse restricts the ending inventory for each month to at most 4 units. The company wants to determine a production scheule that will meet all demands on time and will minimize the sum of production and holding costs during the four months. Assume that 0 units are on hand at the beginning of the first month.