Questions Chapter 10 Flashcards

1
Q

A 2-3-4 tree is a multiway tree with up to ______ keys and ______ children per node.

A

up to three keys and four children per node

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

In a multiway tree, the keys in a node are arranged in __________ order.

A

ascending

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

In a 2-3-4 tree, all insertions are made in ______ node(s), and all the _____ nodes are on the same level

A

all insertions made in leaf nodes, all leaf nodes on same level

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

In a 2-3-4 tree, a 2-node has ____ key(s) and _____ child/children, a 3-node has ____ key(s) and _____ child/children, and a 4-node has _____ key(s) and ______ child/children

A

2-node has one key, two children
3-node has two keys, three children
4-node has three keys, four children

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

True or False: there is no 1-node in a 2-3-4 tree

A

True

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

Insertion into a 2-3-4 tree requires than any full node be split on the way _____ the tree, during the search for insertion point.

A

down

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

Splitting the ______ creates two new nodes; splitting any other node creates _____ new node

A

splitting the root creates two new nodes, splitting any other node creates one new node.

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

The height of a 2-3-4 tree can increase only when ___________________.

A

the root is split

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

Search times in a 2-3-4 tree is proportional to ______

A

height

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

True or False: the 2-3-4 tree is efficient because all the nodes are full

A

False

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

A 2-3 tree is similar to a 2-3-4 tree, except that it can have only one or two data items and up to _______ children.

A

three

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

Insertion in a 2-3 tree involves finding the appropriate ________ and then performing ________ from the from the insertion point in the _________ direction, until a non-full node is found

A

find the appropriate leaf, perform splits, upward direction

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

A ______ tree is a multiway tree in which each node may have dozens or hundreds of keys and children

A

b-tree

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

There is always one more ______ than there are ______ in a b-tree node

A

one mor child than there are keys in a b-tree node

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

A 2-3-4 tree is so named because a node can have:

a. three children and four data items
b. two, three, or four children
c. two parents, three children, and four items
d. two parents, three items, and four children

A

b. two, three, or four children

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

A 2-3-4 tree is superior to a binary search tree in that it is _________

A

balanced

17
Q

Imagine a parent node with data items 25, 50, and 75. If one of its child nodes had items with values 60 and 70, it would be child numbered _____

A

2

18
Q

True or False: Data items are located exclusively in leaf nodes

A

False

19
Q

Which of the following is NOT true each time a node is split?

a. exactly one new node is created
b. exactly one new data item is added to the tree
c. one data item moves from the split node to its parent
d. one data item moves from the split node to its new sibling

A

a. exactly one new node is created

20
Q

A 2-3-4 tree increases its number of levels when ________

A

root split

21
Q

Searching a 2-3-4 tree does NOT involve:

a. splitting nodes on the way down if necessary
b. picking the appropriate child to go to, based on data items in a node
c. ending up at a leaf node if the search key is not found
d. examining at least one data item in any node visited

A

a. splitting nodes on the way down if necessary

22
Q

After a non-root node of a 2-3-4 tree is split, does its new right child contain the item previously numbered 0, 1, or 2?

A

2

23
Q

Which of the following statements about a node-splitting operation in a 2-3 tree is NOT true:

a. the parent of a split node must also be split if it is full
b. the smallest item in the node being split always stays in the node
c. when the parent is split, child 2 must always be disconnected from its old parent and connected to the new parent
d. the splitting process starts at a leaf and works upward

A

c. when the parent is split, child 2 must…

24
Q

What is the efficiency of a 2-3 tree?

A

O(logN)

25
Q

In accessing data on a disk drive:

a. inserting data is slow, but finding the place to write data is fast
b. moving data to make room for more data is fast because so many items can be accessed at once
c. deleting data is unusually fast
d. finding the place to write data is comparatively slow but a lot of data can be written quickly

A

d. finding the place to write data is slow, but a lot of data can be written quickly.

26
Q

True or False: Node splits in a B-tree have similarities to node splits in a 2-3 tree

A

True

27
Q

In external storage, indexing means keeping a file of:

a. keys and their corresponding blocks
b. records and their corresponding blocks
c. keys and their corresponding records
d. last names and their corresponding keys

A

a. keys and their corresponding blocks