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

  • Thread starter Thread starter Nishiura_high
  • Start date Start date
  • Tags Tags
    Algebra Logarithms
AI Thread Summary
The discussion clarifies that O(3log2 n) can be expressed as O(nlog2 3) due to logarithmic properties. Specifically, the rule that states log a^b equals b log a is applied. This means that log2(3^log2 n) simplifies to log2 n multiplied by log2 3. Conversely, log2(n^log2 3) also results in log2 3 multiplied by log2 n. Understanding these logarithmic transformations is key to grasping Big-Oh notation involving logarithms.
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$$
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...

Similar threads

Replies
12
Views
2K
Replies
12
Views
1K
Replies
11
Views
2K
Replies
14
Views
3K
Replies
3
Views
1K
Replies
5
Views
4K
Replies
1
Views
560
Replies
2
Views
2K
Back
Top