Q2. how can i compute wn in lg n space?
by storing the probability arrays P (n, i, ·) only for nodes i on IP+(n), it is possible to compute E[Wn] in only O(n lg n) space but O(n 3 lg n) time.
Q3. What is the insertion path of the key?
Observe that during the insertion of some key with R(n) = k, a swap takes place at node i of the insertion path if and only if k ≤ An−1[i].
Q4. What is the expected number of swaps along the two links incident with the root?
When bubbling up the nodes in Lk, the expected number of swaps along the two links incident with the root is ∑2k+1−1j=2k 1/j > ln 2.
Q5. What is the rank of a number x in a set of numbers?
The rank of a number x in a set of numbers is its placement in the ordered set; thus the smallest number has rank 1, the next smallest rank 2, etc. Let An[i] be the rank of A[i] among A[1, . . . , n] after exactly n keys have been inserted.
Q6. what is the avg. exp. of the array?
Heapsize 31level avg. exp. val.0 0.031250000000000 1 0.092036756202444 2 0.205202826266408 3 0.401927398975604 4 0.703027874420290
Q7. What is the meaning of array indices?
Here and for the rest of this section, array indices are understood to be integers; any fraction x/y used an array index is actually ⌊x/y⌋.
Q8. Hence, for k k2 j=k4 l?
Hence for j ≥ k − k2 + 1,Prob{2−jBj,k > 2 j−k+2 + 2−s+1} ≤ (2 lg lg k) exp(−2kk2(lg k)8 ) .Now Σ2 ≤ ∑k−k1j=k−k2+1 2−jBj,k, soProb{Σ2 > 2 −k1+3 + (k2 − k1)2 −s+1} ≤ (k2 − k1)(2 lg lg k) exp(− 2kk2(lg k)8 ) .
Q9. What is the insertion path of nodes t?
For each node t in level Lk (k > 0) let IP (t) = {⌊t/2j⌋ : j = 1, . . . , k} be the set of nodes on the insertion path from node t to the root.
Q10. What is the method of heap building?
This method requires (2+o(1))n comparisons in the worst case to build a heap with n keys, which is less than Williams’ method takes on average.