Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The city of California commissions you to design a new bus system which has n stops numbered 1,2,. ,n on the North-bound route (lets ignore

image text in transcribed
The city of California commissions you to design a new bus system which has n stops numbered 1,2,. ,n on the North-bound route (lets ignore the South-bound route). Commuters may begin their journey at any stop i and end at any other stop j>i. Consider the following approach: (a) You can have a bus run from the southern-most point to the northernmost point as a traditional busline might run. The system would be cheap because it only requires n segments for the entire system. However, a person traveling from stop-0 to stop j = n must travel through all n segments. This system will be slow for that person. (b) You can have a special express bus run from every point to every other destination. No person will every wait through any unnecessary segments no matter where they start and end. However, this system requires (n 2) segments and will be expensive Use a divide-and-conquer technique to design a bus system that uses (n log n) route segments and which requires a person to wait through at most 1 extra segment when going from any i to any j (as long as i S j, i.e., we only consider North-bound routes for simplicity, and all buses run North). In other words, a commuter can travel from any i to any j by using at most 2 segments. (a) For the base cases n-1, 2, design a system using at most 1 route (b) For n > 2 we will use divide-and-conquer. Assume that we already put in place routes connecting the first n/2 stops and routes connecting the last n/2 stops so that if i and j both belong to the same half, we can get from i to j in at most 2 segments. Show how to add O(n) additional routes so that if i is in the first half and j is in the second half we can get from i to j in 2 segments. (c) Write the recurrence for the number of routes your solution use and solve it using the master theorem The city of California commissions you to design a new bus system which has n stops numbered 1,2,. ,n on the North-bound route (lets ignore the South-bound route). Commuters may begin their journey at any stop i and end at any other stop j>i. Consider the following approach: (a) You can have a bus run from the southern-most point to the northernmost point as a traditional busline might run. The system would be cheap because it only requires n segments for the entire system. However, a person traveling from stop-0 to stop j = n must travel through all n segments. This system will be slow for that person. (b) You can have a special express bus run from every point to every other destination. No person will every wait through any unnecessary segments no matter where they start and end. However, this system requires (n 2) segments and will be expensive Use a divide-and-conquer technique to design a bus system that uses (n log n) route segments and which requires a person to wait through at most 1 extra segment when going from any i to any j (as long as i S j, i.e., we only consider North-bound routes for simplicity, and all buses run North). In other words, a commuter can travel from any i to any j by using at most 2 segments. (a) For the base cases n-1, 2, design a system using at most 1 route (b) For n > 2 we will use divide-and-conquer. Assume that we already put in place routes connecting the first n/2 stops and routes connecting the last n/2 stops so that if i and j both belong to the same half, we can get from i to j in at most 2 segments. Show how to add O(n) additional routes so that if i is in the first half and j is in the second half we can get from i to j in 2 segments. (c) Write the recurrence for the number of routes your solution use and solve it using the master theorem

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

What is the education level of your target public?

Answered: 1 week ago