1. There is a function that is both O(n^2) and Omega(n^3). 2. Given two functions f(n) and g(n), if g(n)=O(f(n)) and f(n)=O(n^2), then g(n)=O(n^5). 3. Given two functions f(n) and g(n), if g(n)=O(f(n)) and f(n)=O(n^2), then g(n)=Omega(n).

Ruby Briggs

Ruby Briggs

Answered question

2022-07-17

1. There is a function that is both O ( n 2 ) and Ω ( n 3 ).
2. Given two functions f(n) and g(n), if g ( n ) = O ( f ( n ) ) and f ( n ) = O ( n 2 ), then g ( n ) = O ( n 5 ).
3. Given two functions f(n) and g(n), if g ( n ) = O ( f ( n ) ) and f ( n ) = O ( n 2 ), then g ( n ) = Ω ( n ).
I think the first one is false, but not sure about other two. Can anyone help me?

Answer & Explanation

Jorge Franklin

Jorge Franklin

Beginner2022-07-18Added 11 answers

Step 1
You’re right about the first one; I’ll prove it. Then I’ll point you in the right direction for the other two; see if you can finish them on your own, but if you get stuck, feel free to leave a comment.
1. Suppose that f(n) is both O ( n 2 ) and Ω ( n 3 ). Then there are positive constants c 1 and c 2 and an m N such that | f ( n ) | c 1 n 2 and | f ( n ) | c 2 n 3 for all n m. But then for all n m we must have c2n3≤|f(n)|≤c1n2and hence n m, which is clearly false when c 2 n 3 | f ( n ) | c 1 n 2 . Thus, there is no such f(n): you were correct.
2. The hypotheses imply that there are c 1 , c 2 > 0 and m N such that | g ( n ) | c 1 | f ( n ) | and | f ( n ) | c 2 n 2 for all n m. Can you find an inequality relating |g(n)| to n 2 ? What about to n 5 ?
3. What if f and g are both constant functions?

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?