Introduction of Algorithms Flashcards

1
Q

Characteristics/ Criteria of an algorithm

A

1.)Input: 0 or more external inputs
2.)Output: At least one o/p
3.)Finiteness: Algo must terminate in finite time and have finite number of steps
4.)Definiteness: Each step in algo must unique (clear and unambiguous)

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

Give example of algo with no i/p

A

Random number generator

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

Steps to design algo

A

1.)Device an algo
2.)Validation of an algo
3.)Analysis of an algo
4.)Testing of computer program

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

Analysis of an algo

A

Estimation of CPU execution time and main memory space required to complete execution of an algo

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

Differentiate between Decidable and Undecidable Problem

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

Decidable problem (Key Characteristic)

A

A problem for which an efficient algorithm exists

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

Decidable Problem - Time Complexity

A

A problem which required polynomial time to solve by using a deterministic algorithm for finite input

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

Decidable Problem - CPU Computations

A

For n inputs, the number of computations to solve the problem is
{n, n², nlogn, nᶜ} indicating polynomial CPU computations.

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

Undecidable Problem - Key Characteristic

A

A problem for which no efficient algorithm exists

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

Undecidable Problem - Time Complexity

A

A problem which required exponential time to solve by using a deterministic algorithm for finite input

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

Undecidable Problem - CPU Computations

A

For n inputs, the number of computations to solve the problem is
{2ⁿ,3ⁿ,n!,nⁿ} indicating exponential CPU computations

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

Decidable Problem - Termination

A

A decidable problem always terminates in finite time.

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

Undecidable Problem - Termination

A

An undecidable problem may or may not terminate in finite time.

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

Asymptotic notations

A

Used for asymptotic comparisons
O, Ω (uppercase omega), Θ (theta), ω(lowercase omega)

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

Asymptotic comparision

A

Growth rate between non-negative functions f(n),g(n) for large n values [n->∞]
here f(n),g(n) non-negative functions

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

Asymptotically comparison between f(n) and g(n) where f(n), g(n)<0. (3)

17
Q

Big O notation

18
Q

Omega Notation

19
Q

Relationship between omega and big O notation

20
Q

Relationship between omega and big O notation