Exam 11: A: Trees

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Draw a parsing tree for (a − (3 + 2b))/(c2 + d).

(Essay)
4.9/5
(76)

If T is a tree with 17 vertices, then there is a simple path in T of length 17.

(True/False)
4.7/5
(71)

fill in the blanks. -If T is a binary tree with 100 vertices, its minimum height is ____.

(Short Answer)
4.8/5
(80)

fill in the blanks. -If T is a full binary tree of height h, then the minimum number of leaves in T is and the maximum number of leaves in T is ____.

(Short Answer)
4.8/5
(82)

Use the bubble sort to sort the list 5, 4, 3, 2, 1 in increasing order.

(Essay)
4.9/5
(82)

fill in the blanks. -If T is a full binary tree with 50 internal vertices, then T has ____ vertices.

(Short Answer)
4.8/5
(73)

Is the code given by c : 00, h : 10, d : 1101, e : 101, z : 111 a prefix code?

(Essay)
4.9/5
(75)

refer to this graph.  refer to this graph.   -Using reverse alphabetical ordering, find a spanning tree for the graph by using a breadth-first search. -Using reverse alphabetical ordering, find a spanning tree for the graph by using a breadth-first search.

(Essay)
4.8/5
(78)

In a binary tree with 16 vertices, there must be a path of length 4.

(True/False)
5.0/5
(85)

The string −⋅2−xa+4y- \cdot 2 - x a + 4 y is prefix notation for an algebraic expression. Write the expression in infix notation.

(Essay)
4.8/5
(84)

refer to this graph. refer to this graph.   -Using reverse alphabetical ordering, find a spanning tree for the graph by using a depth-first search. -Using reverse alphabetical ordering, find a spanning tree for the graph by using a depth-first search.

(Essay)
4.8/5
(74)

fill in the blanks. -Every full binary tree with 50 leaves has ____ vertices.

(Short Answer)
4.9/5
(81)

Suppose T is a full m-ary tree with l leaves. Prove that T has (l − 1)/(m − 1) internal vertices.

(Essay)
4.7/5
(76)

Suppose you have 50 coins, one of which is counterfeit (either heavier or lighter than the others). You use a pan balance scale to find the bad coin. Prove that 4 weighings are not enough to guarantee that you find the bad coin and determine whether it is heavier or lighter than the other coins.

(Essay)
4.9/5
(76)

Use Huffman coding to encode these symbols with given frequencies: a : 0.35, b : 0.4, c : 0.2, d : 0.05. What is the average number of bits required to encode a character?

(Essay)
4.8/5
(79)

Every tree is planar.

(True/False)
4.8/5
(91)

Suppose you have 5 coins, one of which is heavier than the other four. Draw the decision tree for using a pan balance scale to find the heavy coin.

(Essay)
5.0/5
(85)

fill in the blanks. -Every 3-ary tree with 13 vertices has ____ leaves.

(Short Answer)
4.8/5
(58)

refer to this graph.  refer to this graph.   -Using alphabetical ordering, find a spanning tree for this graph by using a depth-first search. -Using alphabetical ordering, find a spanning tree for this graph by using a depth-first search.

(Essay)
4.9/5
(71)

Prove that if T is a full m-ary tree with l leaves, then T has (ml − 1)/(m − 1) vertices.

(Essay)
4.8/5
(87)
Showing 41 - 60 of 94
close modal

Filters

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