- #1
Gear2d
- 51
- 0
Homework Statement
What is the order of the two functions:
f(n) = (log(n^3))^4
g(n) = (log(n^7))^2
Homework Equations
http://www.augustana.ca/~hackw/csc210/exhibit/chap04/bigOhRules.html
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: