For this question, you are given the following information:
The problem is to determine the years y1, y2, ..., yr when you would purchase new cars such that the total cost of car ownership from years 1 through n is minimized. The total cost is the sum of the maintenance costs for years 1 through n plus the price of each car purchased minus the resale value of each car sold.
For example, if n = 10, y1 = 1, y2 = 5 and y3 = 7, then this solution states that you should purchase a new car in year 1, buy the second car in year 5 and buy the third car in year 7. (You would also sell the first car in year 5, the second car in year 7 and the third car at the beginning of year 11.) In addition, you should make the following assumptions.
Describe in some detail a dynamic programming algorithm which finds the optimal solution to this problem. Be sure to include a description of the content and size of the memoization table. Analyze and justify the running time of your algorithm.
Back up to Spring 2001 CMSC 641 Homepage