Question: Problem 7. Consider n objects with prices p?), pp), ..., po at time t. Assume that p) = p = ... = $100 and p.)

Problem 7. Consider n objects with prices p?), pp), ..., po at time t. Assume that p) = p = ... = $100 and p.") = po x r1, where ri > 1 is the rate at which the price of the ith item increases with time. In essence, the price of any object increases with time exponentially at the given rate. You know the values of ri for each i. At any time unit, only one object can be bought and all the n objects have to be bought. Devise an algorithm to minimize the total cost of buying the n items under these conditions. Your algorithm should print the order in which one should buy these items. Prove that your algorithm is correct and analyze its runtime. Problem 7. Consider n objects with prices p?), pp), ..., po at time t. Assume that p) = p = ... = $100 and p.") = po x r1, where ri > 1 is the rate at which the price of the ith item increases with time. In essence, the price of any object increases with time exponentially at the given rate. You know the values of ri for each i. At any time unit, only one object can be bought and all the n objects have to be bought. Devise an algorithm to minimize the total cost of buying the n items under these conditions. Your algorithm should print the order in which one should buy these items. Prove that your algorithm is correct and analyze its runtime
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
