0 votes 0 votes f(n)=2(log2 n)2 , g(n)=log2n+1 How to give relation between them?. Algorithms time-complexity asymptotic-notation + – Vishnathan asked Sep 22, 2018 Vishnathan 435 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply sakharam commented Sep 22, 2018 reply Follow Share For a value of n greater than or equal to 3, f(n) will be greater than g(n). g(n)<=c*f(n), c=1 , n>=2 So, g(n)=O(f(n)) Is this the kind of relation you wanted? 2 votes 2 votes arya_stark commented Sep 22, 2018 reply Follow Share @sakharam is right .... Lets expand this -> Take any big value in term of power of 2 (Bcz ans get easily) So, let suppose n=1024. Put value in both eq. $f(n)=2(logn)^2 = 2(log1024)^2$ = 2(log2^10)^2 = 2*10^2 = 200 $g(n)=(logn) + 1 = (log1024)+1$ 10 + 1 = 11 So f(n) is greater then g(n). We can say that g(n) = O(f(n)) 1 votes 1 votes Vishnathan commented Sep 22, 2018 reply Follow Share Thanks 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes g(n) = O(f(n)) Aakash_ answered Sep 22, 2018 • edited Sep 22, 2018 by Aakash_ Aakash_ comment Share Follow See all 2 Comments See all 2 2 Comments reply rajatmyname commented Sep 22, 2018 reply Follow Share How this relation is true? I think g(n) should be O(f(n)) 0 votes 0 votes Aakash_ commented Sep 22, 2018 reply Follow Share sorry, it's g(n)=O(f(n)) 1 votes 1 votes Please log in or register to add a comment.