English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

If f(n) is O(g(n)) and d(n) is O(h(n)), how can I prove that the summation f(n) + d(n) is O(g(n) + h(n))? It is obvious that this is true, but how do you prove it?

2007-09-14 11:15:08 · 1 answers · asked by jaden404 4 in Science & Mathematics Mathematics

1 answers

f(n)∈O(g(n)) ⇔ [n→∞]lim sup f(n)/g(n) < ∞

Also note that for any functions f and g, [n→∞]lim sup (f(n)+g(n)) ≤ [n→∞]lim sup f(n) + [n→∞]lim sup g(n).

So let f(n)∈O(g(n)) and d(n)∈O(h(n)), then [n→∞]lim sup f(n)/g(n) = L₁ < ∞ and [n→∞]lim sup d(n)/h(n) = L₂ < ∞. Then we have:

[n→∞]lim sup (f(n) + d(n))/(g(n) + h(n))
= [n→∞]lim sup (f(n)/(g(n) + h(n)) + d(n)/(g(n) + h(n)))
≤ [n→∞]lim sup (f(n)/g(n) + d(n)/h(n))
≤ [n→∞]lim sup f(n)/g(n) + [n→∞]lim sup d(n)/h(n)
= L₁ + L₂ < ∞

So f(n)+d(n) ∈ O(g(n)+h(n)). Which was to be demonstrated.

2007-09-14 17:22:16 · answer #1 · answered by Pascal 7 · 0 0

fedest.com, questions and answers