Question: Algorithms - Dynamic Programming Suppose that you have a meeting room and there are n requests {1,2,...,n} to book the room. Each request i specifies
Algorithms - Dynamic Programming
Suppose that you have a meeting room and there are n requests {1,2,...,n} to book the room. Each request i specifies start time si and a finish time fi and the number of people mi who will be using the room. The room bookings cannot overlap. Your charge for a booking for m people is $m no matter how long or short it is. Of course, you want to maximize your total profit. Design an efficient dynamic programming algorithm to solve this problem. Determine the complexity of your algorithm assuming that the requests have already been sorted by increasing finish time. Describe the subproblems that you use in your dynamic programming solution and show the underlying DAG.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
