Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Big Oh and Logs

  1. Sep 21, 2008 #1
    1. The problem statement, all variables and given/known data

    What is the order of the two functions:

    f(n) = (log(n^3))^4
    g(n) = (log(n^7))^2

    2. Relevant equations


    3. The attempt at a solution

    f(n) = (log(n^3))^4 = log(n^3) * log(n^3) * log(n^3) * log(n^3)

    g(n) = (log(n^7))^2 = log(n^7) * log(n^7)

    Based on the Big Oh rules (the link above) using Log of a Power Rule we see that for one log(n^3) and one log(n^7) the order is O(log n) and O(log n). Now since f(n) is raised to power of 4 the order is now O(log n)^4 and g(n) is raised to power of 2 so O(log n)^2.

    Now using Comparison Rule 2 we that f(n) is O(n^4) and g(n) is O(n^2).

    Would this reasoning be correct?
    Last edited: Sep 21, 2008
  2. jcsd
  3. Sep 22, 2008 #2
    I'm not sure how you used comparison rule 2 to get that. Everything up until there is fine though.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook