Chapter 1 Algorithms Flashcards

(14 cards)

1
Q

What is an algorithm?

A

A finite sequence of steps that a computer can carry out to transform some input into some output.

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

Why is Ada Lovelace significant in computing history?

A

She is considered to have written the first computer program for Babbage’s Analytical Engine.

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

What does STAT0041 focus on?

A

Understanding algorithms at an abstract level, including complexity and data structures.

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

How does STAT0041 differ from programming courses like STAT0004?

A

STAT0041 focuses on algorithmic logic and complexity rather than actual coding.

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

What is Euclid’s GCD algorithm used for?

A

Finding the greatest common divisor of two positive integers.

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

What is computational complexity?

A

A measure of the number of steps an algorithm takes as a function of the input size.

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

What is meant by worst-case analysis?

A

Analyzing an algorithm based on the maximum number of steps it might take for any input of a given size.

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

What is big-O notation?

A

A mathematical notation used to describe the upper bound of an algorithm’s running time.

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

What does O(n) mean?

A

That the algorithm’s running time grows linearly with the input size n.

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

What is the complexity of a sequential search in an array?

A

O(n) in the worst case.

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

How does number representation affect computation?

A

Different representations (like using 7 vs 64 bits) affect the precision and possibly the step cost.

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

What is a data structure?

A

A representation of data with defined operations.

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

What is the significance of Euler’s Konigsberg bridges problem?

A

It led to the development of graph theory.

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

What is the complexity of searching a number q in an array of arrays?

A

Depends on m (number of arrays) and n (max length of arrays); worst-case is O(mn).

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