Adam wants to sell fake paintings "Sunflower” to the families in N houses on a road. Adam has many
copies of Sunflower with him, but each family will only buy one copy. Each family is willing to spend
different amount of money on buying it. They offer to pay p1, p2, ..., pN thousand dollars
respectively
The rules are: Rule (a) If Adam decides to sell a copy of Sunflower to one family, this family will surely
buy it.
Rule (b) The houses are in a line, numbered by 1,2,3,. .. ,N. Adam cannot sell two copies to two
adjacent families (since the adjacent families visit each other and will notice the same painting and
realize it is fake). For example, he can sell it to family 1, 3 and 5, or family 1 and 4; he cannot sell it to
family 2 and 3 together.
Adam wants to maximize his revenue by picking the families that he sells Sunflower to. For example,
for N = 3 and p = [3,8,4), the maximal revenue is 8, and is achieved when he sells Sunflower to family
2. For N=4 and p = [5, 2, 1, 4], the maximal revenue is 9, and is achieved when he sells Sunflower to
family 1 and 4. Now suppose N = 6 and p = [9,7,5,9,6, 4] (this means [p1, p2, ..., p6] = [9, 7, 5, 9, 6,
4]).
Solve this problem by dynamic programming. Specify stages, states sn, decision variables xn, the value
function f+ n (sn) and its recursive relationship (Bellman equation). Identify the optimal set of families
to sell Sunflower to and the optimal revenue.
Answers
Answered by
1
Answer:
Ohm's law states that the current through a conductor between two points is directly proportional to the voltage across the two points
Similar questions
Physics,
23 days ago
Science,
23 days ago
Social Sciences,
23 days ago
Business Studies,
1 month ago
English,
8 months ago
Math,
8 months ago