Introduction to trees and coding

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The given tree represents the algebraic expression _____.

(3 * y) + (2 - x)

When using the Huffman coding algorithm to code the word "goodness," the letter n is encoded as _____.

010

For the given Huffman tree, the binary encoded version of "CAB" is

01000001

When using the Huffman coding algorithm to code the word "goodness," the letter e is encoded as _____.

011

What is the height of the rooted tree?

3

What is the definition of an internal vertex?

An internal vertex is a vertex with at least one child.

Name all the sibling pairs of the rooted tree.

B and C; D, E, and F; G and H

A _____ requires that the number of inner nodes in the left subtree and the number of inner nodes in the right subtree differ by 1, at most. This applies to each node in the tree.

Balanced tree

What m-ary is a Huffman tree?

Binary

What is an ancestor of D?

C

What is an internal vertex of the rooted tree?

C

What vertex is in level two of the rooted tree?

C

The _____ is the number of edges from a node to a tree's root node.

Depth of a node

D is a child of C and has a sibling. Which vertex is the sibling of D?

E

If F and G are siblings, which vertex is the parent?

E

In the rooted tree, which vertex is a leaf?

F - or - B

A _____ requires that all nodes have exactly two children, and all leaves are at the same depth.

Full binary tree

What is a leaf of the rooted tree?

G

A _____ refers to a binary tree that is used to determine the encoding of symbols.

Huffman tree

Which of the following is a characteristic of Huffman coding?

It is a method for data compression. - or - Huffman coding reduces the number of bits that are needed to represent a string.

Which of the following is an attribute of a full binary tree?

It is an undirected graph.

Does this tree represent a binary tree? Why or why not?

No, vertex B has 3 children, and a binary tree can only have zero or 2 children.

The _____ has a designated vertex as the root of the tree. All edges start from the root.

Rooted Tree

What is the restriction for a tree labeled as a 4-ary tree?

The maximum number of children for any parent is 4.

The _____ refers to the number of children of a node.

degree of a node


Set pelajaran terkait

Chapter 18: The Endocrine System (copied)

View Set

Chapter 23: Circulation (Test Questions)

View Set

Mastering Biology (The Evolution of Populations)

View Set

Peritoneum, Peritoneal Cavity, Viscera and Vasculature  

View Set