Considering the problem of designing a shuttle service running from Tuscaloosa to Birmingham. The non- stop...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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) 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)
Expert Answer:
Related Book For
Managerial accounting
ISBN: 978-0471467854
1st edition
Authors: ramji balakrishnan, k. s i varamakrishnan, Geoffrey b. sprin
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
Show that the allocation which solves the first-order condition from Eq. (3.7) for a social optimum satisfies the second-order conditions. Equation 3.7 -C(e) = D'(E) i=1,.... (3.7)
-
The spectral transmissivity of a 1-mm-thick layer of liquid water can be approximated as follows: (a) Liquid water can exist only below its critical temperature, Tc = 647.3 K. Determine the maximum...
-
When you hold up a 100-N weight in your hand, with your forearm horizontal and your palm up, the force exerted by your biceps is much larger than 100 N-perhaps as much as 1000 N. How can that be?...
-
DJ Slick was a radio show host on WLTO-FM, based in Lexington, Kentucky. As a promotional, he announced that he would reward loyal listeners with a chance to win one hundred grand by calling the...
-
Mohan Corporation is a distributor of a sun umbrella used at resort hotels. Data concerning the next months budget appear below: Selling price . . . . . . . . . . . . . . $25 per unit Variable...
-
Sketch a hand written a Enhanced ER diagram for this table and fix the error if there is Message cation D Notification UserNotif Password UserName UserID RoleID User D Phone User # Role securityID...
-
Suppose your tax rate is 23% and you want to purchase a municipal bond of $1,750 for 9% interest. At what interest rate on a for-profit bond , before tax, would you be indifferent between the two...
-
Mulder Corporation's comparative balance sheets are presented below. MULDER CORPORATION Balance Sheets December 31 Cash Accounts receivable Inventory Land Buildings Accumulated depreciation -...
-
Do instance variables have default initial values that we can depend upon?
-
What happens if I try to access a private instance variable or method from a class in another file?
-
In which order does Java evaluate method calls?
-
Why does the String method call s.substring(i, j) return the substring of s starting at index i and ending at j-1 (and not j)?
-
Why not have a single Co17ection data type that implements methods to add items, remove the most recently inserted item, remove the least recently inserted item, remove a random item, iterate over...
-
Q7) The graph below, with the indicated direction, represents the vector equation a) r(t) = (3sint, 4cost) b) r(t) = (3cost, 4sint) Q8) The curvature k of the curve C: a) k = 3/4 c) r(t) = (4cost,...
-
Write electron configurations for the following ions, and determine which have noble-gas configurations: (a) Cd2+ (b) p3- (c) Zr4+ (d) Ru3+ (e) As3- (f) Ag+
-
Suppose that Tom and Lynda are considering reducing Hercules membership fee by 10%. Required: List Tom and Lyndas two options. Next, identify two costs and benefits that are controllable for this...
-
Shibin expects to receive his Ph.D. soon from a highly-regarded program. Seeking to hire him for their faculty, the accounting group at State University in New York City invited Shibin to interview....
-
What is the fixed cost spending variance?
-
When would you prefer to use busy-wait I/O over interrupt-driven I/O?
-
Draw UML diagrams for the read of one character from an 8251 UART. To read the character from the UART, the device needs to read from the data register and to set the serial port status register bit...
-
Draw a UML state diagram for software processing of a vectored interrupt. The vector handling is performed by software (a generic driver) that executes as the result of an interrupt. Assume that the...
Study smarter with the SolutionInn App