home page - news - syllabus - schedule - assignments - tutorials - tests - java - references - Mike Jacobson |
Tutorial 1 - Tutorial 2 - Tutorial 3 - Tutorial 4 - Tutorial 5 - Tutorial 6 - Tutorial 7 - Tutorial 8 - Tutorial 9 - Tutorial 10 - Tutorial 11 - Tutorial 12 - Tutorial 13 - Tutorial 14 - Tutorial 15 - Tutorial 16 |
Asymptotic Analysis and Standard Functions |
This exercise is based on material presented during the lecture on Monday, September 22.
The objectives of this exercise are
to ensure that you understand asymptotic notation and its use to describe the worst-case running times of algorithms, and
to ensure that you understand the definition and properties of “standard” functions that are frequently used to state bounds on running times.
Please read through and try to solve the problems on this exercise before attending the tutorial on Monday, September 29.
Note: Several of the following problems are taken from Chapter 3 of Cormen, Leiserson, Rivest and Stein’s text, Introduction to Algorithms, Second Edition. This is an excellent reference for this topic.
Use asymptotic notation to state bounds on the worst-case running times for the “Bubble Sort” and the “gcd” algorithms that were considered in the previous tutorial exercise.
Of course your statements should be correct. They should also be as precise as they can be (using the notation that has been defined, and they should not be more complicated than necessary.
During the lecture on this topic, graphs were presented to provide evidence of each of the following relationships.
Use the formal definitions presented in class to sketch proofs of each of the above relationships.
Then try to use a limit test to prove the relationships as well, whenever an appropriate “limit test” is available.
Write proofs of each of the following (without using limit tests).
Let
p(n) = ad nd + ad−1 nd−1 + … + a1 n + a0,
where ad > 0, be a polynomial with degree d in n, and let k be a constant. Use the definitions of the asymptotic notations given in lectures to prove each of the following properties.
Use asymptotic notation to state a relationship between each of the following functions f(n) and g(n), or say that none exists. You may assume that k ≥ 1, ε > 0, and c > 1 are constants.
Let f(n) and g(n) be functions from the set of positive real numbers to the set of positive real numbers. Say whether each of the following claims is true or false. Then try to prove your answer.
This page last modified:
http://www.cpsc.ucalgary.ca/~jacobs/cpsc331/F08/tutorials/tutorial5.html |