79 votes 79 votes Consider the following functions $f(n) = 3n^{\sqrt{n}}$ $g(n) = 2^{\sqrt{n}{\log_{2}n}}$ $h(n) = n!$ Which of the following is true? $h(n)$ is $O(f(n))$ $h(n)$ is $O(g(n))$ $g(n)$ is not $O(f(n))$ $f(n)$ is $O(g(n))$ Algorithms gatecse-2000 algorithms asymptotic-notation normal + – Kathleen asked Sep 14, 2014 • edited Oct 17, 2017 by kenzou Kathleen 22.9k views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments Mr_22B commented Nov 3, 2017 reply Follow Share just dont try to ans it forcefully by assuming that f is order of G, No f is always bigger of G so, ans is None. 0 votes 0 votes codingo1234 commented Oct 4, 2019 reply Follow Share given that f(n) = log 3 + √n log n g(n) = √n log n we can prove that f(n)=O(g(n)) i.e. if we are able to select a constant c(c>=0) such that f(n)<=cg(n) now if we take c=(log3+1) then our work is done 0 votes 0 votes palashbehra5 commented Nov 18, 2021 reply Follow Share f(n) = $3n ^{\surd n}$ g(n) = $n ^{\surd n}$ h(n) = n! Clearly f(n) = O(g(n)) and g(n) = O(f(n)) Now, let y = n!, taking log both sides logy = logn!, by Stirling's approximation logy $\approx$ nlogn let z = $n ^{\surd n}$, taking log both sides logz = $\surd nlogn$ Hence, f(n) = o(h(n)), g(n) = o(h(n)), as h(n) strictly upperbounds f(n) and g(n). https://mathworld.wolfram.com/Little-ONotation.html https://en.wikipedia.org/wiki/Big_O_notation#Little-o_notation 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Here, we will rewrite these functions in such a manner that is suitable for asymptotic comparison: Refer below image vermavijay1986 answered Oct 15, 2020 vermavijay1986 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes take log for all 3 functions, and consider only higher power functions. f(n) = sqrt(n)logn g(n) = sqrt(n)logn h(n) = nlogn f(n) and g(n) growth order is same and is less then h(n). do only option D satisfies. manikantsharma answered Sep 14, 2021 manikantsharma comment Share Follow See all 0 reply Please log in or register to add a comment.