- Use the definition of Big Theta to show the asymptotic running time of a given program.
Consider the following function T(n) describes the precise running time of an algorithm:
T(n)=3n2−100n+6
Exercise Show T(n)∈Θ(n2).
Solution
We have shown in earlier lessons that T(n)∈O(n2) and T(n)∈Ω(n2). Therefore, we can conclude T(n)∈Θ(n2).
Exercise Show T(n)∈/Θ(n).
Solution
We have shown earlier that T(n)∈Omega(n) but T(n)∈/O(n). Therefore, we can conclude T(n)∈/Θ(n).
Exercise Show T(n)∈/Θ(n3).
Solution
We have shown earlier lessons that T(n)∈O(n3) but T(n)∈/Ω(n3). Therefore, we can conclude T(n)∈/Θ(n3).