0% found this document useful (0 votes)
143 views5 pages

BT Trees

This document contains 26 multiple choice questions related to topics in trees and graphs including: spanning trees, Huffman coding, binary search trees, prefix/postfix expressions, tree traversals, and properties of trees and graphs like the number of edges. The questions range in difficulty and cover a wide breadth of concepts.

Uploaded by

Nguyễn Quang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views5 pages

BT Trees

This document contains 26 multiple choice questions related to topics in trees and graphs including: spanning trees, Huffman coding, binary search trees, prefix/postfix expressions, tree traversals, and properties of trees and graphs like the number of edges. The questions range in difficulty and cover a wide breadth of concepts.

Uploaded by

Nguyễn Quang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Question 1

What is the height of spanning tree obtained from Wn by the breadth-first search, starting at the
central vertex of Wn?
Select one:
a. n-1
b. n
c. None of the other choices is correct
d. 1

Question 2
What is the total weight of the minimum spanning tree produced by the graph below:

Select one:
a. None of the other choices is correct
b. 14
c. 19
d. 16
e. 15

Question 3
Let T be a tree with 1000 vertices. Deleting a vertex and all of its incident edges we obtain 3
trees T1, T2, T3. Assume that the number of edges of T1, T2, T3 form an arithmetic progression
with difference 3. Find the number of edges of T3.

Question 4
How many leaves are there in a decision tree representing the sorting of a list of 5 elements?
Question 5
Find the value of the prefix expression:
+-*4352
Question 6
Count the number of leaves in this tree.

Question 7
Given a message 15 letters A, 17 letters B, 18 letters C, 20 letters D, 30 letters E. Find the length
of the bit string when encoding this message by a Huffman coding.

Question 8

What is the position of the letter D when using preorder traversal?

Question 9
Find the inverse Polish notation for the expression
((x + y) ↑ 2) * (y - 3 ⁄ x) + 4
Select one:
a. x y + 2 y ↑ 3 x ⁄ − * 4 +
b. x y + 2 ↑ y 3 x ⁄ − * 4 +
c. x y + 2 ↑ y 3 ⁄ x− * 4 +
d. x + y 2 ↑ y 3 x ⁄ − * 4 +
Question 10
Find the length of the bit string when encoding the message abbcccdddd by a Huffman coding.

Question 11
Find the value of the prefix expression
*+4+4↑282
Question 12
Let T be a full 4-ary tree in which all leaves are at level 3. Find the number of vertices of T.

Question 13

Draw a binary search tree for the sentence

"mot long tho me kinh cha".

Then find the number of comparisons needed to locate the word "cha".

Question 14
Find the value of the prefix expression
* + 3+ 3 * 3 ↑3 – 3 3 3

Question 15
Find the value of the postfix expression
26+3*42-72*-/

Question 16
Determine a Huffman coding for the characters
A: 0.45, B: 0.25, C: 0.2, D: 0.1
Select one:
a. A := 0 B:= 1 C:= 10 D:= 11
b. A := 0 B:= 11 C:= 110 D:= 111
c. A := 1 B:= 01 C:= 000 D:= 001
d. A := 0 B:= 11 C:= 01 D:= 00

Question 17
Find the value of the postfix expression

2 6 + 7 * 4 2 + 7 2 * - / = -7

Question 18
Let T be a tree with 1000 vertices. Deleting a vertex and all of its incident edges we obtain 3
trees T1, T2, T3. Assume that the number of edges of T1, T2, T3 form an arithmetic progression
with difference 3. Find the number of edges of T1.
Question 19
How many leaves are there in a decision tree representing the sorting of a list of 4 elements?

Question 20

What is the position of the letter D when using preorder traversal?


What is the position of the letter D when using in-order traversal?
What is the position of the letter D when using postorder traversal?

Question 21: Use Huffman coding to encode these symbols with given frequencies

A: 0.35 B: 0.2 C: 0.25 D: 0.15 E: 0.05

What is the average number of bits required to encode a character?

Question 22: Give the coding scheme

A: 001, B: 1011, C: 11, D: 0000, E: 0100, F: 011, G: 101001.

Find a and b such that we have a prefix code.


Question 23:
Find the postorder traversal of the tree

A. a-c-f-g-e-b-i-j-k-n-m-o-p-l-h-d
B. d-b-a-c-e-f-g-h-i-l-j-m-k-n-o-p
C. a-b-c-f-e-g-d-i-h-j-l-k-m-n-o-p
D. None of the other choices is correct

Question 24:
How many edges must be removed from the graph to get a spanning tree?

A. 1
B. 2
C. 3
D. 4
E. None of the other choices is correct.

Câu 25: How many non-isomorphic trees of 4 vertices?


A. 4
B. None of the other choices is correct
C. 3
D. 2
E. 1

Câu 26: How many edges in a full 3-ary tree with 101 leaves?
A. 102
B. 150
C. None of the other choices is correct
D. 101
E. 97

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy