Trees Flashcards

1
Q

is a connected undirected graph with no
simple circuits.

A

Tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Theorem in Tree

A

There is a unique simple path between any
two of its nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A (not-necessarily-connected) undirected graph without simple circuits is called a

A

forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You can think of it as a set of trees having disjoint sets of nodes.

A

forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

True or False. A graph is a Tree because it is a connected graph with no simple circuits

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A tree is not a tree “because it’s not connected”. In this case it’s called (blank) in which each connected component is a tree.

A

Forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An undirected graph without simple circuits is called a

A

Forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

is a tree in which one node has
been designated the root.

A

rooted tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True or False. Every edge is (implicitly or explicitly) directed away from the root

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

There is directed edge from u to v. What type of vertex is “u”?

A

Parent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

There is directed edge from u to v. What type of vertex is “v”?

A

Child

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Vertices with the same parents.

A

Siblings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Vertices in path from the root to vertex v, excluding v itself, including the root.

A

Ancestors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

All vertices that have v as ancestors.

A

Descendants

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Vertices that have children.

A

Internal vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Subgraphs consisting of v and its
descendants and their incident edges.

A

Subtree

17
Q

is length of unique path from
root to v.

A

Level

18
Q

Level of root?

A

0

19
Q

is maximum of vertices levels.

A

Height

20
Q

the last child of vertices

A

leaf/leaves

20
Q

A rooted tree is called (blank) if every internal vertex has no more than m children.

A

m-ary

21
Q

It is called (blank) if every internal vertex has exactly m children.

A

full m-array

22
Q

A 2-ary tree is called a

A

binary tree

23
Q

Can use trees to model the following:

A
  • Saturated hydrocarbons
  • Organizational structures
  • Computer file systems
24
Q

A tree with n vertices has
(blank) edges.

A

n - 1

25
Q

A full m-ary tree with I internal vertices and L leaves contains:

A

n(vertices) = m × I + 1
n(vertices) = I + L

26
Q

The full binary (2-ary) tree in the figure has:
Internal vertices I = 6
Leaves L = 7

A

13 = (2)(6) + 1
or
13 = 6 + 7

27
Q

For a full m-ary tree:
Given n vertices

A

I(internal vertices) = (n – 1 ) / m
and
L(leaves) = n–I=[(m–1) × n + 1]/m

28
Q

For a full m-ary tree:
Given I internal vertices

A

n(vertices) = m × I + 1
and
L(leaves) = n – I = (m – 1) × I + 1

29
Q

For a full m-ary tree:
Given L leaves

A

n(vertices) = (m × L – 1) / (m – 1)
and
I(internal vertices) = n – L = (L – 1) / (m – 1)

30
Q

Properties of Tree

True or False.
The level of a vertex in a rooted tree is the length
of the path from the root to the vertex (level of
the root is 0)

A

True

31
Q

Properties of Tree

True or False.
The height of the rooted tree is the maximum of
the levels of vertices (length of the longest path
from the root to any vertex)

A

True

32
Q

if all leaves are at levels h or h - 1 in a rooted m-ary tree, it is called a?

A

Balanced Tree

33
Q

Searching for items in a list is one of the most
important tasks that arises in computer science.
Our primary goal is to implement a searching
algorithm that finds items efficiently when the
items are totally ordered. This can be
accomplished through the use of a

A

Binary Search Tree

34
Q

is a binary tree in which each child of a vertex is designated as a right or left child, no vertex has more than one right child or left child, and each vertex is labeled with a key, which is one of the items

A

Binary Search Tree