What is the formal definition of Theta notation?
What is the formal definition of Theta notation?
Answer:
T(n) = θ(f(n)) if and only if T(n) = O(f(n)) and T(n) = Omega(f(n)).
∃ constants c₁, c₂, n₀ such that c₁ × f(n) ≤ T(n) ≤ c₂ × f(n) for all n ≥ n₀.