ALGORITHM ANALYSIS Flashcards

1
Q

is an important part of computational
complexity theory, which provides theoretical estimation for
the required resources of an algorithm to solve a specific
computational problem.

A

ALGORITHM ANALYSIS

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

(1)______ of (2)______ is the determination of the amount of
time and space resources required to execute it.

A

(1)ANALYSIS (2)ALGORITHM – ALGORITHM ANALYSIS

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

TYPES OF ALGORITH ANALYSIS

A

BEST CASE
WORST CASE
AVERAGE CASE

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

Define the input for which algorithm takes less time or minimum time.

A

BEST CASE

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

In the _______ calculate the lower bound of an algorithm.

A

BEST CASE

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

In the linear search when search data is
present at the first location of large data then the _______ occurs.

A

EXAMPLE OF BEST CASE

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

Define the input for which algorithm takes a long time or maximum time.

A

WORST CASE

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

In the ________ calculate the upper bound of an algorithm.

A

WORST CASE

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

In the linear search when search data is not present at all then the ______ occurs.

A

EXAMPLE OF WORST CASE

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

In the ________ take all random inputs and calculate the computation time for all inputs. And then we divide it by the total number of inputs.

A

AVERAGE CASE

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

Notations in Complexity Analysis of
Algorithms

A

BIG-O NOTATION (O)
OMEGA NOTATION (Ω)
THETA NOTATION (Θ)

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

◦We define an algorithm’s worst-case time complexity by using the ________ , which determines the set of functions grows slower than or at the same rate as the expression.

A

BIG-O NOTATION

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

it explains the maximum amount of time an algorithm requires to consider all input values.

A

BIG-O NOTATION

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

◦It defines the best case of an algorithm’s time complexity, the ________ defines whether the set of functions will grow faster or at the same rate as the expression.

A

OMEGA NOTATION

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

it explains the minimum amount of time an algorithm requires to consider all input values.

A

OMEGA NOTATION

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

◦It defines the average case of an algorithm’s time complexity, the __________ defines when the set of
functions lies in both O(expression) and Omega(expression), then ________ is used.

A

THETA NOTATION

17
Q

This is how we define a time complexity average case for an algorithm.

A

THETA NOTATION

18
Q

The ____________ of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the
length of the input.

A

TIME COMPLEXITY

19
Q

How to get the time complexity? GIVE ALL

A

◦Break the algorithm/function into individual operations.
◦Calculate the big O of each operation.
◦Add up big O of each operation together
◦Remove the constants
◦Find the highest order term.

20
Q

How to get the time complexity? GIVE THE FIRST TWO STEPS

A

◦Break the algorithm/function into individual operations.
◦Calculate the big O of each operation.

21
Q

How to get the time complexity? GIVE THE LAST THREE STEPS

A

◦Add up big O of each operation together
◦Remove the constants
◦Find the highest order term.

22
Q

The amount of memory needed to solve a particular instance of the computational issue.

A

SPACE COMPLEXITY

23
Q

TWO MAIN COMPONENT OF SPACE COMPLEXITY – GIVE FIRST

A

◦A fixed part that is a space required to store certain data and variables, that are independent of the size of
the problem. For example, simple variables and constants used, program size, etc.

24
Q

TWO MAIN COMPONENT OF SPACE COMPLEXITY – GIVE SECOND

A

◦A variable part is a space required by variables, whose size depends on the size of the problem.

25
Q

◦A fixed part that is a space required to store certain data and variables, that are independent of the size of
the problem. For example, simple variables and constants used, program size, etc.
◦A variable part is a space required by variables, whose size depends on the size of the problem.

A

TWO MAIN COMPONENT OF SPACE COMPLEXITY