Section 3.5 (p. 149-150)
2, 5, 8, 12, 17, 18, 21, 23
IMPORTANT NOTES (for Section 3.5 questions):
- For all questions above, prove for big-Oh
instead of theta, and supply parameters c and n0,
as explained in the class.
- Choose the tightest upper bound for big-Oh notation.
For example, 60n2 = O(n2) as well as 60n2
= O(n3), 60n2 = O(2n) and 60n2
= O(n!). The tightest upper bound here is n2,
thus 60n2 = O(n2).
- For questions 2, 5, 8 and 12, show the proof as shown in the
lecture note.
- For questions 17, 18, 21, first derive a formula for f(n),
the number of times the line x := x+1 is executed, then show the proof
of the big-Oh
notation of your choice.
- For question 23,
you do NOT have to derive a precise formula (because it may be
challenging, unless you already solved it). Simply give the
tightest big-Oh complexity.