From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: My Invention of "Bug Sort".
Date: Tue, 19 Jun 2012 00:13:28 -0700 (PDT)
Date: 2012-06-19T00:13:28-07:00 [thread overview]
Message-ID: <3852c348-a728-44ed-b065-c8a596c1e235@googlegroups.com> (raw)
Copyright © 2012 Austin O'Byrne.
Let us say that “NextNum” 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 ‘NextNum’ is trapped as it is computed by a ‘bug’ strategically placed in the lines of source code.
Q := NextNum(I);
I_NUM(Q):= I_NUM(Q)+1;
(This is the bug)
The bug ‘gets’ (captures) the instantaneous value of NextNum as it materializes and then immediately writes this instantaneous value to a dedicated array in order of *magnitude and returns for the next i.e. each value indexes its own place in the array ( *not in sequential order where the entries would be contiguous and remain unsorted – this is the most salient point 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 can 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 permanent part of the language mathematical library like say the ‘vector cross product’, 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 further to the powers that be in Ada. I am retaining the copyright meanwhile.
I cannot see any of the synthetic algorithms like ‘quick sort’, ‘tree sort’ etc, coming even close to it. I think this blows them all right out of the water.
I am developing the demonstration pilot programs (half way there) that I will 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 – i.e. reading in from external unsorted files and out-putting to other sorted external files.
A full description document will accompany the four uploaded programs in Ada 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 – you guys should get behind it now if you know how to contact the Ada people who have the power to make changes to the language – I don’t.
With both feet firmly on the ground I say this ‘sort’ method could become ubiquitous in the future and /or a bench mark for all other sort programs if they still exist.
Enjoy,
Austin O’Byrne ( aka - adacrypt).
next reply other threads:[~2012-06-19 7:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 7:13 Austin Obyrne [this message]
2012-06-19 11:55 ` My Invention of "Bug Sort" 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
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