Module 6 Flashcards

1
Q

This type of approach deals with a group of design methods base on transformation.

A

Transform and Conquer

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

In transformation, the problem’s instance is _______.

A

Modified

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

What are the three major variations of Transform and Conquer?

A

(RIP)
- Representation Change
- Instance Simplification
- Problem Reduction

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

It is a transformation to a different representation of the same instance.

A

Representation Change

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

It is a transformation into a simpler or more convenient instance of the same problem.

A

Instance Simplification

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

It is a transformation to an instance of a different problem for which an algorithm is already available.

A

Problem Reduction

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

What is the Transform and Conquer strategy flow?

A

Problem Instance -> Transform Variation -> Solution

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

What problems involving lists are easier when the list is sorted?

A

(GPECS)
- Geometric Algorithms
- Presorting
- Element Uniqueness
- Computing the median (Selection Problem)
- Searching

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

Efficiency of algorithms with pre-sorts depends on what?

A

Efficiency of Sorting

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

These comparisons are necessary in the worst case to sort a list of size “n” by any comparison-based algorithm.

A

[log2 n!] = n log2 n

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

These comparisons are also sufficient to sort array of size “n” by Merge Sort and Quick Sort.

A

n log2 n

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

What is the efficiency of Searching with Pre-sorting?

A

Θ(nlog n) + O(log n) = Θ(nlog n)

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

What is the efficiency of Element Uniqueness with Pre-sorting?

A

Θ(nlog n) + O(n) = Θ(nlog n)

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

What is the efficiency of Computing for Mode with Pre-sorting?

A

Θ(nlog n) + O(n) = Θ(nlog n)

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

The AVL tree was named after whom?

A

Adelson-Velsky and Landis

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

Who are the two Soviet inventors that published the AVL Tree?

A

Georgy Adelson-Velsky and Evgenii Landis

17
Q

When was the AVL Tree published?

A

On 1962 in a paper titled “An Algorithm for the Organization of Information”

18
Q

In computer science, it is a self-balancing binary search tree.

A

AVL Tree

19
Q

In an AVL tree, the heights of the two child subtrees of any node differ by at most how many?

A

The heights of the two child subtrees of any node differ by at most ONE.

20
Q

In an AVL tree, if at any time the nodes differ by more than one, what is done to restore this property?

A

Rebalancing

21
Q

Lookup, insertion, and deletion all take how much time in both average and worst cases?

A

O(log n)

22
Q

AVL trees are similar to _____ because both support the same set of operations and take O(log n) time for the basic operations.

A

Red-black trees

23
Q

What are the 4 types of AVL rotations?

A
  • Left Rotation
  • Right Rotation
  • Left-Right Rotation
  • Right-Left Rotation
24
Q

An unbalanced tree has a height of at least how many?

A

Two

25
Q

It is performed if a tree becomes unbalanced by inserting a node into the right subtree of the right subtree ( \ becomes ^ )

A

Left Rotation

26
Q

It is performed if a tree becomes unbalanced by inserting a node into the left subtree of the left subtree ( / becomes ^ )

A

Right Rotation

27
Q

What rotation is a combination of the left rotation followed by right rotation? ( < becomes / becomes ^ )

A

Left-Right Rotation

28
Q

What rotation is a combination of the right rotation followed by left rotation? ( > becomes \ becomes ^ )

A

Right-Left Rotation