Master theorem

1 Basic asymptotic properties of functions

Definition 1
#

\(f\) is asymptotically positive if there exists \(x_0\) such that \(f(x) {\gt} 0\) for all \(x \ge x_0\).

Definition 2
#

\(f\) is asymptotically negative if there exists \(x_0\) such that \(f(x) {\lt} 0\) for all \(x \ge x_0\).

Definition 3
#

\(f\) is asymptotically nonpositive if there exists \(x_0\) such that \(f(x) \ge 0\) for all \(x \ge x_0\).

Definition 4
#

\(f\) is asymptotically negative if there exists \(x_0\) such that \(f(x) \le 0\) for all \(x \ge x_0\).

Definition 5
#

\(f\) is asymptotically less than \(g\) if there exists \(x_0\) such that \(f(x) \le g(x)\) for all \(x \ge x_0\).

Definition 6
#

\(f\) is asymptotically greater than \(g\) if there exists \(x_0\) such that \(f(x) \ge g(x)\) for all \(x \ge x_0\).

1.1 Asymptotic positivity and negativity

Lemma 7
#

If \(f\) is asymptotically negative, then \(-f\) is asymptotically positive.

Proof

By definition of asymptotic positivity, there exists an \(x\_ 0\) such that \(f(x) {\gt} 0\) for all \(x {\gt} x\_ 0\). It follows that \(-f(x) {\gt} 0\), which is what is needed.

Lemma 8
#

If \(f\) is asymptotically positive, then \(-f\) is asymptotically negative.

Proof

By definition of asymptotic negativity, there exists an \(x\_ 0\) such that \(f(x) {\lt} 0\) for all \(x {\gt} x\_ 0\). It follows that \(-f(x) {\lt} 0\), which is what is needed.

1.2 Asymptotic inequality

1.2.1 Positivity and negativity

Lemma 9
#

Let \(f\) be asymptotically positive and let it be asymptotically less than \(g\). Then \(g\) is asymptotically positive.

Proof

Assume with no loss of generality that \(f(x) {\gt} 0\) for all \(x {\gt} x\_ 0\) and that \(f(y) \le g(y)\) for all \(y {\gt} y\_ 0\). Let \(z\_ 0 = \max \{ x\_ 0, y\_ 0 \} \). By transitivity of the inequality relations, we have \(g(z) {\gt} 0\) for all \(z {\gt} z\_ 0\).

Lemma 10
#

Let \(f\) be asymptotically less than \(g\) and let \(g\) be asymptotically negative. Then \(f\) is asymptotically negative.

Proof

Assume with no loss of generality that \(g(x) {\lt} 0\) for all \(x {\gt} x\_ 0\) and that \(f(y) \le g(y)\) for all \(y {\gt} y\_ 0\). Let \(z\_ 0 = \max \{ x\_ 0, y\_ 0 \} \). By transitivity of the inequality relations, we have \(f(z) {\lt} 0\) for all \(z {\gt} z\_ 0\).

Lemma 11

Let \(f\) be asymptotically greater than \(g\) and let \(g\) be asymptotically negative. Then \(g\) is asymptotically negative.

Proof

By Lemma 17, this statement is equivalent to Lemma 9.

Lemma 12

Let \(f\) be asymptotically negative and let it be asymptotically greater than \(g\). Then \(g\) is asymptotically negative.

Proof

By Theorem 17, this statement is equivalent to Lemma 10.

1.2.2 Reflexivity

Lemma 13
#

\(f\) is asymptotically less than \(f\).

Proof

By reflexivity of \(\le \), we have \(f(x) \le f(x)\) for any given \(x\).

Lemma 14
#

\(f\) is asymptotically greater than \(f\).

Proof

By reflexivity of \(\ge \), we have \(f(x) \ge f(x)\) for any given \(x\).

1.2.3 Equivalence

Lemma 15
#

Let \(f\) be asymptotically less than \(g\). Then \(g\) is asymptotically greater than \(f\).

Proof

Since \(f(x) \le g(x)\) for all \(x {\gt} x\_ 0\), we have \(g(x) \ge f(x)\).

Lemma 16
#

Let \(f\) be asymptotically greater than \(g\). Then \(g\) is asymptotically less than \(f\).

Proof

Since \(f(x) \ge g(x)\) for all \(x {\gt} x\_ 0\), we have \(g(x) \le f(x)\).

Theorem 17

\(f\) is asymptotically less than \(g\) if and only if \(g\) is asymptotically greater than \(f\).

Proof

Lemma 15 and Lemma 16 are both directions respectively.

1.2.4 Transitivity

Lemma 18
#

If \(f\) is asymptotically less than \(g\) and \(g\) is asymptotically less than \(h\), then \(f\) is asymptotically less than \(h\).

Proof

By assumption, \(f(x) \le g(x)\) for all \(x \ge x\_ 0\) and \(g(y) \le h(y)\) for all \(y \ge y\_ 0\). Let \(z\_ 0 = \max \{ x\_ 0, y\_ 0 \} \). By transitivity, we have \(f(z) \le g(z)\) for all \(z \ge z\_ 0\).

Lemma 19
#

If \(f\) is asymptotically greater than \(g\) and \(g\) is asymptotically greater than \(h\), then \(f\) is asymptotically greater than \(h\).

Proof

By the equivalence given by Lemma 17, we can apply Lemma 18 in reverse, since \(h\) is asymptotically less than \(g\) and \(g\) is asymptotically less than \(f\).

1.2.5 Additivity

Lemma 20
#

Let \(f\_ 1\) be asymptotically less than \(g\_ 1\) and \(f\_ 2\) be asymptotically less than \(g\_ 2\). Then \(f\_ 1 + f\_ 2\) is asymptotically less than \(g\_ 1 + g\_ 2\).

Proof

Let \(x\_ 0\) be such that \(f\_ 1(x) \le g\_ 1(x)\) for all \(x {\gt} x\_ 0\) and let \(y\_ 0\) be such that \(f\_ 2(y) \le g\_ 2(y)\) for all \(y {\gt} y\_ 0\). Those exist due to assumptions. Now let \(z\_ 0 = \max \{ x\_ 0, y\_ 0 \} \). By transitivity, \(f\_ 1(z) \le g\_ 1(z)\) and \(f\_ 2(z) \le g\_ 2(z)\) for all \(z {\gt} z\_ 0\). By additivity, we can merge both inequalities by adding both terms on the left side and both terms on the right side. We thus get \(f\_ 1(z) + f\_ 2(z) \le g\_ 1(z) + g\_ 2(z)\), which by definition and and extensionality means that \(f\_ 1 + f\_ 2\) is asymptotically less than \(g\_ 1 + g\_ 2\).

Lemma 21
#

Let \(f\_ 1\) be asymptotically greater than \(g\_ 1\) and \(f\_ 2\) be asymptotically greater than \(g\_ 2\). Then \(f\_ 1 + f\_ 2\) is asymptotically greater than \(g\_ 1 + g\_ 2\).

Proof

By Theorem 17, \(g\_ 1\) and \(g\_ 2\) are asymptotically less than \(f\_ 1\) and \(f\_ 2\) respectively. It suffices to show that \(g\_ 1 + g\_ 2\) is asymptotically less than \(f\_ 1 + f\_ 2\), which is precisely the result of Lemma 20.

Lemma 22
#

Let \(f\_ 1\) be asymptotically positive. Let also \(f\_ 2\) be asymptotically greater than \(g\). Then \(f\_ 1 + f\_ 2\) is asymptotically greater than \(g\).

Proof

By definition, there exists some \(x\_ 0\) such that \(f\_ 1(x) {\gt} 0\) for all \(x {\gt} x\_ 0\). We also have \(f\_ 2(y) \ge g(y)\) for all \(y {\gt} y\_ 0\) for some \(y\_ 0\). Let \(z\_ 0 = \max \{ x\_ 0, y\_ 0, \} \). We now have, for all \(z {\gt} z\_ 0\) both \(f\_ 1(z) {\gt} 0\) and \(f\_ 2(z) \ge g(z)\). By additivity, we have \(f\_ 1(z) + f\_ 2(z) \ge g(z)\).

Lemma 23
#

Let \(f\_ 1\) be asymptotically negative. Let also \(f\_ 2\) be asymptotically less than \(g\). Then \(f\_ 1 + f\_ 2\) is asymptotically less than \(g\).

Proof

By definition, there exists some \(x\_ 0\) such that \(f\_ 1(x) {\lt} 0\) for all \(x {\gt} x\_ 0\). We also have \(f\_ 2(y) \le g(y)\) for all \(y {\gt} y\_ 0\) for some \(y\_ 0\). Let \(z\_ 0 = \max \{ x\_ 0, y\_ 0, \} \). We now have, for all \(z {\gt} z\_ 0\) both \(f\_ 1(z) {\lt} 0\) and \(f\_ 2(z) \le g(z)\). By additivity, we have \(f\_ 1(z) + f\_ 2(z) \le g(z)\).

1.2.6 Scalar multiplicativity

Lemma 24
#

Let \(c {\gt} 0\) and let \(f\) be asymptotically less than \(g\). Then \(c \cdot f\) is asymptotically less than \(c \cdot g\).

Proof

This is a simple consequence of scalar multiplication by a positive constant.

Lemma 25
#

Let \(c {\gt} 0\) and let \(f\) be asymptotically greater than \(g\). Then \(c \cdot f\) is asymptotically greater than \(c \cdot g\).

Proof

By applying Theorem 17, the proof boils down to proving that \(c \cdot g\) is asymptotically less than \(c \cdot f\), which is precisely shown by Lemma 24.

Lemma 26
#

Let \(c {\lt} 0\) and let \(f\) be asymptotically less than \(g\). Then \(c \cdot f\) is asymptotically greater than \(c \cdot g\).

Proof

This is a simple consequence of the fact that if \(f(x) \le g(x)\), then for a \(c {\lt} 0\) we have \(c \cdot f(x) \ge c \cdot g(x)\).

Lemma 27

Let \(c {\lt} 0\) and let \(f\) be asymptotically greater than \(g\). Then \(c \cdot f\) is asymptotically less than \(c \cdot g\).

Proof

Similar to above, the proof is a direct application of Theorem 17 and Lemma 26.

1.2.7 Multiplicativity

Theorem 28
#

Let \(f\_ 1\) and \(f\_ 2\) be asymptotically nonnegative functions. If f\(\_ 1\) is asymptotically less than \(g\_ 1\) and \(f\_ 2\) is asymptotically less than \(g\_ 2\), then \(f\_ 1 * f\_ 2\) is asymptotically less than \(g\_ 1 * g\_ 2\).

Proof

Asymptotic properties give constants \(x\_ i, 0 \le i \le 3\), above which each property holds. We take \(x_M = \max _{0 \le i \le 3} x_i\) as the constant of the needed property. For all \(x {\gt} x_M\), all given asymptotic properties hold, so the wanted property holds by properties of the inequality relation.

Theorem 29

Let \(f\_ 1\) and \(f\_ 2\) be asymptotically nonpositive functions. If f\(\_ 1\) is asymptotically greater than \(g\_ 1\) and \(f\_ 2\) is asymptotically greater than \(g\_ 2\), then \(f\_ 1 * f\_ 2\) is asymptotically less than \(g\_ 1 * g\_ 2\).

Proof

Analogously to above, the proof comes from taking the maximum of asymptotic constants as the asymptotic lower bound for nonpositivity. This time, however, the inequality flips due to nonpositive terms in \(f\_ 1(n) * f\_ 2(n) \le g\_ 1(n) * g\_ 2(n)\), since \(n\) is larger than all of the asymptotic lower bounds.