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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started