Our goal for this question is to analyze the running time of the following function:
def nested(n: int):
"""Assume n is an integer that is greater than i."""
b = 1
while b <= n: # Loop 1
i = 1
while i < b: # Loop 2
print(i)
i -= 1
b += 1
First, prove that for all functions f, g: N -> R+ and b ∈ R+, if all three of the following conditions are true:
(i) f(n) = O(g(n))
(ii) g(n) = O(h(n))
(iii) h(n) = O(k(n))
then log(f(n)) = O(log(k(n)))
You may not use any external properties about Big-Oh; we're looking for you to prove this statement using the definition of Big-Oh.