Question

1. If T is a tree with 999 vertices, then T has_edges (5 pts) 2. There are 3. The best comparison-based sorting algorithms for a list of n items have complexity ). (5 pts) 4. If T is a binary tree with 100 vertices, its minimum height is 5. If T is a full binary tree with 101 vertices, its maximum height is 6. If T is a full binary tree with 50 leaves, its minimum height is 7. Every full binary tree with 61 vertices has 8. Every full binary tree with 50 leaves has full binary trees with six vertices (10 pts) (5 pts) (5 pts) (5 pts) leaves (5 pts) vertices (5 pts)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ans 1 .

Total number of vertices = total edge + 1;

so T has 998 edge.

Ans 2.

zero full binary tree .

Internal nodes is I = (N – 1)/2

you cant take 2.5 internal node

Ans 3.

O(n log(n))

Ans 4.

6.

?log2n?

or

?log2n+1??1

Ans 5.

The number of node n the complete binary tree in between2^h (min) and 2^(h+1)-1 max

Ans 6.

5

leaf node in full binary tree is 2^h.

Ans 7.

The number of leaf nodes in a full binary tree with n nodes is equal to (n+1)/2.

31

Ans 8.

50 leaves so internal is 50-1

total 99;

Add a comment
Know the answer?
Add Answer to:
1. If T is a tree with 999 vertices, then T has_edges (5 pts) 2. There...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Canvas →XC 6 D Question 10 5 pts When sorting n records, Quicksort has worst-case cost...

    Canvas →XC 6 D Question 10 5 pts When sorting n records, Quicksort has worst-case cost On) On 2) On logn) Olm Question 11 5 pts In the worst case, the very best that a comparison based sorting algorithm can do when sorting n records is On 2) Allog in! (n) (login) Question 12 5 pts An AVL tree is a Binary Search Tree that has the following additional property none of the above for every node in the tree....

  • Suppose that a full m-ary tree T has 109 vertices and height 2. (a) What are...

    Suppose that a full m-ary tree T has 109 vertices and height 2. (a) What are the possible values of m? (b) Assume also that T has at least 84 leaves. Now what are the possible values of m? (c) What value of m maximizes the number of internal vertices in T? (d) For this value of m identify the number of leaves and number of internal vertices at each level of T.

  • C++ Question 1 5 pts A binary heap's structure is an AVL tree a complete binary...

    C++ Question 1 5 pts A binary heap's structure is an AVL tree a complete binary tree a particular case of binary search tree a sparse tree Question 2 5 pts When using a hash table with quadratic probing, and the table size is prime, then a new element can always be inserted if the table is at least half empty the table is full the table is at least half full the table is larger than any data value...

  • Recall from Assignment 2 the definition of a binary tree data structure: either an empty tree,...

    Recall from Assignment 2 the definition of a binary tree data structure: either an empty tree, or a node with two children that are trees. Let T(n) denote the number of binary trees with n nodes. For example T(3) 5 because there are five binary trees with three nodes: (a) Using the recursive definition of a binary tree structure, or otherwise, derive a recurrence equation for T(n). (8 marks) A full binary tree is a non-empty binary tree where every...

  • Trees and Heaps 1. Show that the maximum number of nodes in a binary tree of...

    Trees and Heaps 1. Show that the maximum number of nodes in a binary tree of height h is 2h+1 − 1. 2. A full node is a node with two children. Prove that the number of full nodes plus one is equal to the number of leaves in a nonempty binary tree. 3. What is the minimum number of nodes in an AVL tree of height 15? 4. Show the result of inserting 14, 12, 18, 20, 27, 16,...

  • Suppose that a full m-ary tree T has 109 vertices and height 2. (a) What are the possible values of m? (b) Assume also that T has at least 84 leaves. Now what are the possible values of m? (c) What v...

    Suppose that a full m-ary tree T has 109 vertices and height 2. (a) What are the possible values of m? (b) Assume also that T has at least 84 leaves. Now what are the possible values of m? (c) What value of m maximizes the number of internal vertices in T? (d) For this value of m identify the number of leaves and number of internal vertices at each level of T.

  • Please indicate whether the following statements are true or false by circling the correct answer: Every...

    Please indicate whether the following statements are true or false by circling the correct answer: Every complete binary tree with n nodes has a height O(lg n). True                       False The array [19, 14, 17, 6, 8, 4, 11, 2, 5] forms a max-heap. True                       False O(3n + lg n) ≠ O(n) True                       False A comparison-based sorting algorithms cannot have an asymptotic run time of O(lg n) True                       False The recurrence relation that indicates the asymptotic running time...

  • QUESTION 9 Consider the following binary search tree: If the root node, 50, is deleted, which node will become the new root?   A 15 B 24 C 37 D 62    QUESTION 10 In the...

    QUESTION 9 Consider the following binary search tree: If the root node, 50, is deleted, which node will become the new root?   A 15 B 24 C 37 D 62    QUESTION 10 In the following trees EXCEPT______, the left and right subtrees of any node have heights that differ by at most 1. A complete trees B perfect full trees C balanced binary trees D binary search trees    QUESTION 11 A perfect full binary tree whose height is 5 has...

  • C++ Question 5 5 pts In a min-heap of N elements, if we want to find...

    C++ Question 5 5 pts In a min-heap of N elements, if we want to find the max element, we have to search all the leaves. What is the big-o running time of findMax? O(N^2) Oſlog N) O(N) OIN log N) Question 6 5 pts An AVL tree is a Binary Search Tree that has the following additional property for every node in the tree, the height of the left and right subtrees is the same none of the above...

  • Exercise 1 (a) Proof that (by an example with10) the number of terminal vertices in a...

    Exercise 1 (a) Proof that (by an example with10) the number of terminal vertices in a binary tree with n vertices is (n 1)/2. (b) Give an example of a tree (n> 10) for which the diameter is not equal to the twice the radius. Find eccentricity, radius, diameter and center of the tree. (c) If a tree T has four vertices of degree 2, one vertex of degree 3, two vertices of degree 4, and one vertex of degree...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT