What exactly does big Ө notation represent?

前端 未结 6 2194
南笙
南笙 2020-11-22 11:31

I\'m really confused about the differences between big O, big Omega, and big Theta notation.

I understand that big O is the upper bound and big Omega is the lower b

6条回答
  •  花落未央
    2020-11-22 12:21

    Big Theta notation:

    Nothing to mess up buddy!!

    If we have a positive valued functions f(n) and g(n) takes a positive valued argument n then ϴ(g(n)) defined as {f(n):there exist constants c1,c2 and n1 for all n>=n1}

    where c1 g(n)<=f(n)<=c2 g(n)

    Let's take an example:

    let f(n)=

    g(n)=

    c1=5 and c2=8 and n1=1

    Among all the notations ,ϴ notation gives the best intuition about the rate of growth of function because it gives us a tight bound unlike big-oh and big -omega which gives the upper and lower bounds respectively.

    ϴ tells us that g(n) is as close as f(n),rate of growth of g(n) is as close to the rate of growth of f(n) as possible.

提交回复
热议问题