OT: Binary tree logarithms properties
Mr.SpOOn
mr.spoon21 at gmail.com
Wed Dec 17 18:14:41 CET 2008
Hi,
I'm searching for a clear explanation of binary tree properties,
expecially the ones related to logarithms.
For example, I know that in a tree with 2n-1 nodes, we have log(n)
levels, from 0 to log(n).
So, if k is the level, the nodes on a level have indexes between 2^k
and 2^(k+1)-1.
For k=0 we have 2 and 3.
For k=1 we have 4, 5, 6, 7
and so on.
I know this after I studied some exercises on my book. Anyway there is
no explanation or demonstration of these properties.
I know this is not the better place to ask (or maybe it is?), but
maybe someone can point me to something useful.
Thanks,
bye
More information about the Python-list
mailing list