Filters
Question type

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.

Correct Answer

verifed

verified

The follow...

View Answer

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.

Correct Answer

verifed

verified

Prim's algorithm adds the edges {d, e} o...

View Answer

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

Correct Answer

verifed

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 , i\) and the postorder traversal is e, j, k, f, b, c, g, h, i, d, a.

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

Correct Answer

verifed

verified

This is a prefix code since the code for ...

View Answer

(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?

Correct Answer

verifed

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.

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.

Correct Answer

verifed

verified

The edges produced b...

View Answer

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

Correct Answer

verifed

verified

We build the followi...

View Answer

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

Correct Answer

verifed

verified

The following tree represents the expres...

View Answer

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

Correct Answer

verifed

verified

Prim's algorithm adds the edge...

View Answer

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

Correct Answer

verifed

verified

If a tree has e edge...

View Answer

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)

Correct Answer

verifed

verified

The graph in part (a) is not connected, ...

View Answer

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

Correct Answer

verifed

verified

This is not a prefix ...

View Answer

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

Correct Answer

verifed

verified

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

Showing 1 - 13 of 13

Related Exams

Show Answer