comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: Re: My Invention of "Bug Sort".
Date: Thu, 21 Jun 2012 04:50:34 -0700 (PDT)
Date: 2012-06-21T04:50:34-07:00	[thread overview]
Message-ID: <ea5e2e25-eaa5-41d1-bfad-6934df4bfb3f@googlegroups.com> (raw)
In-Reply-To: <jruibm$gn2$1@speranza.aioe.org>

On Thursday, June 21, 2012 8:23:12 AM UTC+1, Manuel Collado wrote:
> El 21/06/2012 7:13, Simon Wright escribió:
> > "Jeffrey R. Carter"<ggsub@pragmada.co.cc>  writes:
> >
> >>> 2 ) In "O(N log N)" do I assume log to the base 'e' or what.
> >>
> >> In "Big-O" notation, log is understood to be to the base 2.
> >
> > Isn't there a constant factor between log2(x) and ln(x)? Which is taken
> > up in the O?
> >
> >     N = e**x = 2**y
> >
> > Taking natural logs,
> >
> >     ln N = x = y.ln 2
> 
> Yes. In "Big-O" notation, the base for log() is irrelevant.
> 
>    O(log N) = O(ln N)
> 
> Both expressions denote exactly the same set of functions.
> 
> -- 
> Manuel Collado - http://lml.ls.fi.upm.es/~mcollado

---------------


This is surprising to me - is it right?

<<Yes. In "Big-O" notation, the base for log() is irrelevant. 

   << O(log N) = O(ln N) 

<< Both expressions denote exactly the same set of functions. 

In general,

A change of base in logarithms:

Log(base(a)M = Log (base(b))M / Log (base(b))'a'.

Applying that,In particular here,

Ln of N = Log2N / Ln 2


Unless it is true that there is some constant incorporated in O that verifies this, then

N(Ln N) /=  N(Log2 N)

Which is it?

On face value it appears totally incorrect arithmetically, I'm surprised that such an anomaly would be acceptable. 

Austin O'Byrne



  reply	other threads:[~2012-06-21 11:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19  7:13 My Invention of "Bug Sort" Austin Obyrne
2012-06-19 11:55 ` Peter C. Chapin
2012-06-19 13:01   ` Austin Obyrne
2012-06-19 22:39 ` ggsub
2012-06-20  8:32   ` Austin Obyrne
2012-06-20 19:45     ` ggsub
2012-06-20 10:57   ` Austin Obyrne
2012-06-20 12:47     ` Manuel Collado
2012-06-20 12:51       ` Manuel Collado
2012-06-20 13:13         ` Manuel Collado
2012-06-20 15:17         ` Austin Obyrne
2012-06-22 20:31           ` Randy Brukardt
2012-06-20 19:38     ` ggsub
2012-06-20 23:59   ` Austin Obyrne
2012-06-21  1:17     ` Jeffrey R. Carter
2012-06-21  5:13       ` Simon Wright
2012-06-21  7:23         ` Manuel Collado
2012-06-21 11:50           ` Austin Obyrne [this message]
2012-06-21 12:09             ` Dmitry A. Kazakov
2012-06-22 20:37               ` Randy Brukardt
2012-06-22 21:16                 ` Simon Wright
2012-06-26 22:29                   ` Randy Brukardt
2012-06-28 19:05                     ` Niklas Holsti
2012-07-03  2:05                       ` Randy Brukardt
2012-06-28 20:59                     ` Simon Wright
2012-07-03  2:11                       ` Randy Brukardt
2012-07-03  9:47                         ` Simon Wright
2012-06-21 18:45             ` Jeffrey Carter
2012-06-22  6:52               ` Austin Obyrne
2012-06-21 15:10         ` Adam Beneschan
2012-06-21 18:24         ` Jeffrey Carter
2012-06-21  7:24       ` Austin Obyrne
2012-06-19 22:56 ` Martin Trenkmann
2012-06-20  0:11 ` robin.vowels
2012-06-20  8:51   ` Austin Obyrne
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox