Big-Oh algebra with logarithms that I don't get?

  • Thread starter Thread starter Nishiura_high
  • Start date Start date
  • Tags Tags
    Algebra Logarithms
Click For Summary
SUMMARY

The discussion clarifies the equivalence of O(3log2 n) and O(nlog2 3) through logarithmic properties. Specifically, it utilizes the logarithmic identity that states log(a^b) = b * log(a). This allows the transformation of O(3log2 n) into O(nlog2 3) by recognizing that both expressions represent the same growth rate in Big-Oh notation. The key takeaway is understanding how logarithmic manipulation can simplify complexity expressions.

PREREQUISITES
  • Understanding of Big-Oh notation
  • Familiarity with logarithmic properties
  • Basic algebraic manipulation skills
  • Knowledge of asymptotic analysis
NEXT STEPS
  • Study logarithmic identities in depth
  • Learn about Big-Oh notation and its applications
  • Explore examples of complexity transformations
  • Investigate asymptotic analysis techniques
USEFUL FOR

Students in computer science, software engineers, and anyone involved in algorithm analysis and performance optimization.

Nishiura_high
Messages
7
Reaction score
0
My textbook says O(3log2 n) can be written as O(nlog2 3). Why is that?

Thank you.
 
Physics news on Phys.org
Welcome to PF, Nishiura_high! :smile:

Nishiura_high said:
My textbook says O(3log2 n) can be written as O(nlog2 3). Why is that?

Thank you.

One of the log rules is that ##\log a^b = b \log a##.

So:
$$\log_2(3^{\log_2 n}) = \log_2 n \cdot \log_2 3$$
and also:
$$\log_2(n^{\log_2 3}) = \log_2 3 \cdot \log_2 n$$
 

Similar threads

Replies
4
Views
3K
Replies
8
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K