Question: Dynamic Programming Question Assume that you are given a task of managing the placement of commercial advertisements along a freeway that runs from west to
Dynamic Programming Question
Assume that you are given a task of managing the placement of commercial advertisements along a freeway that runs from west to
east for a distance of D miles. The freeway has a set of n possible sites for the advertisement locations , given by positions x1, x2, ..., xn
along the freeway, all within the interval [0, D], measured in miles from the western end. Placing an advertisement at a location
xi will earn you a revenue ri > 0. The rules for placing the advertisement boards require that no two commercials can be placed within less than or
equal to 5 miles of each other. Your job is to place the advertisements at a subset of the possible sites in such a way that you maximize your total revenue.
Develop a dynamic programming algorithm that finds the optimal value and the optimal solution for this problem
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
