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.0 required=5.0 tests=BAYES_00,FORGED_HOTMAIL_RCVD2, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f6c360ce344b2364,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,CP1252 Received: by 10.68.238.65 with SMTP id vi1mr18091756pbc.7.1340090008824; Tue, 19 Jun 2012 00:13:28 -0700 (PDT) Path: l9ni67772pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Austin Obyrne Newsgroups: comp.lang.ada Subject: My Invention of "Bug Sort". Date: Tue, 19 Jun 2012 00:13:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3852c348-a728-44ed-b065-c8a596c1e235@googlegroups.com> NNTP-Posting-Host: 86.167.60.110 Mime-Version: 1.0 X-Trace: posting.google.com 1340090008 19611 127.0.0.1 (19 Jun 2012 07:13:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Jun 2012 07:13:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.167.60.110; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg User-Agent: G2/1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: 2012-06-19T00:13:28-07:00 List-Id: Copyright =A9 2012 Austin O'Byrne. Let us say that =93NextNum=94 is a variable in a program output string that= the user wants to sort at the end of the program run. How it works. Each change in =91NextNum=92 is trapped as it is computed by a =91bug=92 st= rategically placed in the lines of source code.=20 Q :=3D NextNum(I); I_NUM(Q):=3D I_NUM(Q)+1; (This is the bug) The bug =91gets=92 (captures) the instantaneous value of NextNum as it mate= rializes and then immediately writes this instantaneous value to a dedicat= ed array in order of *magnitude and returns for the next i.e. each value in= dexes its own place in the array ( *not in sequential order where the entri= es would be contiguous and remain unsorted =96 this is the most salient poi= nt for the reader to note). *This is defacto sorting per se. It only needs to read back from the array to see the sorted string which ca= n be anything up to 1 million or more elements sorted in a split second, to= complete the task. Discussion. Although I do not yet have performance figures to hand I think I can safely= say that this is super quick, super efficient sorting. The method is hugely intrinsic to Ada and should be considered as a permane= nt part of the language mathematical library like say the =91vector cross p= roduct=92, trig functions, and calculus. I am proposing that idea here and= now if any reader wants to get behind it with me to promote the idea furth= er to the powers that be in Ada. I am retaining the copyright meanwhile. I cannot see any of the synthetic algorithms like =91quick sort=92, =91tree= sort=92 etc, coming even close to it. I think this blows them all right o= ut of the water. I am developing the demonstration pilot programs (half way there) that I wi= ll be uploading to my site later for your perusal. There will be, 1) An interactive real-time, separate numerical and alphanumerical working = program. 2) Batch working in numerical and alphanumerical =96 i.e. reading in from e= xternal unsorted files and out-putting to other sorted external files. A full description document will accompany the four uploaded programs in Ad= a that will have the compiler with them and are for free downloading. I would like to corner this invention as being fundamentally an Ada feature= =96 you guys should get behind it now if you know how to contact the Ada p= eople who have the power to make changes to the language =96 I don=92t.=20 With both feet firmly on the ground I say this =91sort=92 method could beco= me ubiquitous in the future and /or a bench mark for all other sort program= s if they still exist. Enjoy, Austin O=92Byrne ( aka - adacrypt).