Quicksort algorithm

This is good example of how I devise algorithms without the knowledge of what is previously done. The reason I do this is to learn how to create the algorithms, and how to use them. I devised 'a type of Quicksort' with two different associated methods that speed it up. I did the algorithm in assembly language first and optimized for speed. I first used a binary partitioning on the bits from upper to lower.

The method was to create two pointers into the lists, which were beginning and end. I start with the first character of (n0) and if it is 1 it goes 'right to the top' and if 0 it goes 'left to bottom ( actually does not move ) '. So it executes in n2 as worst case. I extended the algo by merging it with some log2(n) methods.

It sure helps to understand something, if you designed something similar. These same methods are useful in spanning trees ( like directories). I really make no difference what language or machine you use as a computer must be able to point, compare and move. Stack machines require a different algo than others, but it works out the same way.

An interesting thing I never considered is that if it is sorted, it does no swaps. This is the common case and so perhaps I did something good without knowing that I had.

It does give me a new talent to qualify code so that I can say what properties it has and make better code. Interesting thought: If I graph on the probability product of a function and analyze the applicability in frequency, it might select a different algo because it fits the most common case.

While doing this analysis I thought of something that might be a freaky new algo for sort, that is overall log2(n). Odd, I will have to try it in my code. If it works, I will post the 'C' code.

I am adding a blackboard to my program and a method that writes characters as a path. It is just something interesting to do.

This was added to show how a high order bit binary in place sort works. It is recursive and each partition is then handled in the same way until the partitions are size 1. It finds the first !1=0 when moving a 1 and then swaps to the origin. Thus any 0 in its partition is not moved and any 1 in its partition is not moved. Mostly I am doing this to keep and enhance my XML-SVG skills and gimp. Hoping that I learn something new and faster when creating the product. It does two swaps across the entire array. I could have done an animated .gif, .avi or a .blend, but that would have been overboard, even for me, I think.

This is all great fun, but in the real world, CAM searches always take 1 cycle and the time to sort is ZERO and so it is predictable, upper=lower bound, thus Θ(n)=0 and if somebody comes up with a sort algorithm that runs in imaginary time it would win, but it is going to be tough to create a sort that runs in less than ZERO time.

I may make an CIA, FBI, DoD, or NSA show called Dumb3rs. The quality of the jokes varies by a pseudo random number and are generated with a stochastic process and picked by a Monte Carlo method using an RSA algorithm.