Source: Asked to me by Ankush Jain (CSE IITB 2011, Morgan Stanley Quant Associate). He took it from Algorithms Design book by Tardos and Kleinberg
Problem:
Easy case:
You’re trying to buy equipments whose costs are appreciating. Item i appreciates at a rate of r_i > 1 per month, starting from $100, so if you buy it t months from now you will pay 100*((r_i)^t). If
you can only buy one item per month, what is the Optimal Order in which to buy them?
Difficult case:
You’re trying to sell equipments whose costs are depreciating. Item i depreciates at a rate of r_i < 1 per month, starting from $100, so if you sell it t months from now you will get 100*((r_i)^t). If
you can only sell one item per month, what is the optimal order in which to sell them?
This post first appeared on CSE Blog - Quant, Math, Computer Science Puzzles, please read the originial post: here