4.4.4 Classification of Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is used to compare algorithms?

A

Space and time complexity.

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

What are the four methods of comparing algorithms?

A

Factorials (permutations)
Big O notation.
Function mapping
Time vs space complexity.

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

What is big o notation used for?

A

Describing the complexity of an algorithm, always assuming the worst case scenario.

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

What is the big o notation for linear search.

A

O(n)

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

What is the big O notation for bubble sort.

A

O(n2)

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

What is the big o notation for merge sort

A

O(nlog(n))

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

What is the big O notation for binary search?

A

O(log(little2(n))

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

What are the two measurements of the limitations of computation.

A

Tractability and intractability

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

Define a tractable problem

A

Have a polynomial or less time solution.

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

On a graph, what do all functions, except constant, grow by?

A

All functions grow, as the input increases.

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

What is the big o notation for constant?

A

O(c)

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

What is the big O notation for logarithmic?

A

O(log(small2(n))

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

What is the big o notation for linear?

A

O(n)

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

What is the big o notation for linear logarithmic?

A

O(nlog(n))

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

What is the big o notation for polynomial?

A

O(n^2)

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

What is the second big o notation for polynomial, in terms of checking 3D coordinates?

A

O(n^3)

17
Q

What is the big o notation for exponential?

A

O(2^n)

18
Q

What is the big o notation for factorial?

A

O(n!)

19
Q

What is a tractable problem?

A

A problem that can be solved within a useful period of time.

20
Q

What is an intractable problem?

A

Effectively insoluble problems as they take too long to solve which is unlikely to be useful - due to the limitations of computation.

21
Q

How can intractable problems be solved?

A

Using heuristics to provide an approximate solution to a problem.

22
Q

What is the problem with using heuristics as a method of solving intractable problems.

A

They are not optimal and are only approximate solutions.

23
Q

What does the halting problem demonstrate?

A

That there are some problems which can not be solved by computers.

24
Q

What are factorials useful for?

A

Calculating permutations.

25
Q

What is the halting problem?

A

It is impossible to write an algorithm to determine if another algorithm will finish with a given input.

26
Q

What is Computability?

A

Whether a problem can be solved or not.

27
Q

What is feasability?

A

How efficiently a problem can be solved

28
Q

What is time as a measurement of feasibility?

A

How long the algorithm takes to execute.

29
Q

What is space as a measure of feasabiltiy?

A

How much memory the algorithm used for the storage of data during execution.

30
Q

What happens when more than one algorithm exists?

A

There can be a trade off between time and space efficiency. One may be quicker but requires more memory than another.

31
Q

How do we measure efficiency?

A

The amount of space and time depends on the numbers of inputs to a specific algorithm.

32
Q

How do we express efficiency:

A

A function of the numbers of inputs to algorithms aka N

33
Q

In terms of time complexity, what are the influencing factors?

A

Processor clock speed.
Efficiency of hardware implementation of operations used.
Other processes executing concurrently.

34
Q

What does big o notation focus on?

A

The algorithm rather than the hardware that is being executed on.

35
Q

Outline the best case scenario.

A

An initial list is already ordered and the algorithm terminates after on iteration.