Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Considering the problem of designing a shuttle service running from Tuscaloosa to Birmingham. The non- stop travel time from Tuscaloosa to Birmingham airport is
Considering the problem of designing a shuttle service running from Tuscaloosa to Birmingham. The non- stop travel time from Tuscaloosa to Birmingham airport is known to be 60 minutes. To ensure the quality of service, the maximum one-way travel and waiting time for your service should be no more than 75 minutes. An initial travel survey suggests there are 7 candidate stops, where the number of passengers per stop, the expected price per passenger, and the required waiting time at each stop are summarized in the following table: Stop ID Number of passenger 4 3 Price per passenger ($) 5 3 Waiting time (minute) 5 4 5 4 3 6 1 2 3 4 6 45 4 SH 374 5 6 2 8 5 10 CO 5 7 100 + 7 8 4 When making a stop, it is assumed that 1. All passengers onboard will go to the airport You are asked to determine the set of stops so that it can generate the maximum amount of revenue. 1. Discuss a potential greedy approach and write the pseudo-code for your greedy algorithm. Following your greedy algorithm, what are the stops made along the route, and what is the total generated revenue? 2. What is the time complexity of your greedy algorithm? Briefly explain your answer. 3. Design dynamic programming (DP) approach and write the pseudo-code for your algorithm. Compare the results of your DP approach with the outcomes from the greedy solution. 4. What is the time complexity of your DP algorithm? Briefly explain your answer. (Please describe a breakdown of the time complexity for major components of your DP algorithm)
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