Share
Explore BrainMass

dynamic programming

This spring I want to plant a garden on a 10x20 feet of land. The rows are each 10 feet long. I want to plant tomatoes, corn and green beans. The corn and tomatoes rows will be 2 feet wide each. The green beans will each be 3 feet wide. On a scale of 1 to 10 (10 being the best) I would place tomatoes at 10, corn at 7, and beans at 3. My preferences however are irrelevant to my spouse. My spouse insists that no more than two rows of tomatoes be planted; and at least one row of beans be planted. Use dynamic programming to determine how many rows of each should be planted.

This is my attempt to set up the problem, but I don't think it is right, because I keep going in circles when I try to solve:

Let tomatoes be x1, corn x2 and green bean be x3

Problem formulation:

Attachments

Solution Preview

See the attached file. My formulation is in blue.

This spring I want to plant a garden on a 10x20 feet of land. The rows are each 10 feet long. I want to plant tomatoes, corn and green beans. The corn and tomatoes rows will be 2 feet wide each. The green beans will each be 3 feet wide. On a ...

Solution Summary

The dynamic programming functions are analyzed. How many rows should be planted is determined.

$2.19