1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Determine Big O of a function (Discrete math)

  1. Oct 9, 2013 #1
    Question:
    Determine whether the function log(n2+1) is O(logn).

    Definition in paint document if needed.

    Solution:

    n2 + 1 < 2n2 whenever n>1

    log(n2 + 1) < log( 2n2 ) = log(2) + 2log(n).

    Now, log(n)>log(2) whenever n>2. Therefore

    log(2) + 2log(n)<3log(n).

    log(n2 + 1) ≤ 3log(n) whenever n>2.
    ∴Because there exists constants C and k such that log(n2 + 1)≤Clog(n) whenever n>k we can conclude log(n2 + 1) is O(logn).


    Is this correct? The book says that log(n2 + 1) is not O(logn).
     

    Attached Files:

    • DD.jpg
      DD.jpg
      File size:
      8.1 KB
      Views:
      224
  2. jcsd
  3. Oct 9, 2013 #2

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I think the book is wrong and you are right.
     
  4. Oct 9, 2013 #3

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I think you are right and your book is mistaken.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Determine Big O of a function (Discrete math)
  1. Discrete Math (Replies: 1)

Loading...