Intro and Basics Flashcards

1
Q

What is a computational problem?

A

A general description, from inputs to outputs.

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

What s a problem instance of a computational problem?

A

A concrete input.

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

What is an algorithm?

A

A well-defined computational procedure that from inputs computes outputs. In other words, it solves a problem instance.

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

Does algorithm have to work on all inputs/problem instances?

A

Yes

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

What is a program?

A

A particular implementation of some algorithm.

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

Give a simple description of an Insertion Sort.

A

Take the next element, insert it into the already sorted part.

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

What data structure are we using for Insertion Sort

A

Array

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

In terms of the resources that the algorithm requires, what are we typically interested in?

A
  • Runtime
  • Memory
  • Number of basic operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the main parameter when analysing the running time of an algorithm?

A

Input size

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

What are the 4 types of analysis?

A
  • Exact analysis
  • Best-case
  • Worst-case
  • Average-case
How well did you know this?
1
Not at all
2
3
4
5
Perfectly