Big-O With Change of Base for Log

In summary: You are confusing the notion of what it means to be O(ln x). It means that there exist C and k such that f(x) < C ln x when x > k. It doesn't mean that f(x) < ln x / log e. That latter is true, but it is beside the point.In summary, we are trying to prove that for a>1, b>1, if f(x) = O(log_b(x)) then f(x) = O(log_a(x)). To do this, we can assume that |f(x)| < C|log_b(x)| for all x > k, and use this to show that |f(x)| < C'|log_a(x)| for
  • #1
TheLegace
27
0

Homework Statement


Hi, I am trying to prove for a>1, b>1 that f(x) = O(log_b(x)) then f(x) = O(log_a(x)).
[Hint: log_b(x) = log_a(x)/log_a(b)).

Homework Equations




The Attempt at a Solution


Assuming |f(x)| <= C|log_b(x)| true for x>k,
then,
f(x) <= log_a(x)/log_a(b)| for all x>1, C=1
then,
log_a(b)*f(x) <= log_a(x) all x>1 C= 1/log_a(b)
f(x) <= log_a(x) x>1 C=1/log_a(b)
f(x) is O(log_a(x))


Now here comes my problems with most big-O problems, since the right side is being divided by something I should just multiply it out to other side:

log_a(b)*f(x) <= log_a(x) I know that log_a(b) on left side would not matter except that it might be
C= 1/log_a(b) and k =1

According to my textbook/notes, C = 1/log_a(b), I still do not see why though, because if I multiply both sides by log_a(b) why C is like dividing both sides log_a(b), if someone could explain it, I would appreciate it thank you very much.


Please Let me Know if this correct, thank you very much.

TheLegace.
 
Physics news on Phys.org
  • #2
TheLegace said:
Assuming |f(x)| <= C|log_b(x)| true for x>k,
then,
f(x) <= log_a(x)/log_a(b)| for all x>1, C=1
then,
log_a(b)*f(x) <= log_a(x) all x>1 C= 1/log_a(b)
f(x) <= log_a(x) x>1 C=1/log_a(b)
f(x) is O(log_a(x))


Sorry, I don't follow that list of inequalities at all.

Can you try it more clearly, perhaps like this.

Given: There exist C and k such that |f(x)| < C |log_b (x)| for all x > k.

Prove: There exist C' and k' such that |f(x)| < C' |log_a (x)| for all x > k'.

Your k' can be the same as k. Your C' will be expressed in terms of C and log_a (b).
 
  • #3
Billy Bob said:
Sorry, I don't follow that list of inequalities at all.

Can you try it more clearly, perhaps like this.

Given: There exist C and k such that |f(x)| < C |log_b (x)| for all x > k.

Prove: There exist C' and k' such that |f(x)| < C' |log_a (x)| for all x > k'.

Your k' can be the same as k. Your C' will be expressed in terms of C and log_a (b).


Ok...
Prove : a>1, b>1
f(x) = O(log_b (x)) then f(x) = O(log_a (x))

|f(x)| < C |log_b (x) | for all x>k
|f(x)| < |log_a (x) / log_a (b) | for all x>1

then f(x) = O(log_b (x)) = O(log_a (x)) when k=1 C=1/log_a (b)
I am just hoping to know if that's correct.

Thank You Very Much.
TheLegace.
 
  • #4
TheLegace said:
Ok...
Prove : a>1, b>1
f(x) = O(log_b (x)) then f(x) = O(log_a (x))

|f(x)| < C |log_b (x) | for all x>k
|f(x)| < |log_a (x) / log_a (b) | for all x>1

I don't know how you are obtaining the last line quoted. It is invalid reasoning.

Example:

Let a=10, b=e. Use ln x to denote log base e of x, and let log x denote log base 10 of x.

Let f(x) = 1 + 4 ln x.

Then f is O(ln x), because f(x) < 5 ln x when x > 3. (C=5, k=3.) (Verify with a graph if you want.)

Your next step says f(x) < log x / log e for x > 1. There is no reason for this to be true, and in fact it is false. (Verify with a graph if you want.)
 

What is Big-O notation with change of base for logarithms?

Big-O notation is a mathematical notation used to describe the asymptotic behavior of a function. It is commonly used in computer science to analyze the time and space complexity of algorithms. The change of base for logarithms refers to the process of converting a logarithm from one base to another.

How is Big-O notation used in computer science?

Big-O notation is used to analyze the efficiency of algorithms in terms of their time and space complexity. It helps in comparing algorithms and choosing the most efficient one for a given problem.

What is the significance of the base in logarithms?

The base of a logarithm is the number that is raised to a power to get a given number. In Big-O notation, the base is used to indicate the rate of growth of a function. A lower base indicates a faster rate of growth, and a higher base indicates a slower rate of growth.

How is the change of base formula used in Big-O notation?

The change of base formula is used to convert a logarithm from one base to another. In Big-O notation, this formula is used to simplify logarithms and make it easier to compare the efficiency of different algorithms.

What are some common examples of Big-O with change of base for logarithms?

Some common examples include O(1) for constant time algorithms, O(log n) for logarithmic time algorithms, O(n) for linear time algorithms, O(n^2) for quadratic time algorithms, and O(2^n) for exponential time algorithms. The choice of base can vary depending on the specific algorithm being analyzed.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
846
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
543
  • Calculus and Beyond Homework Help
Replies
1
Views
122
  • Calculus and Beyond Homework Help
Replies
8
Views
466
  • Calculus and Beyond Homework Help
Replies
2
Views
502
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
648
  • Calculus and Beyond Homework Help
Replies
5
Views
280
Back
Top