Big Theta Notation in Data Structure | DSA Tutorials YASH PAL, 6 May 20266 May 2026 The lower and upper bound for the function f is provided by the big theta notation (Θ\Theta).Big Theta (Θ\Theta) Notation – DefinitionConsidering g to be a function from the non-negative integers into the positive real numbers. The Θ\Theta(g) = O(g) ∩\cap Ω\Omega(g), that means, the set of functions that are both in O(g) and Ω\Omega(g). The Θ\Theta(g) is the set of functions f such that for some positive constants c1 and c2, and an n0 exists such that c1g(n) <= f(n) <= c2g(n) for all n, n>= n0. By f ∈\in Θ\Theta(g) means f is of order g.Constant FunctionConsider the following constant functions:f(n) = 16f(n) = 27f(n) = 1627Then, for satisfying the big theta condition, the above functions can be expressed as:15 * 1 <= f(n) <= 16 * 1, where c1 = 15, c2 = 16 and n0 = 0, So f(n) = Θ\Theta(1) for the above function.26 * 1 <= f(n) <= 27 * 1, where c1 = 26, c2 = 27 and n0 = 0, So f(n) = Θ\Theta(1) for the above function.1626 * 1 <= f(n) <= 1627 * 1, where c1 = 1626, c2 = 1627 and n0 = 0, So f(n) = Θ\Theta(1) for the above function.Linear FunctionConsider the following linear functions.f(n) = 3n + 5f(n) = 2n + 3f(n) = 7n + 5f(n) = 3n + 53n < 3n + 5 for all ‘n’. {c1 = 3}also, 3n + 5 <= 4n for n >= 5, c2 = 4, n0 = 5thus,3n < 3n + 5 <= 4n for c1 = 3, c2 = 4, n0=5Thus, f(n) = Θ\Theta(n)f(n) = 2n + 32n < 2n + 3 for all ‘n’. {c1 = 2}also, 2n + 3 <= 3n for n >= 3, c2 = 3, n0 = 3Thus, f(n) = Θ\Theta(n)f(n) = 7n + 57n < 7n + 5 for all ‘n’. {c1 = 7}also, 7n + 5 <= 8n for n >= 5, c2 = 8, n0 = 5Thus, f(n) = Θ\Theta(n)Quadratic FunctionConsider the following quadratic functions:f(n) = 27n2 + 16nf(n) = 27n2 + 16f(n) = 10n2 + 7f(n) = 27n2 + 16n27n2 < 27n2 + 16n, for all n, {c1 = 27}.also27n2 + 16n <= 28n2 for n >= n0 = 16, c2 = 28thus, 27n2 <= 27n2 + 16n <= 28n2 for c1 = 27, c2 = 28, n0 = 16So, f(n) = Θ\Theta(n2)f(n) = 27n2 + 1627n2 < 27n2 + 16, for all n, {c1 = 27}.also27n2 + 16 <= 28n2 for n >= n0 = 16, c2 = 28thus, 27n2 <= 27n2 + 16 <= 28n2 for c1 = 27, c2 = 28, n0 = 8So, f(n) = Θ\Theta(n2)f(n) = 10n2 + 710n2 < 10n2 + 7, for all n, {c1 = 10}.also27n2 + 7n <= 11n2 for n >= n0 = 7, c2 = 11thus, 10n2 <= 10n2 + 7 <= 11n2 for c1 = 10, c2 = 11, n>=n0 = 7So, f(n) = Θ\Theta(n2)Cubic FunctionConsider the following cubic functions:f(n) = 2n3 + n2 + 2nf(n) = 4n3 + 2n + 3f(n) = 2n3 + n2 + 2n2n3 < 2n3 + n2 + 2n, for all n>= n0, {c1=2}also, 2n3 + n2 + 2n <= 3n3, for all n>= n0 = 2, {c2=3}thus, 2n3 < 2n3 + n2 + 2n <= 3n3, for all n>= n0 = 2, c1=2, c2=3So, f(n) = Θ\Theta(n2)f(n) = 4n3 + 2n + 34n3 < 4n3 + 2n + 3, for all n, {c=4}So, f(n) = Θ\Theta(n2)Exponential FunctionConsider the following exponential functions:f(n) = 2n + 6n2 + 3nf(n) = 4 * 2n + 3nf(n) = 2n + 6n2 + 3n2n < 2n + 6n2 + 3n, for all n>= n0, {c1=1}also 2n + 6n2 + 3n <= 8 * 2n for all n>= n0 >= 4, {c2=8}thus 2n < 2n + 6n2 + 3n <= 8 * 2n, for all n>= n0, {c1=1, c2 = 8}So, f(n) = Θ\Theta(2n)f(n) = 4 * 2n+ 3n4 * 2n < 4 * 2n + 3n, for all n>= n0, {c1=4}also 4 * 2n + 3n <= 7 * 2n for all n>= n0 >= 1, {c2=7}thus 4 * 2n < 4 * 2n + 3n <= 7 * 2n, for all n>= n0 = 1, {c1=4, c2 = 5}So, f(n) = Θ\Theta(2n)Data Structures & Algorithms Tutorials for Beginners Data Structures Tutorials DSA Tutorials