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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started