Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions