subject

The city of San Juan commissions you to design a new bus system for Old San Juan 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. There are some obvious options: (a) You can have a bus run from the southern-most point to the northern- most 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 i = 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 (n2) 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 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 rst n=2 stops and routes connect- ing 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 rst 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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Someone wishes to run the software on another computer system that runs an operating system that does not support the software what can he do
Answers: 3
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
You know the right answer?
The city of San Juan commissions you to design a new bus system for Old San Juan which has n stops n...
Questions
question
Mathematics, 13.05.2021 21:00
question
Health, 13.05.2021 21:00
question
Mathematics, 13.05.2021 21:00