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 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
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
question
Chemistry, 09.12.2021 23:40
question
Chemistry, 09.12.2021 23:40
question
History, 09.12.2021 23:40
question
Mathematics, 09.12.2021 23:40
Questions on the website: 13722363