From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f6c360ce344b2364 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.220.230 with SMTP id pz6mr4712682pbc.3.1340397433135; Fri, 22 Jun 2012 13:37:13 -0700 (PDT) MIME-Version: 1.0 From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: My Invention of "Bug Sort". Date: Fri, 22 Jun 2012 15:37:10 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <3852c348-a728-44ed-b065-c8a596c1e235@googlegroups.com> <698085ff-6ca3-4a0e-b963-11bdcf11e6b5@googlegroups.com> <1u9ig9nnen59q$.ajozwlsekr7l.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1340397432 12284 69.95.181.76 (22 Jun 2012 20:37:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 22 Jun 2012 20:37:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Path: l9ni8085pbj.0!nntp.google.com!news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail Date: 2012-06-22T15:37:10-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1u9ig9nnen59q$.ajozwlsekr7l.dlg@40tude.net... > On Thu, 21 Jun 2012 04:50:34 -0700 (PDT), Austin Obyrne wrote: > >> 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" 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. > >> This is surprising to me - is it right? > > Yes, O(nX)=O(Y) for all n>0. > > O(f)=O(g) when lim f/g exists, finite, non-zero. > > http://en.wikipedia.org/wiki/Big_O_notation Or, if you want a directly relevant reference, see A.18(3-4/2) in Ada 2005 or Ada 2012. http://www.ada-auth.org/standards/12rm/html/RM-A-18.html#p3 (I'm sure the wikipedia article is less terse, but I wanted to point out that this is defined in the Ada Standard as well as common programming analysis.) Randy.