CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Location
    USA
    Posts
    49

    Resolved Tricky question that deals with big O notation and little o notation

    Hi,

    I have this question that seems trivial to me.

    I need to find a function which is not o(1) but where f(2009) = 0 <---fyi this is a zero
    using the fact that f(x) is a function such that f(x) = O(1) <---fyi this is big O notation


    I was thinking the following:

    f(x) = 2009/x

    and make x equal to 0....but it doesn't satisfy for f(2009) part.

    My intuition is that I need some sort of function that deals with the 2009 since the 2009 plays a part at the second part which somehow has to get 0 as an answer.

    Anyway, thanks so much in advance for help.

    Help is greatly appreciated,

    coder752

  2. #2
    Join Date
    Oct 2006
    Posts
    616

    Re: Tricky question that deals with big O notation and little o notation

    Quote Originally Posted by coder752 View Post
    I need to find a function which is not o(1) but where f(2009) = 0 <---fyi this is a zero
    using the fact that f(x) is a function such that f(x) = O(1) <---fyi this is big O notation
    Your definition is not clear to me. What is the difference between the function marked in green and the function marked in red ? are they the same function ? different functions ?

    Does the function you need to find must make use of the f(x) function ?

    Regards,
    Zachm

  3. #3
    Join Date
    Jul 2009
    Location
    USA
    Posts
    49

    Re: Tricky question that deals with big O notation and little o notation

    Ok, I'll give you the whole statement.

    This is a two parter question to be treated separate.
    Suppose f(x) is a function such that f(x) = O(1).

    Can e^{f(x)} = o(1)? Yes or no, provide explanation.

    Find one such function f(x) which is not o(1) but where f(2009) =0.

    Hope that cleared it up for your eyes.
    Last edited by coder752; September 14th, 2009 at 08:27 PM. Reason: revision to question

  4. #4
    Join Date
    Oct 2006
    Posts
    616

    Re: Tricky question that deals with big O notation and little o notation

    Quote Originally Posted by coder752 View Post
    Suppose f(x) is a function such that f(x) = O(1).

    Can e^{f(x)} = o(1)? Yes or no, provide explanation.
    You should check the little-O notation definition in order to answer this.

    If e^(f(x)) = o(1) then it would mean that:
    Code:
       lim {x->∞} ( (e^(f(x)) / 1 ) = lim{x->∞} ( e^(f(x) ) = 0
    This would be true if and only if:
    Code:
      lim {x->∞} ( f(x) ) = -∞
    But f(x) = O(1) and therefore (big-O definition):
    Code:
     there exists some constant C and a positive real number r such that for each x > r, 
    |f(x)| < C
    This would be in contradiction with this demand from f(x):
    Code:
      lim{x->∞}( f(x) ) = -∞
    Thus, such a function doesn't exist.

    Quote Originally Posted by coder752 View Post
    Find one such function f(x) which is not o(1) but where f(2009) =0.
    This is still not clear to me,
    - f(x) is not o(1), is it O(1) ?
    - Does this requirement still hold ?
    Code:
    e^{f(x)} = o(1)
    Regards,
    Zachm

  5. #5
    Join Date
    Jul 2009
    Location
    USA
    Posts
    49

    Resolved Re: Tricky question that deals with big O notation and little o notation

    I suppose it is.

    Does that help any bit?

    Basically I believe its asking for a function that is not little o(1) but when you plug in the number 2009 in the new function it will equal to 0 thus agrees both situations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured