Question

An empty tree has height ________ A tree with just a root and no other nodes...

An empty tree has height ________

A tree with just a root and no other nodes has height___

The root is at depth_____

What is the maximum possible height for a tree with 31 nodes?

What is the minimum possible height for a tree with 31 nodes?

Homework Answers

Answer #1

First we have to know what is height of a tree ,it is nothing but distance from root node to any node.

Answer:0

​​​​​​empty tree has height 0

Beacuse it does not contain any nodes or elements ,so it has height 0

Answer:0

A tree with just a root and no other nodes has hieght 0

As it has only root node because it has no leaf nodes so it has height 0 as leaf nodes height is

Answer:0

As said previously root is at depth 0

As it doesn't have children, children of root is at depth 1.

Answer:30

Because

Maximum height of tree is

H=N-1

For unbalanced tree

Where H is height

31-1=30

Answer:4

Beacause minimum height of a tree is

log base2(N+1)-1

=5-1

=4

this is the minimum height

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
1. a) Suppose that a binary tree of height h has n nodes. Show that h...
1. a) Suppose that a binary tree of height h has n nodes. Show that h ≥ log2 (n+2) - 1. b) Using the formula in part (a) find the minimum height if a binary tree with 1000 nodes. c) What is the maximum possible height of a binary tree with 1000 nodes?
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
Prove that a full non-empty binary tree must have an odd number of nodes via induction
Prove that a full non-empty binary tree must have an odd number of nodes via induction
Given the list of values below, create a Binary Search Tree for the list, Use the...
Given the list of values below, create a Binary Search Tree for the list, Use the first value in the list as the root of the tree, add the nodes to BST in the order they appear in the list.[50, 44, 82, 39, 35, 98, 87, 100, 74, 23, 34, 14, 94] What is the minimum height of a Binary Tree that contains 24nodes? What is the minimum height of a Binary Tree that contains 64nodes? What is the minimum...
A binary tree isfullif every non-leaf node has exactly two children. For context, recallthat we saw...
A binary tree isfullif every non-leaf node has exactly two children. For context, recallthat we saw in lecture that a binary tree of heighthcan have at most 2h+1−1 nodes, and thatit achieves this maximum if it iscomplete, meaning that it is full and all leaves are at the samedistance from the root. Findμ(h), theminimumnumber of nodes that a full tree of heighthcan have, and prove your answer using ordinary induction onh. Note that tree of height of 0 isa single...
In heapsort we view an array as a binary tree using the following mapping: a[0] is...
In heapsort we view an array as a binary tree using the following mapping: a[0] is the root of the entire tree and for element a[i], its left child is a[2i+1] and its right child is a[2i+2]. Answer the following questions for an array of size n. ( Answers in some cases may be in terms of n.) a) What is the index of the parent a[i] for any i > 0? b) What is the biggest index for which...
Let XX represent the full height of a certain species of tree. Assume that XX has...
Let XX represent the full height of a certain species of tree. Assume that XX has a normal probability distribution with mean 186.3 ft and standard deviation 75.6 ft. You intend to measure a random sample of n=233 treess. The bell curve below represents the distibution of these sample means. The scale on the horizontal axis is the standard error of the sampling distribution. Complete the indicated boxes, correct to two decimal places. What is the Standard Deviation? What is...
2. Draw tree diagrams for two AVL trees: (a) one with a root node that has...
2. Draw tree diagrams for two AVL trees: (a) one with a root node that has a balance factor of +1 (b) one with a root note that has a balance factor of 2
In the absence of suitable fossil representatives to calibrate nodes within a molecular phylogenetic tree (i.e....
In the absence of suitable fossil representatives to calibrate nodes within a molecular phylogenetic tree (i.e. based on DNA sequences), what calculations/assumptions can be used to estimate the amount of ‘evolutionary time’ that has passed along any particular branch of the tree?
Java Program: You will be inserting values into a generic tree, then printing the values inorder,...
Java Program: You will be inserting values into a generic tree, then printing the values inorder, as well as printing the minimum and maximum values in the tree. Given main(), write the methods in the 'BSTree' class specified by the // TODO: sections. There are 5 TODOs in all to complete. Ex: If the input is like ferment bought tasty can making apples super improving juice wine -1 the output should be: Enter the words on separate lines to insert...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT