开发者

In Asymptotic Analysis, Show That :- O( f(n) + g(n) ) = O( max{ f(n) , g(n) } ) [closed]

开发者 https://www.devze.com 2023-01-26 05:31 出处:网络
开发者_如何学JAVAIt's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
开发者_如何学JAVA It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

O represents Big-O.

O(g) : { f| f is non negative function

             there exists c,m where c and m are any constants

             such that f(n) <= cg(n) for all n >= m }

           Show That :- O( f(n) + g(n) ) = O( max{ f(n) , g(n) } ) .


This follows from max{f(n), g(n)} <= f(n) + g(n) <= 2*max{f(n), g(n)}.

0

精彩评论

暂无评论...
验证码 换一张
取 消