Question: 1 1 7 . [ Dynamic Programming 2 ] ( 1 6 points ) Suppose you are running a bus tour company with a double
Dynamic Programming points
Suppose you are running a bus tour company with a doubledecker bus. The upper deck has seats and the lower deck has seats. There are groups of people dots, where is the number of people in the group i and is how much the group will pay to take the tour. If you decide to take a group then they all must fit on the upper deck or the lower deck, you cannot split up the group. You only have a limited number of seats so you may not be able to accommodate all groups so you wish to find a subset of the groups that you can fit on the tour that maximizes to the total value.
Design a DP algorithm that returns the maximum total value.
Step : Description of subproblems
Let be the maximum value you can achieve considering groups dots, such that that bus has i available seats in the upper deck and available seats in the lower deck.
Step : Base Cases points
Step : Recursion with justification or case analysis points
Step : ordering point
Step : form of output point
Step : runtime analysis points
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
