Question

Prove the additivity of big O notation: f, g and h are functions of input size...

Prove the additivity of big O notation:

f, g and h are functions of input size n. Prove that if  $f \in \mathbb{O}(h)$ and $g \in \mathbb{O}(h)$, then $f+g \in \mathbb{O}(h)$

Homework Answers

Answer #1

Your question text is not very clear and hence, I am providing the proof for additivity of big O notation.

Let f(n) = O(h(n)) and g(n) = O(h(n))

Since f(n) = O(h(n)), this implies that

0 <= f(n) <= c1 * h(n) where c1 is a positive constant ---------> 1

Since g(n) = O(h(n)), this implies that

0 <= g(n) <= c2 * h(n) where c2 is a positive constant ---------> 2

Adding 1 and 2, we get

0 <= f(n) + g(n) <= (c1 + c2) * h(n) where c1 + c2 is a positive constant

Hence, f(n) + g(n) = O(h(n))

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Let f,g be positive real-valued functions. Use the definition of big-O to prove: If f(n) is...
Let f,g be positive real-valued functions. Use the definition of big-O to prove: If f(n) is O(g(n)), then f2(n)+f4(n) is O(g2(n)+g4(n)).
(Note: "O" stands for Big O notation) prove mathematically that if a Turing Machine runs in...
(Note: "O" stands for Big O notation) prove mathematically that if a Turing Machine runs in time O(k(n)), then it runs in time O(h(k(n)) +c), for any constant c ≥ 0 and any functions k(n) and h(n) where h(n) ≥ n.
Find the big-O, big-Omega of the following functions (show steps please) a) f(n) = 5n^2 +...
Find the big-O, big-Omega of the following functions (show steps please) a) f(n) = 5n^2 + 1 b) f(n)= (nlogn+1)*(n+1)
21.2. Let f(n) and g(n) be functions from N→R. Prove or disprove the following statements. (a)...
21.2. Let f(n) and g(n) be functions from N→R. Prove or disprove the following statements. (a) f(n) = O(g(n)) implies g(n) = O(f(n)). (c) f(n)=?(g(n)) if and only if (n)=O(g(n)) and g(n)=O(f(n)).
Prove mathematically that if a Turing Machine runs in time O(g(n)), then it runs in time...
Prove mathematically that if a Turing Machine runs in time O(g(n)), then it runs in time O(h(g(n))+c), for any constant c >= 0 and any functions g(n) and h(n) where h(n) >= n.
True or False...Provide your reasons If f(n) =o(g(n)), then f(n)=O(g(n)) If f(n) =O(g(n)), then f(n) ≤...
True or False...Provide your reasons If f(n) =o(g(n)), then f(n)=O(g(n)) If f(n) =O(g(n)), then f(n) ≤ g(n) 3.  If 1<a=O(na), then f(n)=O(nb) 4. A and B are two sorting algorithms. If A is O(n2) and B is O(n), then for an input of X integers, B can sort it faster than A.
Assume that f(n) = O(g(n)). Can g(n) = O(f(n))? Are there cases where g(n) is not...
Assume that f(n) = O(g(n)). Can g(n) = O(f(n))? Are there cases where g(n) is not O(f(n))? Prove your answers (give examples for the possible cases as part of your proofs, and argue the result is true for your example).
Fill in the following table, using Big-O notation to give the worst and average-case times for...
Fill in the following table, using Big-O notation to give the worst and average-case times for each of the stack methods for a stack of size N. OPERATION WORST-CASE TIME AVERAGE-CASE TIME constructor empty size push pop peek
i) F o r t h e f o l l o w I n g...
i) F o r t h e f o l l o w I n g f i n d t h e ( c o m p. E x p.) f o u r I e r s e r i e s f o r x( t ) I I ) D r a w t h e am p &. P h a s e s p e c t r a I I I ) T...
1.Let f and g be two functions such that f(n)/g(n) converges to a positive value less...
1.Let f and g be two functions such that f(n)/g(n) converges to a positive value less than 1 as n tends to infinity. Which of the following is necessarily true? Select one: a. g(n)=Ω(f(n)) b. f(n)=Ω(g(n)) c. f(n)=O(g(n)) d. g(n)=O(f(n)) e. All of the answers 2. If T(n)=n+23 log(2n) where the base of the log is 2, then which of the following is true: Select one: a. T(n)=θ(n^2) b. T(n)=θ(n) c. T(n)=θ(n^3) d. T(n)=θ(3^n) 3. Let f and g be...