Open Arthur-Kitsuragi opened 1 year ago
I do not know if it is useful, but in par.b i found more accurate expression for height : h = floor(log d (n(d-1) + 1))
For (b), I think you're right. Since $\Theta(\log_d n)$ is also correct, I'll leave it as it is for now. For (c), Updated the if-clause in the pseudocode.
Thank you!
You have written the function d-ARY-CHILD(i, j) in par. a, in par.c you are using d-ARY-CHILD(k, i), which is not correct. It should be d-ARY-CHILD(i, k). Moreover, I find no sense in using two if-clauses : if d-ARY-CHILD(k, i) ≤ A.heap-size and A[d-ARY-CHILD(k, i)] > A[i] ; if A[d-ARY-CHILD(k, i)] > A[largest]. if d-ARY-CHILD(k, i) ≤ A.heap-size and A[d-ARY-CHILD(i,k)] > A[largest] will be enough.