Week 7 Flashcards

1
Q

Difference between computability and complexity

A

Computability is an understanding of which problems admit algorithmic solutions

Complexity talks about the complexity of the problems for which there do exist algorithms.

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

Explain computability vs feasibility

A

Of those problems which are computable (there are effective procedures) it is useful to distinguish those that are FEASIBLY COMPUTABLE

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

Name the 3 complexity classes

A

LIN - linear algorithms
P - polynomial algorithms
EXP - exponential algorithms

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

Explain LIN

A

Linear algoithm has asymptotic behaviour of form n, where n is the size of the input
As a first approximation, a linear algorithm is likely to be feasible for all data sizes.

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

Explain P

A

A polynomial algorithm has asymptotic behaviour of the form n^c where n is the size of the input.

As a first approximation, many are feasible for practical input data sizes, but unfortunately many are not.

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

Explain EXP

A

Exponential algorithms have asymptotic behaviour of the form c^n, where n is the size of the input

As a first approximation, an exponential algorithm is infeasible for all but the smallest data sizes.

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

What major computer resources are there

A

Time - elapsed period from start to finish
Space - an amount of storage space
Hardware - an amount of physical mechanism

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

What is the Big O notation

A

Indicating the quality of an algorithm in terms of asymptotic worst-case runtime.

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

What is the Extended Church-Turing thesis

A

All notions of computation can simulate each other up to a polynomial factor.
There is significant doubt about this because a highly parallel computer may be able to efficiently compute what a sequential computer cannot.

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

What is the Sequential Computation thesis

A

All notions of sequential computation can simulate each other up to a polynomial factor. All sequential computers have related execution times - any algorithm which runs in polynomial time of one computer can run in polynomial time on any other.

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

Difference between sequential and parallel computers

A

On a sequential computer, the time taken by an algorithm must be at least O(n), because the algorithm must look through all input data

On a parallel computer, the time taken can be O(log(n)) because many parts of the input can be considered simultaneously.

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

How are benchmarks often flawed?

A

Non-reproducibility
Failure to optimize
Apples vs oranges
Cold vs hot runs

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

What is non-reproducibility

A

All configuration parameters should be published so the experiment can be reproduced. In addition, source code should be available to allow others to reproduce the experiments

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

What is failure to optimize

A

The performance of an improperly configured system can be significantly worse than a normal one. Use the same configuration used in previous publications.

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

What is apples vs oranges

A

A performance comparison between two systems can only be fair if both systems do the same thing. Check that same functionality is measured - one system must provide the same results as another in all cases

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

What are hot vs cold runs

A

Initial cold runs will take significantly longer than subsequent hot runs as relevant data needs to be loaded from persistant storage into cached memory. Time 10 runs, drop the lowest two, drop the highest two, average the remaining 6.

17
Q

What is the Cobham-Edmonds Thesis?

A

Feasible problems are exactly those in P

18
Q

Examples of problems in P

A

FFT
Shortest path in a graph
Maximum flow in a graph
Primality

19
Q

What is FFT?

A

Converts waves into a spectrum
The Cooley-Tukey algorithm FFT is an O(NlogN) algorithm, which operates by decomposing an N-point time domain signal into N single-point time domain signals and calculating frequency spectra corresponding to these time domain signals.

20
Q

What is shortest path in a graph?

A

Find shortest path from one node to another in a weighted graph
O(N^3) by comparing all possible paths through a graph between each pair of vertices.

21
Q

What is maximum flow in a graph?

A

Used to find the maximum flow through a network at a time, from source to sink, given the maximum capacities of the links
O(MXf) where M is the number of links and f is the max flow.

22
Q

What is the primality test?

A

For a binary number of n digits is O(sqrt(2^n))

One version (AKS) algorithm is O(n^12), and can be greatly reduced.

23
Q

Matrix multiplication naive vs Strassen

A

Naive O(N^3)
Strassen O(N^2.8074)