Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Scapegoat tree
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Sketch of proof for cost of deletion==== Suppose the scapegoat tree has <math>n</math> elements and has just been rebuilt (in other words, it is a complete binary tree). At most <math>n/2 - 1</math> deletions can be performed before the tree must be rebuilt. Each of these deletions take <math>O(\log n)</math> time (the amount of time to search for the element and flag it as deleted). The <math>n/2</math> deletion causes the tree to be rebuilt and takes <math>O(\log n) + O(n)</math> (or just <math>O(n)</math>) time. Using aggregate analysis it becomes clear that the amortized cost of a deletion is <math>O(\log n)</math>: <math> {\sum_{1}^{n/2} O(\log n) + O(n) \over n/2} = {{n \over 2}O(\log n) + O(n) \over n/2} = O(\log n) \ </math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)