My Invention of Bug Sort - a Data Sorting Program.



Copyright © 2012 Austin O'Byrne.

Let us say that “NextNum” is a variable in a program output data 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 (before returning 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 (Comp Lang Ada readers) 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’, Heap 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 data working program.

2)Batch working in numerical and alphanumerical data – 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 (Comp Lang Ada) 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).
.



Relevant Pages

  • My Invention of "Bug Sort".
    ... 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. ... Batch working in numerical and alphanumerical – i.e. reading in from external unsorted files and out-putting to other sorted external files. ... 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. ... Austin O’Byrne. ...
    (comp.lang.ada)
  • Re: My Invention of Bug Sort - a Data Sorting Program.
    ... Let us say that “NextNum” is a variable in a program output data string that the user wants to sort at the end of the program run. ... 2)Batch working in numerical and alphanumerical data – i.e. reading in from external unsorted files and out-putting to other sorted external files. ... 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. ... Austin O’ Byrne. ...
    (sci.crypt)
  • Re: My Invention of Bug Sort - a Data Sorting Program.
    ... Let us say that “NextNum” is a variable in a program output data string that the user wants to sort at the end of the program run. ... 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. ... The method is still very cost effective when it is used to count or to check repeats of integer ciphertext in vector cryptography. ... The only change I would be prepared to make out of hand is to say that the method has practical limitations of size. ...
    (sci.crypt)
  • Re: My Invention of Bug Sort - a Data Sorting Program.
    ... Let us say that “NextNum” is a variable in a program output data string that the user wants to sort at the end of the program run. ... A full description document will accompany the four uploaded programs in Ada that will have the compiler with them and are for free downloading. ... 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. ...
    (sci.crypt)
  • =?windows-1252?Q?Re=3A_Recapping_on_=93Bug_Sort=94=2E?=
    ... What you have presented is an implementation of counting sort, ... The crucial test part of the program was timed for that test as being the de facto sorting implement. ... Austin O'Byrne. ... 42750 seven-digit positive integers were sorted in between 1 and 2 seconds. ...
    (comp.lang.ada)