Question

DEPTH counting starts at 1 at the root. How many leaves does a 3-ary tree have...

DEPTH counting starts at 1 at the root.

How many leaves does a 3-ary tree have if its depth is 8? (HINT: see the pattern for a full binary tree of depth n and modify it).

Homework Answers

Answer #1

We observe the following for a full 3-ary tree :

  • With depth 1, there is just the root.
    • Number of leaves here = 1 = 30
  • With depth 2, there is 1 root, plus 3 children (which are also the leaves).
    • Number of leaves here = 3 = 31
  • With depth 3, each of the 3 nodes of depth 2 have three children each, making a total of 9 children (which are also the leaves).
    • Number of leaves here = 9 = 32

So, as seen, the general formula for the number of leaves in a full 3-ary tree of depth n, is given by

= 3n - 1

Thus, for n = 8. the number of leaves is given by

= 38 - 1

= 37

= 2187

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Problem 3 Given a BST with N nodes, how many tree shapes are there with height...
Problem 3 Given a BST with N nodes, how many tree shapes are there with height N-1? Explain your reasoning. Problem 4 Given a BST with N nodes, how many tree shapes are there with height N-2? Explain your reasoning . Problem 5 Consider an empty 2-3 tree. Draw the tree after each of the following operations is executed: insert 0, insert 9, insert 2, insert 6, insert 7, insert 3, insert 8, delete 2, delete 6
Principles of Counting: You have a ten volume set of books. a) How many different ways...
Principles of Counting: You have a ten volume set of books. a) How many different ways can the books be arranged? b) How many of these arrangements have Volume 2 somewhere to the right of Volume 1 and Volume 3 somewhere to the right of Volume 2. c) You move the books to a shelf that only holds 7 of your books. How many ways are there to arrange the seven books on this shelf? Further, how many of those...
In this lab, you will write a program that creates a binary search tree based on...
In this lab, you will write a program that creates a binary search tree based on user input. Then, the user will indicate what order to print the values in. **Please write in C code** Start with the bst.h and bst.c base code provided to you. You will need to modify the source and header file to complete this lab. bst.h: #ifndef BST_H #define BST_H typedef struct BSTNode { int value; struct BSTNode* left; struct BSTNode* right; } BSTNode; BSTNode*...
1. Conifers are gymnosperms. What does this mean? 2. How do the leaves of Ginkgo differ...
1. Conifers are gymnosperms. What does this mean? 2. How do the leaves of Ginkgo differ from the conifer’s leaves? 3. In a botanical sense, what is a pollen grain? 4. The development of a seed represents another major step in the evolution of plants. What is an advantage of having seeds? 5. In conifers that have both male and female cones in the same tree, often the female cones are produced in the upper portion of the tree while...
How many two-digit counting numbers do not contain any of the digits 1, 3, or 9?...
How many two-digit counting numbers do not contain any of the digits 1, 3, or 9? 42 numbers 72 numbers 81 numbers 49 numbers
Using the fundamental counting principle answer the following questions: 1. A sandwich company advertises that they...
Using the fundamental counting principle answer the following questions: 1. A sandwich company advertises that they have 9 different types of meat, 3 different types of cheese, and 4 different types of breads. How many different sandwiches can be made?________________ 2. A retail store stocks windbreaker jackets in small, medium, large, and extra large and all are available in blue or red. What are the combined choices and how many combined choices are there? Draw Tree Diagram 3. How many...
How many subgroups of order 3 does D3 have?
How many subgroups of order 3 does D3 have?
a. Through how many revolutions does a frisbee have to rotate to reach an angular speed...
a. Through how many revolutions does a frisbee have to rotate to reach an angular speed of 570 rad/s if it starts from rest and experiences a constant angular acceleration of 160 rad/s2? b. How long does it take the frisbee to reach the angular speed of 570 rad/s? c. A cord is wrapped around a pulley of radius 33.0 cm and mass 4.00 kg. A tension of 15.0 N is applied to end of the cord. A friction torque...
A tree T has 8 vertices, at least two of which have degree 3. a) How...
A tree T has 8 vertices, at least two of which have degree 3. a) How many edges are there? b) What are the possible vertex degrees for T in non–increasing order? c) What are the possible forms for T up to isomorphism? The answer to part a is "7" while the answer to part be is " 3,3,3,1,1,1,1,1 and 3,3,2,2,1,1,1,1" There are six possible answers for part c. how? and what are the answers?
1 A tree that is 100 years old will have how many rings of Primary Phloem?...
1 A tree that is 100 years old will have how many rings of Primary Phloem? a 0ne b one hundred c two d zero A. Other than chlorophyll b Green Algae share with all other land plants ____________. A. The ability to live submerged in water B. Seeds C. Vascular tissue D. The ability to store food as starch E. The ability to reproduce by spores