Regular ternary ordered tree

140 Views Asked by At

I’m not too familiar with ordered tree. I’m solving excercise about tree but i’m not sure it is right or wrong

How many regular ternary ordered tree with height 3 (ordered tree means children of each vertex are assigned a fixed ordering)? What is the smallest and biggest radius for tree with height k?

Attempt: For regular ternary ordered tree with height 3 There will be 9 node that will have children: 9C1 +9C2+9C3+9C4+9C4+9C5+9C6+9C7+9C8+9C9

Ordered tree with height of 3 , the total possibility tree are 511. Because all sum possible combination of 9Ck (1<=k<=9) =511

Or other way multiplication of possibility in each subtree from level 1. First subtree will be 3C0 +3C1+3C2+3C3= 8 , because there are 3 subtree in height 1 so 8x8x8=512-1=511 , why substract 1 because 9C0 makes tree height 2

And smallest and biggest radius for tree with height k will be k for radius and 2k for diameter

Is this right?

enter image description here

1

There are 1 best solutions below

8
On

I think you've undercounted trees of height 3. Moreover, I don't have any idea what your "9 nodes that will have children" are.

This is an example of a regular ternary ordered tree of height 3:

  o
 /|\
o o o
 /|\
o o o
 /|\
o o o

I think there are almost 1000 different regular ternary ordered trees of height 3.

Note also that this example has radius 2.