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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA 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,CP1252 Received: by 10.68.193.129 with SMTP id ho1mr512016pbc.8.1340304324889; Thu, 21 Jun 2012 11:45:24 -0700 (PDT) Path: l9ni4131pbj.0!nntp.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: My Invention of "Bug Sort". Date: Thu, 21 Jun 2012 11:45:21 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <3852c348-a728-44ed-b065-c8a596c1e235@googlegroups.com> <698085ff-6ca3-4a0e-b963-11bdcf11e6b5@googlegroups.com> NNTP-Posting-Host: 184.20.201.198 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1340304323 1553 184.20.201.198 (21 Jun 2012 18:45:23 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 21 Jun 2012 18:45:23 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-06-21T11:45:21-07:00 List-Id: On 06/21/2012 04:50 AM, Austin Obyrne wrote: > > 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 No. log2 N = ln N / ln 2, so ln N = log2 N � ln 2. Not that it matters to Big-O notation. > 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. Big-O notation is about the order of the complexity, not its exact value. If you have a super fast algorithm that only does 1 pass over the data, it takes time proportional to N. A slower algorithm that makes 2 passes over the data takes time proportional to 2N. Both have time complexity of O(N); a constant factor doesn't affect the Big-O value. Another way to think about it is that Big-O indicates how the time required increases as N increases, not what the time is for a specific value of N. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail 20 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---