Question: A full ternary tree is a rooted tree in which every non-leaf node has exactly 3 children. We call the individual children nodes the centre,

A full ternary tree is a rooted tree in which every non-leaf node has exactly 3 children. We call the individual children nodes the centre, left and right child nodes. The root node R is the only node at depth 0 and the depth of a non-root node N is the distance from N to R.

(a) (Exactly) How many nodes are in a full ternary tree with depth d ?

(b) Find (exact) formulas for left(i), center(i), right(i) that give the index of the left, center and right children of the node with index i. The root node will be the node at index 1.

(c) Write an (exact) expression for the depth of the node with index i.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!