My Invention of Bug Sort - a Data Sorting Program.
- From: austin.obyrne@xxxxxxxxxxx
- Date: Tue, 19 Jun 2012 00:56:50 -0700 (PDT)
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).
.
- Follow-Ups:
- Re: My Invention of Bug Sort - a Data Sorting Program.
- From: Gordon Burditt
- Re: My Invention of Bug Sort - a Data Sorting Program.
- From: Piergiorgio Sartor
- Re: My Invention of Bug Sort - a Data Sorting Program.
- From: Mark Murray
- Re: My Invention of Bug Sort - a Data Sorting Program.
- From: angrybaldguy
- Re: My Invention of Bug Sort - a Data Sorting Program.
- Prev by Date: Re: [OT] how do you deal with christ ?
- Next by Date: Re: ssl/tls question (firefox)
- Previous by thread: Re: Has it a name?
- Next by thread: Re: My Invention of Bug Sort - a Data Sorting Program.
- Index(es):
Relevant Pages
|