2008/12/17 Terry Reedy <tjre...@udel.edu>: > Nodes only have single number indexes if you arrange them linearly. Then the > index depends on how you arrange them, whether you start the array indexes > with 0 or 1, and whether you start the level numbers with 0 or 1. Call the > breadth-first sequence bf. Then the 1-based slice for 1-first level k is > bf[2**(k-1):2**k)]. Again, proof by induction.
Yes, I was referring to the heap numeration. Anyway, Francesco Guerrieri answered me in a private message and explained me the formula. But actually I was searching for other similar properties. -- http://mail.python.org/mailman/listinfo/python-list