recategorized by
326 views
1 votes
1 votes

Suppose T1(N) = O(f(N)) and T2(N) =O(f(N)). Which of the following are true?

a) T1(N) + T2(N) = O(f(N))

b) T1(N) - T2(N) = o(f(N))

c) T1(N)/T2(N) = O(1)

d) T1(N) = O(T2(N))

My solution:

a) true. let f1=n^2 and f2=n ,"a" option holds true.

b) false. f1=n^2 and f2=n, for both T=O(f(n^2)) and thus option "b" is false.

c) false. take f1 and f2 same as before. Then f1/f2=n ==> O(n).

d) false. take f1 and f2 same as before. Then T1(n) = ω(T2(n))

Am i doing it right ?

recategorized by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
2
manvi_agarwal asked Sep 10, 2018
595 views
https://gateoverflow.in/?qa=blob&qa_blobid=17275535249024428371
0 votes
0 votes
0 answers
4
Rohit Gupta 8 asked Oct 27, 2017
1,051 views
Most efficient data structure to implement Sets of Integer and what is the complexity of operationinsert(int e),delete(int e),isMember(int e) : returns TRUE if member oth...