Rainbow Sort is an unconventional method for sorting, which is based on the physical concepts of refraction and dispersion. It is inspired by the observation that light that traverses a prism is sorted by wavelength. At first sight this “rainbow effect” that appears in nature has nothing to do with a computation in the classical sense, still it can be used to design a sorting method that has the potential of running in Θ (n) with a space complexity of Θ (n), where n denotes the number of elements that are sorted. In Section 1, some upper and lower bounds for sorting are presented in order to provide a basis for comparisons. In Section 2, the physical background is outlined, the setup and the algorithm are presented and a lower bound for Rainbow Sort of Ω (n) is derived. In Section 3, we describe essential difficulties that arise when Rainbow Sort is implemented. Particularly, restrictions that apply due to the Heisenberg uncertainty principle have to be considered. Furthermore, we sketch a possible implementation that leads to a running time of O(n+m), where m is the maximum key value, i.e., we assume that there are integer keys between 0 and m. Section 4 concludes with a summary of the complexity and some remarks on open questions, particularly on the treatment of duplicates and the preservation of references from the keys to records that contain the actual data. In Appendix A, a simulator is introduced that can be used to visualise Rainbow Sort.
Keywordsdispersion Heisenberg uncertainty principle natural computing refraction sorting
Unable to display preview. Download preview PDF.
- Cormen TH, Leiserson CE, Rivest RL, Stein C. (2001), Introduction to Algorithms. 2nd edition, MIT Press.Google Scholar
- Hecht E. (2002) Optics. 4th edition, Addison-Wesley.Google Scholar
- Klehr A, Bugge F, Erbert G, Hofmann L, Knauer A, Sebastian J, Smirnitzki VB, Wenzel H, Tränkle G. (2000). 300 GHz continuously tunable high power three section DBR laser diode at 1060nm. In: Proceedings of the 26th International Symposium on Compound Semiconductors, Vol. 166, Inst. Phys. Conf. Ser., pp. 383–386.Google Scholar
- Serway RA, Moses CJ and Moyer CA (1997), Modern Physics. 2nd edition, Saunders College Publishing.Google Scholar