[math-fun] clumpy heapsort tree
Wondering whether anyone recognizes this binary tree: 0 1 2 3 6 9 12 4 5 7 8 10 11 13 14 15 30 45 ... 240 16 17 31 32 46 47 18 21 24 27 33 36 39 42 48 51 54 57 19 20 22 23 25 26 28 29 34 35 37 38 40 41 43 44 49 50 52 53 55 56 58 59 ... (To be clear, 15 and 30 are daughters of 4, 45 and 60 are daughters of 5, and so forth.) I would think the OEIS-appropriate version was 0,1,2,3,6,9,12,4,5,7,8... or 1,2,3,4,7,10,13,5,6,8,9... Those aren't in there, but I'm not sure that's the right way to encode the tree. The parent function (starting from child 1) is 0,0,1,3,3,1,6,6,2,9,9,2,12,12,4,15,15... What I'm really wondering is whether someone's done heapsort with this arrangement before. --Steve
Could you clarify the question? The tree is recursive, building the lower sections as copies of the upper part. 345 follows the pattern of 012, just adding 3 to each node. 15-29 is a +15 copy of 0-14. The next levels will be 255-509. If we added 1 to each entry, the bit patterns might be enlightening. But I suspect this isn't news to you. What's the point? Is this a worst case for heapsort? Rich ------------- Quoting Steve Witham <sw@tiac.net>:
Wondering whether anyone recognizes this binary tree:
0 1 2
3 6 9 12 4 5 7 8 10 11 13 14
15 30 45 ... 240 16 17 31 32 46 47
18 21 24 27 33 36 39 42 48 51 54 57 19 20 22 23 25 26 28 29 34 35 37 38 40 41 43 44 49 50 52 53 55 56 58 59 ...
(To be clear, 15 and 30 are daughters of 4, 45 and 60 are daughters of 5, and so forth.)
I would think the OEIS-appropriate version was 0,1,2,3,6,9,12,4,5,7,8... or 1,2,3,4,7,10,13,5,6,8,9...
Those aren't in there, but I'm not sure that's the right way to encode the tree.
The parent function (starting from child 1) is 0,0,1,3,3,1,6,6,2,9,9,2,12,12,4,15,15...
What I'm really wondering is whether someone's done heapsort with this arrangement before.
--Steve
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (2)
-
rcs@xmission.com -
Steve Witham