Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbtrees weight constant too high? #9

Open
ZelphirKaltstahl opened this issue Feb 21, 2022 · 0 comments
Open

bbtrees weight constant too high? #9

ZelphirKaltstahl opened this issue Feb 21, 2022 · 0 comments

Comments

@ZelphirKaltstahl
Copy link

ZelphirKaltstahl commented Feb 21, 2022

Hi! I just took a superficial look at the bbtrees implementation, because I was looking for the simple binary trees implementation and thought maybe that bb stands for "balanced binary". Anyway, I ended up reading about "trees of bounded balance" a.k.a. "weight balanced trees" on Wikipedia. There is states, that the balancing factor alpha should be much lower than 4:

[…] but not all values of α are appropriate; Nievergelt and Reingold proved that [… formula as picture …] is a necessary condition for the balancing algorithm to work. Later work showed a lower bound of 2⁄11 for α […] -- https://en.wikipedia.org/wiki/Weight-balanced_tree

So I wonder, if that weight in the code is used differently than the alpha in the wiki article, or whether it is a bad idea to set weight to 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant