Google Answers Logo
View Question
 
Q: big oh notation ( Answered,   0 Comments )
Question  
Subject: big oh notation
Category: Computers > Algorithms
Asked by: seurhe-ga
List Price: $2.00
Posted: 02 Sep 2003 21:49 PDT
Expires: 02 Oct 2003 21:49 PDT
Question ID: 251660
Is lg x=O(ln x) ?
Is ln x=O(lg x)?

here lg means  log with base 2
     ln means  log with base e
and O is big oh notation
Answer  
Subject: Re: big oh notation
Answered By: livioflores-ga on 02 Sep 2003 23:13 PDT
 
Hi seurhe!!

Let me start with a definition:
Let n be the size of the input and f (n), g(n) be positive functions
of n:
f(n) = O(g(n)) is equivalent to say "There exist positive constants x
and k such that for all n>k, f(n) =< x*g(n)"

One of the properties of the logarithms is:

log-a(n) = log-b(n) / log-b(a) 

Here log-a(n) means logarithm with base a of n.

Then we have:
lg(n) = ln(n)/ln(2) = (1/ln(2)).ln(n) = c1.ln(n);
then lg(n) is O(ln(n))

Also
ln(n) = lg(n)/lg(e) = (1/lg(e)).lg(n) = c2.lg(n);
then ln(n) is O(lg(n)).

In cases like that we say that lg(n) is big-theta of ln(n). For
reference about that visit the following page from Everything2.com:
"Big-oh notation":
http://www.everything2.com/index.pl?node=Big-oh%20notation

I hope this helps you. Please,if you find this answer unclear, request
an answer clarification  before rate this answer.

Best regards.
livioflores-ga

Request for Answer Clarification by seurhe-ga on 03 Sep 2003 11:04 PDT
Hi Livioflore,

So the answer is yes for both notation? Both the notation satisfies
Big Oh vicevarsa. Please reply me.

Clarification of Answer by livioflores-ga on 03 Sep 2003 11:16 PDT
Hi seurhe!!

Yes, the answer is yes for both notation; this is because they are
related by constant ratios.

Regards.
livioflores-ga
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy