Question: Recall that in a 2 - 3 - 4 tree, whenever we insert a new key we immediately split ( on our way down the
Recall that in a tree, whenever we insert a new key we immediately split on our way down the tree any node we see that is full has keys in it In the worst case, every node that we see is full and has to be split, so the number of splits that we do in a single operation can be Prove that the amortized number of splits is only
Hint: Using a piggy bank at every node which stores a token if the node is full or equivalently, a potential function which is equal to the number of full nodes does not work. Why not? Can you modify the bankspotential functions?
Note: this does not mean that the amortized running time of an insert is since this is not true; it just means that the amortized number of splits is So think of "cost" not as "time", but as "number of splits". Since we didn't talk about them in class, feel free to assume there are no delete operations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
