Basic Terms Flashcards

1
Q

RAM Model

A

Random Access Machine Model

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

2 Assumptions of the RAM model

A

Steps are executed sequentially, each step is an operation that takes constant time

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

Constant running time

A

O(1) complexity independent of input size

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

logarithmic running time

A

O(log n)

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

linear running time

A

O(n)

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

log-linear running time

A

O(n log n)

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

polynomial running time

A

O(n^c) where c is a constant

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

exponential running time

A

O(c^n) where c is a constant raised to a power based on the input

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

6 classes of complexity in order of worst-case speed

A

constant, logarithmic, linear, log-linear, polynomial, exponential

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

What quality should you look for in a good hash function?

A

Uniform distribution of results, to minimize collisions. Must also be deterministic.

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