Efficiency of Algorithms - Part 2 Flashcards

1
Q

What do data structure courses actually mean when they say Big-O?

A

Big-Ø

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

Big-Omega is essentially the ____ of Big-O

A

opposite

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

big-omega defines a ___ ___

A

partial order

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

What is the difference in the definitions of Big -O and Big-Omega?

A

where we had f of n less than or equal to g of n before, we now have f of n greater than or equal to g of n.

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

T/F: Big-Theta is defined using both Big-O and Big-Omega

A

True

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

Big-Theta is the ____ of Big-Omega and Big-O

A

intersection

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

Why isn’t Big-O unique?

A

it is just an ordering

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

Rather than ___ ___ Big-Theta defines an ___ ___

A

partial order

equivalence relation

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

What does an equivalence relation mean?

A

when some function f is in Big-Theta of g, both functions grow at the same rate

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

When do we say that f and g are equivalent?

A

When Big-Theta of f is equal to Big-Theta of g

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

T/F: n and 2n are equal according to Big-Theta.

A

True

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

T/F: n and n2 are equal according to Big-Theta

A

False. not equal

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

Big-Theta groups functions into ____ ____

A

equivalence classes

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

What do all members of an equivalence class have in common?

A

They grow at the same rate

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

list the axioms required for a relation to be an equivalence relation

A

reflexive

Symmetric

Transitive

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

define the Symmetric axiom

A

when x is equal to y y is equal to x

17
Q

What do equivalence relations do to sets?

A

partition them into equivalence classes

18
Q

list 2 equivalence relations

A

modulo 4

equality of fractions

19
Q

What resources are we interested in measuring the efficiency of?

A

CPU time

Memory

20
Q

what technique did we use to figure out CPU time?

A

counting lines of code

21
Q

T/F: In many cases, the memory requirements are constant.

A

True

22
Q

One of which two program features need to be present for the memory requirements to be more than constant?

A

dynamic allocation of memory

recursion

23
Q

Why does recursion need more memory?

A

It uses increasing amounts of the compiler’s run-time stack as the depth of recursion increases

24
Q

How can we determine the complexity of a problem?

A

considering the most efficient known algorithms for solving a particular problem

25
Q

What are intractable problems?

A

problems for which all known algorithms require more than polynomial time. the are amount the most difficult solvable problems.