Exam 11: Trees

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

How many nonisomorphic trees are there with four vertices? Draw them.

Free
(Essay)
4.8/5
(34)
Correct Answer:
Verified

There are two nonisomorphic unrooted trees with four vertices, as shown. There are two nonisomorphic unrooted trees with four vertices, as shown.

(a) Suppose that a full 3-ary tree has 100 internal vertices. How many leaves does it have? (b) Suppose that a full 4-ary tree has 100 leaves. How many internal vertices does it have?

Free
(Essay)
4.7/5
(32)
Correct Answer:
Verified

(a) A full 3-ary tree with 100 internal vertices has l = (3 − 1) · 100 + 1 = 201 leaves. (b) A full 4-ary tree with 100 leaves has i = (100 − 1)/(4 − 1) = 33 internal vertices.

Perform a preorder, inorder, and postorder traversal of the rooted tree below. Perform a preorder, inorder, and postorder traversal of the rooted tree below.

Free
(Essay)
4.9/5
(34)
Correct Answer:
Verified

The preorder traversal is a, b, e, f, j, k, c, d, g, h, i; the inorder traversal is e,b,j,f,k,a,c,g,d,h,ie , b , j , f , k , a , c , g , d , h , i and the postorder traversal is e, j, k, f, b, c, g, h, i, d, a.

Construct an expression tree for (3+x)5y( 3 + x ) - 5 \cdot y and write this expression is prefix form and postfix form.

(Essay)
4.9/5
(38)

Use backtracking to find a sum of integers in the set {18, 19, 23, 25, 31} that equals 44.

(Essay)
4.9/5
(30)

Use a depth-first search to find a spanning tree of the following graph. Start at the vertex a, and use alphabetical order. Use a depth-first search to find a spanning tree of the following graph. Start at the vertex a, and use alphabetical order.

(Essay)
4.7/5
(33)

Is the code A:11, B:10,C:0\mathrm { A } : 11 , \mathrm {~B} : 10 , \mathrm { C } : 0 a prefix code?

(Essay)
5.0/5
(43)

A tree has 99 edges. How many vertices does it have?

(Essay)
4.9/5
(38)

Is the code A: 111, B: 101, C: 011, D: 010, E: 10, F: 1101 a prefix code?

(Essay)
4.7/5
(31)

Form a binary search tree from the words of the sentence This test is not so difficult, using alphabetical order, inserting words in the order they appear in the sentence.

(Essay)
4.7/5
(39)

Which of the following graphs are trees ? Explain your answers. a) Which of the following graphs are trees ? Explain your answers. a)   b)   C)   b) Which of the following graphs are trees ? Explain your answers. a)   b)   C)   C) Which of the following graphs are trees ? Explain your answers. a)   b)   C)

(Essay)
4.8/5
(27)

Find a minimum spanning tree in the following weighted graph using Prim's algorithm. Find a minimum spanning tree in the following weighted graph using Prim's algorithm.

(Essay)
4.8/5
(35)

Use Prim's algorithm to find a minimum spanning tree for the following weighted graph. Use alphabetical

(Essay)
4.8/5
(33)
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)