Chapter 3 Flashcards
1
Q
What are 2 analysis forms
A
- Run time analysis (speed)
- Space utilization component (required memory)
2
Q
What is run time analysis
A
The main purpose of our mathematical analysis will be measuring the execution time
3
Q
What is talk time of CPU
A
We can get a particular algorithm take how much time from CPU
4
Q
How we measure execution time in suedo code
A
By the number of comparisons
5
Q
What are 2 criteria for measuring running time
A
- Worst-case time: Worst-case time is the maximum running time over all input of size n.
- Average-case time: It is the average running time over all inputs of size n
6
Q
What is the formula of wrost-case time
A
T worst(n) = max|||=n T(I)
7
Q
What is the formula of average-case time
A
T avg(n) = Sigma(I)T(I)|||=n
8
Q
Which case time is difficult to compute
A
Average case time
9
Q
In which case every point is maximal
A
wrost-case