analysis of algorithms Flashcards

1
Q

sub function

A

grows slower than the specified function

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

super function

A

grows faster than the specified function

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

ways of measuring efficiency of an algorithm

A

experimentally
theoretically

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

experimentally measuring efficiency of an algorithm + problems

A

by implementing it
problem: different computer, different compiler, all kinds of input

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

theoretically measuring efficiency of an algorithm + advanatges

A

analysing the algorithm with mathematical approach
advantages: no implementation needed, independent of the computer or compiler, applies to all possible inputs

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

big-O notation

A

expresses asymptotic upper bounds of a function
says that a function grows no faster than a certain rate

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

f(n) = O(g(n))

A

f grows no faster than g
=> f is asymptotically less than or equal to g

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

If f is function, the O(f) is the set of all functions whose orders are _______ that of f.

A

at most

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

big-Ω notation

A

expresses asymptotic lower bounds of a function
says that a function grows at least as fast as certain rate

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

f(n) = Ω(g(n))

A

f grows as lest as fast as g
=> f is assimptotically greater than or equal to g

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

If f is function, the Ω(f) is the set of all functions whose orders are _______ that of f.

A

at least

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

big-θ notation

A

characterises a tight bound
it says that a function grows at a precisely certain rate

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

If f is function, the θ(f) is the set of all functions whose orders are _______ that of f.

A

the same as

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

worst-case and best-case apply to…

A

inputs to algortihms

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

upper and lower bounds apply to…

A

functions

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

satellite data

A

data associated with keys

17
Q

record=

A

key+satellite data

18
Q

loop invariant

A

a condition that is necessarily true immediately before and after each iteration of the loop

19
Q

three things we need to show when using a loop invariant

A

initialisation
maintenance
termination

20
Q

analysing an algorithm

A

predicting the resources that it requires

21
Q
A