subject

The kth quantiles of an n-element set a are the k − 1 order statistics that divide the sorted set into k equal-sized sets (to within 1). that is, the kth quantiles are select(a, n/k), select(a, 2n/k), …, select(a, (k − 1)n/k) (here we are assuming that k divides n). finding the kth quantiles directly in this way would take o(nk) time. given an unsorted array a of n distinct keys and an integer k, with 1 ≤ k ≤ n, give an o(n log k) algorithm to find the kth quantiles of a. you may assume that k divides n. you may assume that the linear-time (deterministic) select algorithm (page 220) is available as a subroutine.1. describe your algorithm in pseudocode. comment your code.2. prove that your algorithm is correct, i. e., argue that it returns the kth quantiles of a. use induction.3. analyze the running time of your algorithm, i. e., explain carefully why your code runs in o(n log k) time.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
The kth quantiles of an n-element set a are the k − 1 order statistics that divide the sorted set in...
Questions
Questions on the website: 13722362